xfs: add the ability to reap entire inode forks
authorDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:54:30 +0000 (14:54 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Mon, 15 Apr 2024 21:58:49 +0000 (14:58 -0700)
commit5befb047b9f4de1747bf48c63cab997a97e0088b
treefcd041d8e682a29c7eec8218da6ca7155c134ca2
parent20a3c1ecc35d2aa9ee1276e1cfd485689f29b662
xfs: add the ability to reap entire inode forks

In preparation for supporting repair of indexed file-based metadata
(such as realtime bitmaps, directories, and extended attribute data),
add a function to reap the old blocks after a metadata repair finishes.
IOWs, this is an elaborate bunmapi call that deals with crosslinked
blocks by unmapping them without freeing them, and also scans for incore
buffers to invalidate.

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
fs/xfs/scrub/trace.h