xfs: use deferred frees to reap old btree blocks
authorDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:02 +0000 (07:48 -0700)
committerDarrick J. Wong <djwong@kernel.org>
Thu, 10 Aug 2023 14:48:02 +0000 (07:48 -0700)
commit5fee784ed08572732ad02af6fb0e6ef7b9c99320
treecb8732108540074ae6029f0a2cc2a11742565664
parenta55e07308831b500d9f093d3c23bffb4180b12af
xfs: use deferred frees to reap old btree blocks

Use deferred frees (EFIs) to reap the blocks of a btree that we just
replaced.  This helps us to shrink the window in which those old blocks
could be lost due to a system crash, though we try to flush the EFIs
every few hundred blocks so that we don't also overflow the transaction
reservations during and after we commit the new btree.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/scrub/reap.c