summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_icache.c
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-12-15 00:42:59 +0100
committerDarrick J. Wong <darrick.wong@oracle.com>2017-12-21 17:47:28 +0100
commit363e59baa4f76d3f97c0133ff7014cba3d90a7c3 (patch)
treefee3a061d7ab180e6637399edd30377f5ad3efdd /fs/xfs/xfs_icache.c
parentxfs: track cowblocks separately in i_flags (diff)
downloadlinux-363e59baa4f76d3f97c0133ff7014cba3d90a7c3.tar.xz
linux-363e59baa4f76d3f97c0133ff7014cba3d90a7c3.zip
xfs: don't be so eager to clear the cowblocks tag on truncate
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@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/xfs_icache.c')
0 files changed, 0 insertions, 0 deletions