| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 19/20] xfs: cross-reference realtime bitmap to realtime rmapbt scrubber |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Thu, 25 Aug 2016 16:45:26 -0700 |
| Cc: | linux-xfs@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <147216860614.3688.3200692982609112535.stgit@xxxxxxxxxxxxxxxx> |
| References: | <147216860614.3688.3200692982609112535.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
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;
}
|
| Previous by Date: | [PATCH 18/20] xfs: scrub the realtime rmapbt, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 20/20] xfs: cross-reference the realtime rmapbt, Darrick J. Wong |
| Previous by Thread: | [PATCH 18/20] xfs: scrub the realtime rmapbt, Darrick J. Wong |
| Next by Thread: | [PATCH 20/20] xfs: cross-reference the realtime rmapbt, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |