xfs
[Top] [All Lists]

Re: [PATCH] Fix xfs_fsync() b0rkage

To: David Chinner <dgc@xxxxxxx>
Subject: Re: [PATCH] Fix xfs_fsync() b0rkage
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Tue, 6 May 2008 01:19:16 -0400
Cc: xfs-dev <xfs-dev@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20080506022701.GN155679365@xxxxxxx>
References: <20080506022701.GN155679365@xxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.5.17 (2007-11-01)
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.


<Prev in Thread] Current Thread [Next in Thread>