]> Gentwo Git Trees - linux/.git/commit
xfs: compute file mapping reap limits dynamically
authorDarrick J. Wong <djwong@kernel.org>
Tue, 8 Apr 2025 23:14:35 +0000 (16:14 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 5 Sep 2025 15:48:22 +0000 (08:48 -0700)
commite4c7eece7676bac436a8f98b91d646a8b55a67af
treef9e2520335667bccb6ab6a8e13df5b29cb8f9e8a
parent74fc66ee17fcd994a49ed80ddba90bc3b7046684
xfs: compute file mapping reap limits dynamically

Reaping file fork mappings is a little different -- log recovery can
free the blocks for us, so we only try to process a single mapping at a
time.  Therefore, we only need to figure out the maximum number of
blocks that we can invalidate in a single transaction.

The rough calculation here is:

nr_extents = (logres - reservation used by any one step) /
(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.h