From: Darrick J. Wong Date: Thu, 14 Dec 2017 23:46:06 +0000 (-0800) Subject: xfs: set cowblocks tag for direct cow writes too X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=86d692bfad1b0097fa866f5fcfa5f5adf4cd82e8;p=linux.git 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 Reviewed-by: Dave Chinner Reviewed-by: Christoph Hellwig --- diff --git a/fs/xfs/xfs_reflink.c b/fs/xfs/xfs_reflink.c index e49e6db415f78..47aea2e82c268 100644 --- a/fs/xfs/xfs_reflink.c +++ b/fs/xfs/xfs_reflink.c @@ -454,6 +454,8 @@ retry: if (error) goto out_bmap_cancel; + xfs_inode_set_cowblocks_tag(ip); + /* Finish up. */ error = xfs_defer_finish(&tp, &dfops); if (error)