summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_file.c
diff options
context:
space:
mode:
authorBrian Foster2017-06-20 23:36:19 +0200
committerDarrick J. Wong2017-06-28 03:23:21 +0200
commitcf2cb7845d6e101cb17bd62f8aa08cd514fc8988 (patch)
tree941ef1a4ac60a2cf08bb498e410fc7697056108b /fs/xfs/xfs_file.c
parentxfs: replace log_badcrc_factor knob with error injection tag (diff)
downloadkernel-qcow2-linux-cf2cb7845d6e101cb17bd62f8aa08cd514fc8988.tar.gz
kernel-qcow2-linux-cf2cb7845d6e101cb17bd62f8aa08cd514fc8988.tar.xz
kernel-qcow2-linux-cf2cb7845d6e101cb17bd62f8aa08cd514fc8988.zip
xfs: free cowblocks and retry on buffered write ENOSPC
XFS runs an eofblocks reclaim scan before returning an ENOSPC error to userspace for buffered writes. This facilitates aggressive speculative preallocation without causing user visible side effects such as premature ENOSPC. Run a cowblocks scan in the same situation to reclaim lingering COW fork preallocation throughout the filesystem. Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_file.c')
-rw-r--r--fs/xfs/xfs_file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
index 36c129303fcf..8f9a491b2551 100644
--- a/fs/xfs/xfs_file.c
+++ b/fs/xfs/xfs_file.c
@@ -660,6 +660,7 @@ write_retry:
xfs_iunlock(ip, iolock);
eofb.eof_flags = XFS_EOF_FLAGS_SYNC;
xfs_icache_free_eofblocks(ip->i_mount, &eofb);
+ xfs_icache_free_cowblocks(ip->i_mount, &eofb);
goto write_retry;
}