[PATCH V2] xfs: truncate_setsize should be outside transactions

Christoph Hellwig hch at infradead.org
Fri May 2 05:08:02 CDT 2014


On Fri, May 02, 2014 at 05:00:54PM +1000, Dave Chinner wrote:
> The reason truncate_setsize() was located where in this place was
> that we can't change the file size until after we are in the
> transaction context and the operation will either succeed or shut
> down the filesystem on failure. Hence we have to split
> truncate_setsize() back into a pagecache operation that occurs
> before the transaction context, and a i_size_write() call that
> happens within the transaction context.

Further updating myself earlier on the comment next to
truncate_pagecache claims that the file size must have been updated
before, but I can't see a reason for that.

This version looks fine to me:

Reviewed-by: Christoph Hellwig <hch at lst.de>



More information about the xfs mailing list