summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_super.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-03-07 16:45:58 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2017-03-07 16:45:58 -0800
commit3802a345321a08093ba2ddb1849e736f84e8d450 (patch)
treeea04908a2d01c0e982b2b9490d118cad7459f107 /fs/xfs/xfs_super.c
parentc771c14baa3319c85512e575671bf0bb18824c11 (diff)
downloadlinux-3802a345321a08093ba2ddb1849e736f84e8d450.tar.gz
linux-3802a345321a08093ba2ddb1849e736f84e8d450.tar.bz2
linux-3802a345321a08093ba2ddb1849e736f84e8d450.zip
xfs: only reclaim unwritten COW extents periodically
We only want to reclaim preallocations from our periodic work item. Currently this is archived by looking for a dirty inode, but that check is rather fragile. Instead add a flag to xfs_reflink_cancel_cow_* so that the caller can ask for just cancelling unwritten extents in the COW fork. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> [darrick: fix typos in commit message] Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_super.c')
-rw-r--r--fs/xfs/xfs_super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_super.c b/fs/xfs/xfs_super.c
index 890862f2447c..685c042a120f 100644
--- a/fs/xfs/xfs_super.c
+++ b/fs/xfs/xfs_super.c
@@ -953,7 +953,7 @@ xfs_fs_destroy_inode(
XFS_STATS_INC(ip->i_mount, vn_remove);
if (xfs_is_reflink_inode(ip)) {
- error = xfs_reflink_cancel_cow_range(ip, 0, NULLFILEOFF);
+ error = xfs_reflink_cancel_cow_range(ip, 0, NULLFILEOFF, true);
if (error && !XFS_FORCED_SHUTDOWN(ip->i_mount))
xfs_warn(ip->i_mount,
"Error %d while evicting CoW blocks for inode %llu.",