Messages in this thread | | | Date | Mon, 6 Oct 2008 13:51:16 +1100 | From | Dave Chinner <> | Subject | Re: [PATCH 2/3] Fix fsync livelock |
| |
On Sun, Oct 05, 2008 at 08:01:46PM -0400, Mikulas Patocka wrote: > This looks madly complicated. And ineffective, because if some page was > submitted before fsync() was invoked, and is under writeback while fsync() > is called, fsync() still has to wait on it.
fsync() waiting on pre-issued writeback pages is the correct behaviour.
IOW, if the page is under writeback at the time an fsync() is issued (e.g. issued by pdflush), the page was *not clean* at the time the fsync() was called and hence must be clean when fsync() returns. fsync() needs to wait for all pages under I/O at the time it is called, not just the dirty pages it issues I/O on.....
Cheers,
Dave. -- Dave Chinner david@fromorbit.com
| |