From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> When we're checking the realtime rmapbt, cross-reference the entries with the realtime bitmap too. Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> --- fs/xfs/scrub/rtrmap.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fs/xfs/scrub/rtrmap.c b/fs/xfs/scrub/rtrmap.c index 1480ea6..6862b54 100644 --- a/fs/xfs/scrub/rtrmap.c +++ b/fs/xfs/scrub/rtrmap.c @@ -33,6 +33,8 @@ #include "xfs_rmap_btree.h" #include "xfs_rtrmap_btree.h" #include "xfs_inode.h" +#include "xfs_alloc.h" +#include "xfs_rtalloc.h" #include "scrub/xfs_scrub.h" #include "scrub/scrub.h" #include "scrub/common.h" @@ -78,6 +80,7 @@ xfs_scrub_rtrmapbt_helper( struct xfs_mount *mp = bs->cur->bc_mp; struct xfs_rmap_irec irec; unsigned long long rec_end; + bool is_free; bool non_inode; bool is_bmbt; bool is_attr; @@ -99,6 +102,12 @@ xfs_scrub_rtrmapbt_helper( xfs_scrub_btree_check_ok(bs->sc, bs->cur, 0, !is_bmbt && !non_inode && !is_attr); + /* Check the rtbitmap thinks it's free. */ + error = xfs_rtalloc_extent_is_free(mp, bs->cur->bc_tp, + irec.rm_startblock, irec.rm_blockcount, &is_free); + if (xfs_scrub_should_xref(bs->sc, &error, NULL)) + xfs_scrub_btree_xref_check_ok(bs->sc, bs->cur, 0, !is_free); + out: return error; } -- To unsubscribe from this list: send the line "unsubscribe linux-xfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html