Re: deadlocks caused by ext3/reiser dirty_inode calls duringdo_mmap_pgoff

From: Chris Mason
Date: Tue Jun 22 2004 - 15:56:08 EST


On Tue, 2004-06-22 at 15:05, Andrew Morton wrote:
> Chris Mason <mason@xxxxxxxx> wrote:

> > Oh, just realized this will break our data=ordered setup. prepare_write
> > is going to do things like allocating blocks in the file etc etc. If we
> > close the transaction via commit_write(0 size) and crash, we'll leak.
>
> OK, then just zero the pagecache page between `from' and `to' and call
> ->commit_write() with unmodified `from' and `to'?
>
> > We might need to do prefault + pin on the user pages.
>
> That's always been the correct way to fix these problems, but it involves a
> pagetable walk, which requires page_table_lock. Not a popular thing to be
> doing on the write() fastpath.

Fair enough, zeroing between from and to should do it.

-chris


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/