summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_aops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-03-07 16:45:58 -0800
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-04-08 09:30:32 +0200
commit3b83a02af271a290eed708246bf03ef7d41786ee (patch)
treece243441ade18cdca39568366789b468ffd447ee /fs/xfs/xfs_aops.c
parenta2402936943364e39ef5833db29387d019182ce7 (diff)
xfs: only reclaim unwritten COW extents periodically
commit 3802a345321a08093ba2ddb1849e736f84e8d450 upstream. 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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs/xfs_aops.c')
-rw-r--r--fs/xfs/xfs_aops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_aops.c b/fs/xfs/xfs_aops.c
index f5f51d40a2ec..08a2515460ff 100644
--- a/fs/xfs/xfs_aops.c
+++ b/fs/xfs/xfs_aops.c
@@ -298,7 +298,7 @@ xfs_end_io(
goto done;
if (ioend->io_bio->bi_error) {
error = xfs_reflink_cancel_cow_range(ip,
- ioend->io_offset, ioend->io_size);
+ ioend->io_offset, ioend->io_size, true);
goto done;
}
error = xfs_reflink_end_cow(ip, ioend->io_offset,