| To: | david@xxxxxxxxxxxxx, darrick.wong@xxxxxxxxxx |
|---|---|
| Subject: | [PATCH 068/145] xfs_repair: check for impossible rmap record field combinations |
| From: | "Darrick J. Wong" <darrick.wong@xxxxxxxxxx> |
| Date: | Thu, 16 Jun 2016 18:37:57 -0700 |
| Cc: | xfs@xxxxxxxxxxx |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <146612704434.16048.12932915166928562654.stgit@xxxxxxxxxxxxxxxx> |
| References: | <146612704434.16048.12932915166928562654.stgit@xxxxxxxxxxxxxxxx> |
| User-agent: | StGit/0.17.1-dirty |
Make sure there are no records or keys with impossible field
combinations, such as non-inode records with offsets or flags.
Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>
---
repair/scan.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/repair/scan.c b/repair/scan.c
index d72b257..ec41ba6 100644
--- a/repair/scan.c
+++ b/repair/scan.c
@@ -926,6 +926,18 @@ _("%s rmap btree block claimed (state %d), agno %d, bno
%d, suspect %d\n"),
_("invalid owner in rmap btree record %d (%"PRId64" %u) block %u/%u\n"),
i, owner, len, agno, bno);
+ /* Look for impossible record field combinations. */
+ if (XFS_RMAP_NON_INODE_OWNER(key.rm_owner)) {
+ if (key.rm_flags)
+ do_warn(
+ _("record %d of block (%u/%u) in %s btree cannot have non-inode owner
with flags\n"),
+ i, agno, bno, name);
+ if (key.rm_offset)
+ do_warn(
+ _("record %d of block (%u/%u) in %s btree cannot have non-inode owner
with offset\n"),
+ i, agno, bno, name);
+ }
+
/* Check for out of order records. */
if (i == 0) {
advance:
|
| Previous by Date: | [PATCH 067/145] xfs_repair: look for mergeable rmaps, Darrick J. Wong |
|---|---|
| Next by Date: | [PATCH 069/145] mkfs: set agsize prior to calculating minimum log size, Darrick J. Wong |
| Previous by Thread: | [PATCH 067/145] xfs_repair: look for mergeable rmaps, Darrick J. Wong |
| Next by Thread: | [PATCH 069/145] mkfs: set agsize prior to calculating minimum log size, Darrick J. Wong |
| Indexes: | [Date] [Thread] [Top] [All Lists] |