Re: [PATCH 2.6.3-rc2-mm1] address_space_serialize_writeback patch
From: Andrew Morton
Date: Tue Feb 17 2004 - 20:42:28 EST
Daniel McNeil <daniel@xxxxxxxx> wrote:
>
> Here is the patch that does what you suggested. It adds a rwsema to
> the address_space and do_writepages() uses it serialize writebacks.
OK, but we're only holding the rwsem across filemap_fdatawrite(). What
happens after we've dropped the rwsem and we are running
filemap_fdatawait()? Cannot kupdate come in and start moving pages onto
the wrong address_space lists while filemap_fdatawait() is trying to wait
on them?
I think so. Possibly your test just doesn't cover this case.
If so then we need to hold the rwsem for writing across the entire
write-and-wait. And that is going to rather suck if and when we bring back
the sync_page_range() patch, which permitted concurrent fsync() against
different fd's which cover different parts of the file.
We need to check that we're bypassing all this stuff for access to
blockdevs too - we have no security issues to worry about there.
-
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/