]> git.baikalelectronics.ru Git - kernel.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)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 8 Mar 2017 00:45:58 +0000 (16:45 -0800)
commit0dc093e1ea12ce71ad13a49110232612a4c5350b
treeea04908a2d01c0e982b2b9490d118cad7459f107
parent72a5b00b834ce8c5dfc6bdd092bdf26348b2381e
xfs: only reclaim unwritten COW extents periodically

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>
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