[prev in list] [next in list] [prev in thread] [next in thread]
List: linux-xfs
Subject: [PATCH 33/52] xfs_db: implement check for rt superblocks
From: "Darrick J. Wong" <djwong () kernel ! org>
Date: 2023-12-31 23:56:10
Message-ID: 170405012607.1811243.2083492752605436904.stgit () frogsfrogsfrogs
[Download RAW message or body]
From: Darrick J. Wong <djwong@kernel.org>
Implement the bare minimum needed to avoid xfs_check regressions when
realtime groups are enabled.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
db/check.c | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)
diff --git a/db/check.c b/db/check.c
index 0c29c38eee0..7d0687a9db7 100644
--- a/db/check.c
+++ b/db/check.c
@@ -56,6 +56,7 @@ typedef enum {
DBM_BTREFC,
DBM_RLDATA,
DBM_COWDATA,
+ DBM_RTSB,
DBM_NDBM
} dbm_t;
@@ -187,6 +188,7 @@ static const char *typename[] = {
"btrefcnt",
"rldata",
"cowdata",
+ "rtsb",
NULL
};
@@ -809,6 +811,23 @@ blockfree_f(
return 0;
}
+static void
+rtgroups_init(
+ struct xfs_mount *mp)
+{
+ xfs_rgnumber_t rgno;
+
+ if (!xfs_has_rtgroups(mp))
+ return;
+
+ for (rgno = 0; rgno < mp->m_sb.sb_rgcount; rgno++) {
+ xfs_rtblock_t rtbno;
+
+ rtbno = xfs_rgbno_to_rtb(mp, rgno, 0);
+ set_rdbmap(rtbno, mp->m_sb.sb_rextsize, DBM_RTSB);
+ }
+}
+
/*
* Check consistency of xfs filesystem contents.
*/
@@ -843,6 +862,7 @@ blockget_f(
"filesystem.\n"));
}
}
+ rtgroups_init(mp);
if (blist_size) {
xfree(blist);
blist = NULL;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic