xfs: wait for direct I/O to complete in fsync and write_inode
PATCH 1/1 xfs: wait for direct I/O to complete in fsync and write_inode
We need to wait for all pending direct I/O requests before taking care of metadata in fsync and write_inode.
Signed-off-by Christoph Hellwig <[email protected]>
fs/xfs/linux-2.6/xfs_file.c +2 -0
@@ -115,6 +115,8 @@ xfs_file_fsync(xfs_iflags_clear (ip,XFS_ITRUNCATED ); +xfs_ioend_wait (ip); +/* * We always need to make sure that the required inode state is safe on * disk. The inode might be clean but we still might need to force the
fs/xfs/linux-2.6/xfs_super.c +1 -0
@@ -1092,6 +1092,7 @@ xfs_fs_write_inode(* the code will only flush the inode if it isn't already * being flushed. */ +xfs_ioend_wait (ip);xfs_ilock (ip,XFS_ILOCK_SHARED );if (ip->i_update_core) { error =xfs_log_inode (ip);
_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Quoted 4 lines · Christoph Hellwig
We need to wait for all pending direct I/O requests before taking care of metadata in fsync and
write_inode.Signed-off-by Christoph Hellwig <[email protected]>
Looks good.
Reviewed-by Dave Chinner <[email protected]>
Signature · 7 lines
Dave Chinner [email protected] _______________________________________________ xfs mailing list [email protected] http://oss.sgi.com/mailman/listinfo/xfs