@@ -2845,10 +2845,12 @@ xfs_scrub_rtrmapbt_helper(
{
struct xfs_mount *mp = bs->cur->bc_mp;
struct xfs_rmap_irec irec;
+ bool is_free;
bool non_inode;
bool is_bmbt;
bool is_attr;
int error;
+ int err2;
error = xfs_rmap_btrec_to_irec(bs->cur, rec, &irec);
if (error)
@@ -2868,6 +2870,12 @@ xfs_scrub_rtrmapbt_helper(
XFS_BTREC_SCRUB_CHECK(bs, !non_inode);
XFS_BTREC_SCRUB_CHECK(bs, !is_attr);
+ /* Check the rtbitmap thinks it's free. */
+ err2 = xfs_rtbitmap_extent_is_free(mp, irec.rm_startblock,
+ irec.rm_blockcount, &is_free);
+ if (!err2)
+ XFS_BTREC_SCRUB_CHECK(bs, !is_free);
+
return error;
}
When we're checking the realtime rmapbt, cross-reference the entries with the realtime bitmap too. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- fs/xfs/xfs_scrub.c | 8 ++++++++ 1 file changed, 8 insertions(+)