[PATCH 19/20] xfs: cross-reference realtime bitmap to realtime rmapbt scrubber

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/xfs_scrub.c |    8 ++++++++
 1 file changed, 8 insertions(+)


diff --git a/fs/xfs/xfs_scrub.c b/fs/xfs/xfs_scrub.c
index f1f4a2f..f0cd21f 100644
--- a/fs/xfs/xfs_scrub.c
+++ b/fs/xfs/xfs_scrub.c
@@ -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;
 }
 

--
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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux