Re: [PATCH 1/6] VFS: Ensure that writeback_single_inode() commits unstable writes

Christoph Hellwig
2010-01-08T09:25:57Z

On Thu, Jan 07, 2010 at 10:10:22AM -0500, Trond Myklebust wrote:
> As I said previously, the write_inode() call is done _before_ you sync
> the dirty pages to the server, whereas commit_unstable_pages() wants to
> be done _after_ syncing. So the two are not the same, and we cannot
> replace commit_unstable_pages() with write_inode().

But that's more an accident of how this code was written. The right
order nees to be to write the pages first, then call write_inode. Most
modern filesystems have to work around this in their write_inode method
by waiting for the pages themselves. I already fixed the same ordering
issue in fsync, and the writeback code is next on the agenda.