summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_icache.h
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-08-06 11:05:42 -0700
committerDarrick J. Wong <djwong@kernel.org>2021-08-09 11:13:16 -0700
commite8d04c2abcebd66bdbacd53bb273d824d4e27080 (patch)
treeb416b3ed43c11685eac84c4205d806f6690be236 /fs/xfs/xfs_icache.h
parent6f6490914d9b712004ddad648e47b1bf22647978 (diff)
downloadlinux-e8d04c2abcebd66bdbacd53bb273d824d4e27080.tar.gz
linux-e8d04c2abcebd66bdbacd53bb273d824d4e27080.tar.bz2
linux-e8d04c2abcebd66bdbacd53bb273d824d4e27080.zip
xfs: use background worker pool when transactions can't get free space
In xfs_trans_alloc, if the block reservation call returns ENOSPC, we call xfs_blockgc_free_space with a NULL icwalk structure to try to free space. Each frontend thread that encounters this situation starts its own walk of the inode cache to see if it can find anything, which is wasteful since we don't have any additional selection criteria. For this one common case, create a function that reschedules all pending background work immediately and flushes the workqueue so that the scan can run in parallel. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_icache.h')
-rw-r--r--fs/xfs/xfs_icache.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_icache.h b/fs/xfs/xfs_icache.h
index 8175148afd50..18c2d224aa78 100644
--- a/fs/xfs/xfs_icache.h
+++ b/fs/xfs/xfs_icache.h
@@ -59,6 +59,7 @@ int xfs_blockgc_free_dquots(struct xfs_mount *mp, struct xfs_dquot *udqp,
unsigned int iwalk_flags);
int xfs_blockgc_free_quota(struct xfs_inode *ip, unsigned int iwalk_flags);
int xfs_blockgc_free_space(struct xfs_mount *mp, struct xfs_icwalk *icm);
+void xfs_blockgc_flush_all(struct xfs_mount *mp);
void xfs_inode_set_eofblocks_tag(struct xfs_inode *ip);
void xfs_inode_clear_eofblocks_tag(struct xfs_inode *ip);