From: Eryu Guan <eguan@redhat.com>
To: xfs@oss.sgi.com
Cc: Eryu Guan <eguan@redhat.com>
Subject: [PATCH] repair: fix wrong logic when validating node magic number
Date: Thu, 13 Aug 2015 15:01:16 +0800 [thread overview]
Message-ID: <1439449276-1699-1-git-send-email-eguan@redhat.com> (raw)
Magic number is wrong only when != XFS_DA_NODE_MAGIC and
!= XFS_DA3_NODE_MAGIC.
This is triggered by shared/002 when testing 512 block size XFS.
Phase 1 - find and verify superblock...
Phase 2 - using internal log
- scan filesystem freespace and inode maps...
- found root inode chunk
Phase 3 - for each AG...
- scan (but don't clear) agi unlinked lists...
- process known inodes and perform inode discovery...
- agno = 0
bad magic number febe in block 64 (108) for directory inode 35
......
Fix it by changing "||" to "&&".
Signed-off-by: Eryu Guan <eguan@redhat.com>
---
repair/attr_repair.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/repair/attr_repair.c b/repair/attr_repair.c
index 62f80e7..83a07a8 100644
--- a/repair/attr_repair.c
+++ b/repair/attr_repair.c
@@ -570,7 +570,7 @@ verify_da_path(xfs_mount_t *mp,
* entry count, verify level
*/
bad = 0;
- if (nodehdr.magic != XFS_DA_NODE_MAGIC ||
+ if (nodehdr.magic != XFS_DA_NODE_MAGIC &&
nodehdr.magic != XFS_DA3_NODE_MAGIC) {
do_warn(
_("bad magic number %x in block %u (%" PRIu64 ") for directory inode %" PRIu64 "\n"),
--
2.4.3
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next reply other threads:[~2015-08-13 7:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-13 7:01 Eryu Guan [this message]
2015-08-13 7:15 ` [PATCH] repair: fix wrong logic when validating node magic number Eryu Guan
2015-08-27 3:35 ` Zorro Lang
2015-09-01 14:04 ` Brian Foster
2015-09-02 2:19 ` Eryu Guan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1439449276-1699-1-git-send-email-eguan@redhat.com \
--to=eguan@redhat.com \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox