aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2017-12-14 18:46:06 -0500
committerDarrick J. Wong <darrick.wong@oracle.com>2017-12-21 11:47:37 -0500
commit86d692bfad1b0097fa866f5fcfa5f5adf4cd82e8 (patch)
treeacd6e1b0bbf99471cb783be8183077aa298841ba
parent10ddf64e420f7f6c1a871bfb4ff2de08faef8235 (diff)
xfs: set cowblocks tag for direct cow writes too
If a user performs a direct CoW write, we end up loading the CoW fork with preallocated extents. Therefore, we must set the cowblocks tag so that they can be cleared out if we run low on space. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
-rw-r--r--fs/xfs/xfs_reflink.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c
index e49e6db415f7..47aea2e82c26 100644
--- a/fs/xfs/xfs_reflink.c
+++ b/fs/xfs/xfs_reflink.c
@@ -454,6 +454,8 @@ retry:
454 if (error) 454 if (error)
455 goto out_bmap_cancel; 455 goto out_bmap_cancel;
456 456
457 xfs_inode_set_cowblocks_tag(ip);
458
457 /* Finish up. */ 459 /* Finish up. */
458 error = xfs_defer_finish(&tp, &dfops); 460 error = xfs_defer_finish(&tp, &dfops);
459 if (error) 461 if (error)