diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-08-06 20:05:42 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-08-09 20:13:16 +0200 |
commit | e8d04c2abcebd66bdbacd53bb273d824d4e27080 (patch) | |
tree | b416b3ed43c11685eac84c4205d806f6690be236 /fs/xfs/xfs_icache.h | |
parent | xfs: don't run speculative preallocation gc when fs is frozen (diff) | |
download | linux-e8d04c2abcebd66bdbacd53bb273d824d4e27080.tar.xz 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.h | 1 |
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); |