On Tue, May 06, 2008 at 12:27:01PM +1000, David Chinner wrote:
> Fix fsync() b0rkage.
>
> xfs_fsync() fails to wait for data I/O completion before checking if
> the inode is dirty or clean to decide whether to log the inode or not.
> This misses inode size updates when the data flushed by the fsync()
> is extending the file. This results in xfsqa test 179 failures.
>
> Hence, like fdatasync(), we need to wait for I/O completion first,
> then check the inode for cleanliness. Doing so makes the behaviour of
> xfs_fsync() identical for fsync and fdatasync and we *always* use
> synchronous semantics if the inode is dirty. Therefore also kill the
> differences and remove the unused flags from the xfs_fsync function
> and callers.
The change looks good from a quick look, but while you're at it you
can also remove the unused start/stop arguments.
|