Messages in this thread | | | Date | Tue, 16 Dec 2003 18:03:19 -0800 | From | Andrew Morton <> | Subject | Re: [PATCH linux-2.6.0-test10-mm1] filemap_fdatawait.patch |
| |
Daniel McNeil <daniel@osdl.org> wrote: > > I have found something else that might be causing the problem. > filemap_fdatawait() skips pages that are not marked PG_writeback. > However, when a page is going to be written, PG_dirty is cleared > before PG_writeback is set (while the PG_locked is set). So it > looks like filemap_fdatawait() can see a page just before it is > going to be written and not wait for it. Here is a patch that > makes filemap_fdatawait() wait for locked pages as well to make > sure it does not missed any pages.
This filemap_fdatawait() behaviour is as-designed. That function is only responsible for waiting on I/O which was initiated prior to it being invoked. Because it is designed for fsync(), fdatasync(), O_SYNC, msync(), sync(), etc.
Now, it could be that this behaviour is not appropriate for the O_DIRECT sync function - the result of your testing will be interesting.
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |