xfs: refactor live buffer invalidation for repairs
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:29 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:48 +0000 (14:58 -0700)
commit20a3c1ecc35d2aa9ee1276e1cfd485689f29b662
treea68a0afdf9247839ef66d846616b5d1fc8f2b6e8
parent84c14ee39dd388d73054181c70b3f42af7ddc238
xfs: refactor live buffer invalidation for repairs

In an upcoming patch, we will need to be able to look for xfs_buf
objects caching file-based metadata blocks without needing to walk the
(possibly corrupt) structures to find all the buffers.  Repair already
has most of the code needed to scan the buffer cache, so hoist these
utility functions.

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