]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
xfs: prepare reaping code for dynamic limits
authorDarrick J. Wong <djwong@kernel.org>
Tue, 8 Apr 2025 23:14:30 +0000 (16:14 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Fri, 5 Sep 2025 15:48:22 +0000 (08:48 -0700)
commit82e374405e85af2ce3149c74766168df14864697
tree5d0ba572a6a6d8eccaef52d3266cbf32efa55251
parentcd32a0c0dcdf634f2e0e71f41c272e19dece6264
xfs: prepare reaping code for dynamic limits

The online repair block reaping code employs static limits to decide if
it's time to roll the transaction or finish the deferred item chains to
avoid overflowing the scrub transaction's reservation.  However, the
use of static limits aren't great -- btree blocks are assumed to be
scattered around the AG and the buffers need to be invalidated, whereas
COW staging extents are usually contiguous and do not have buffers.  We
would like to configure the limits dynamically.

To get ready for this, reorganize struct xreap_state to store dynamic
limits, and add helpers to hide some of the details of how the limits
are enforced.  Also rename the "xreap roll" functions to include the
word "binval" because they only exist to decide when we should roll the
transaction to deal with buffer invalidations.

No functional changes intended here.

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