[Top] [All Lists]

Re: [PATCH] xfs: kill xfs_itruncate_start

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH] xfs: kill xfs_itruncate_start
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 21 Jun 2011 11:31:52 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20110617131301.GB2141@xxxxxxxxxxxxx>
References: <20110617131301.GB2141@xxxxxxxxxxxxx>
User-agent: Mutt/1.5.20 (2009-06-14)
On Fri, Jun 17, 2011 at 09:13:01AM -0400, Christoph Hellwig wrote:
> xfs_itruncate_start is a rather length wrapper that evaluates to a call
> to xfs_ioend_wait and xfs_tosspages, and only has two callers.
> Instead of using the complicated checks left over from IRIX where we
> can to truncate the pagecache just call xfs_tosspages
> (aka truncate_inode_pages) directly as we want to get rid of all data
> after i_size, and truncate_inode_pages handles incorrect alignments
> and too large offsets just fine.
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks sane given that the complexity is necessary for handling the 
XFS_ITRUNC_MAYBE case correctly, and that flag is unused and
therefore never needed in the Linux code base. It also means that
xfs_free_eofblocks() won't get hung up on IO in progress needlessly.

Well spotted!

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

Dave Chinner

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