Re: [PATCH 2/4] xfs: don't be so eager to clear the cowblocks tag on truncate

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Dec 15, 2017 at 09:11:25AM -0800, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
> 
> Currently, xfs_itruncate_extents clears the cowblocks tag if i_cnextents
> is zero.  This is wrong, since i_cnextents only tracks real extents in
> the CoW fork, which means that we could have some delayed CoW
> reservations still in there that will now never get cleaned.
> 
> Fix a further bug where we /don't/ clear the reflink iflag if there are
> any attribute blocks -- really, it's only safe to clear the reflink flag
> if there are no data fork extents and no cow fork extents.
> 
> Found by adding clonerange to fsstress in xfs/017.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

Looks good.

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
-- 
Dave Chinner
david@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux