xfs
[Top] [All Lists]

Re: [PATCH 09/11] xfs: remove the i_new_size field in struct xfs_inode

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: [PATCH 09/11] xfs: remove the i_new_size field in struct xfs_inode
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Wed, 14 Dec 2011 08:30:16 -0500
Cc: Christoph Hellwig <hch@xxxxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20111213231611.GG3179@dastard>
References: <20111208155755.323930705@xxxxxxxxxxxxxxxxxxxxxx> <20111208155919.025710280@xxxxxxxxxxxxxxxxxxxxxx> <20111213231611.GG3179@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
On Wed, Dec 14, 2011 at 10:16:11AM +1100, Dave Chinner wrote:
> > Note that currently the generic direct I/O code only updates i_size after
> > calling our end_io handler, which requires a small workaround to make
> > sure di_size actually makes it to disk.  I hope to fix this properly in
> > the generic code.
> 
> I think there's a couple of issues with the work around - the
> generic code marks the inode dirty when it updates the inode size.
> With your early setting of the size, it will no longer do this
> because it doesn't see that it needs to update the inode size.
> This may not be a problem if we mark the inode dirty elsewhere, but
> I'm not sure we do in the direct IO path.

We do from I/O completion, once we actually update the on-disk inode
size that actually gets logged.  Before the on-disk inode size has
been updated ->write_inode is a no-op as far as size updates are
concerned, so marking the inode dirty earlier doesn't buy us anything.

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