]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
xfs: only reclaim unwritten COW extents periodically
authorChristoph Hellwig <hch@lst.de>
Wed, 8 Mar 2017 00:45:58 +0000 (16:45 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 07:35:05 +0000 (09:35 +0200)
commit1c0d974bea214caa848a2acac03b22d3021de92a
tree047e584fb7dd52d4f76c32f17a9d098275a7cf46
parent5d834e1adcb059886e60d1319ecd437e46356e84
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>
fs/xfs/xfs_aops.c
fs/xfs/xfs_icache.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_reflink.h
fs/xfs/xfs_super.c