Re: [PATCH 1/7] xfs: split inode data writeback from xfs_sync_inodes_ag

Dave Chinner
2009-05-18T06:58:53Z

On Fri, May 15, 2009 at 01:21:22PM -0400, Christoph Hellwig wrote:
> That beeing said I don't really like the current implementation where we
> have a SYNC_WAIT that waits for completion of data I/O and need a
> separate SYNC_IOWAIT that waits for the after data I/O metadata
> transaction completions.

SYNC_IOWAIT is really only for waiting for direct IO to complete.
e.g. for synchronisation with truncate. I'm not sure that it even
matters for pure buffered data writeback.

> fs/xfs/linux-2.6/xfs_quotaops.c: return -xfs_sync_data(mp, 0);
> fs/xfs/linux-2.6/xfs_super.c: xfs_sync_data(mp, 0);
> fs/xfs/linux-2.6/xfs_sync.c: xfs_sync_data(mp, 0);
> fs/xfs/linux-2.6/xfs_sync.c: xfs_sync_data(mp, SYNC_WAIT|SYNC_IOWAIT);
> fs/xfs/linux-2.6/xfs_sync.c: xfs_sync_data(mp, SYNC_TRYLOCK);
> fs/xfs/linux-2.6/xfs_sync.c: xfs_sync_data(mp, SYNC_TRYLOCK | SYNC_IOWAIT);

And only the data queisce cares about direct IO (i.e. for freeze)
so I suspect that the SYNC_IOWAIT now could be removed and we
use SYNC_WAIT to trigger the ioend completion wait....

Cheers,

Dave.
--
Dave Chinner
david@fromorbit.com