From: Brian Foster Date: Tue, 20 Jun 2017 21:36:19 +0000 (-0700) Subject: xfs: free cowblocks and retry on buffered write ENOSPC X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cf2cb7845d6e101cb17bd62f8aa08cd514fc8988;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 Reviewed-by: Darrick J. Wong Signed-off-by: Darrick J. Wong --- 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; }