diff options
author | Darrick J. Wong <djwong@kernel.org> | 2021-09-01 11:17:57 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2021-10-22 16:41:03 -0700 |
commit | 3e5217524b1bebb753de88d848fbbdc523d6307c (patch) | |
tree | ae0ba807875c8c86cd1419f6453a80984931edb6 | |
parent | 822746d21031997532ecb6d3526e4ee7cfe112a8 (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>
-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; } |