diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:17:57 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-12-15 17:29:17 -0800 |
commit | 61726feee1311e3b790fbae7f13402aed23c0c33 (patch) | |
tree | 7262c91f8bdf65c86a380aa66e69e631a8b347b1 /fs/xfs/scrub | |
parent | d4334d0dcc4f1e25869eef89536db6a8d0ef28f1 (diff) |
xfs: cross-reference realtime bitmap to realtime rmapbt scrubber
When we're checking the realtime rmap btree entries, cross-reference
those entries with the realtime bitmap too.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub')
-rw-r--r-- | fs/xfs/scrub/rtrmap.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/xfs/scrub/rtrmap.c b/fs/xfs/scrub/rtrmap.c index 2928f57c29ed..4e7b2204490a 100644 --- a/fs/xfs/scrub/rtrmap.c +++ b/fs/xfs/scrub/rtrmap.c @@ -48,6 +48,19 @@ xchk_setup_rtrmapbt( /* Realtime reverse mapping. */ +/* Cross-reference with other metadata. */ +STATIC void +xchk_rtrmapbt_xref( + struct xfs_scrub *sc, + struct xfs_rmap_irec *irec) +{ + if (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT) + return; + + xchk_xref_is_used_rt_space(sc, irec->rm_startblock, + irec->rm_blockcount); +} + /* Scrub a realtime rmapbt record. */ STATIC int xchk_rtrmapbt_rec( @@ -82,6 +95,7 @@ xchk_rtrmapbt_rec( if (!xfs_verify_ino(mp, irec.rm_owner)) xchk_btree_set_corrupt(bs->sc, bs->cur, 0); + xchk_rtrmapbt_xref(bs->sc, &irec); out: return error; } |