[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;
 }
 

_______________________________________________
xfs mailing list
xfs@xxxxxxxxxxx
http://oss.sgi.com/mailman/listinfo/xfs



[Index of Archives]     [Linux XFS Devel]     [Linux Filesystem Development]     [Filesystem Testing]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux