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.
Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>