]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: compute per-AG extent reap limits dynamically
authorDarrick J. Wong <djwong@kernel.org>
Tue, 8 Apr 2025 23:14:33 +0000 (16:14 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 5 Sep 2025 15:48:22 +0000 (08:48 -0700)
commitb2311ec6778fcde9d40cd9e22899f8bd594d8465
treedb9de1aba0b92cbc601299dc613b5703ef7a6b35
parentef930cc371f033d9ce21292ca577741dfeb8c7f3
xfs: compute per-AG extent reap limits dynamically

Calculate the maximum number of extents that can be reaped in a single
transaction chain, and the number of buffers that can be invalidated in
a single transaction.  The rough calculation here is:

nr_extents = (logres - reservation used by any one step) /
(space used by intents per extent +
 space used per binval)

Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/xfs/scrub/reap.c
fs/xfs/scrub/trace.c
fs/xfs/scrub/trace.h