From: Eric Sandeen <sandeen@sandeen.net>
To: Eric Sandeen <sandeen@redhat.com>, xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH 4/4] xfs_repair: set *parent if process_dir2_data() fixes root inode's parent
Date: Wed, 04 Mar 2015 15:02:10 -0600 [thread overview]
Message-ID: <54F772D2.2030602@sandeen.net> (raw)
In-Reply-To: <54F77199.8030708@redhat.com>
process_dir2_data() may fix the root dir's parent inode:
"bad .. entry in root directory inode 6912, was 7159: correcting"
But we don't update the *parent passed in in that case; this then leads to
an assert later in process_dir2, because *parent is still the wrong value:
xfs_repair: dir2.c:2039: process_dir2:
Assertion `(ino != mp->m_sb.sb_rootino && ino != *parent) ||
(ino == mp->m_sb.sb_rootino && (ino == *parent || need_root_dotdot == 1))'
failed.
Updating the value of *parent when we fix the parent value resolves this
problem. Do it whether or not we're in no_modify mode.
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---
diff --git a/repair/dir2.c b/repair/dir2.c
index 6b8964d..67cd9d1 100644
--- a/repair/dir2.c
+++ b/repair/dir2.c
@@ -1468,6 +1468,7 @@ _("bad .. entry in root directory inode %" PRIu64 ", was %" PRIu64 ": "),
} else {
do_warn(_("would correct\n"));
}
+ *parent = ino;
}
}
/*
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
next prev parent reply other threads:[~2015-03-04 21:02 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-04 20:56 [PATCH 0/4] xfsprogs: a handful of fixes Eric Sandeen
2015-03-04 20:58 ` [PATCH 1/4] xfs_repair: validate & fix inode CRCs Eric Sandeen
2015-03-09 18:41 ` Carlos Maiolino
2015-03-13 13:20 ` Brian Foster
2015-03-13 22:42 ` Eric Sandeen
2015-03-04 20:59 ` [PATCH 2/4] xfs_repair: clear need_root_dotdot if we rebuild the root dir Eric Sandeen
2015-03-09 18:43 ` Carlos Maiolino
2015-03-04 21:00 ` [PATCH 3/4] xfs_db: show nlink fields for di_version == 3, too Eric Sandeen
2015-03-09 18:49 ` Carlos Maiolino
2015-03-09 20:41 ` Eric Sandeen
2015-03-13 13:20 ` Brian Foster
2015-03-04 21:02 ` Eric Sandeen [this message]
2015-03-09 18:50 ` [PATCH 4/4] xfs_repair: set *parent if process_dir2_data() fixes root inode's parent Carlos Maiolino
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=54F772D2.2030602@sandeen.net \
--to=sandeen@sandeen.net \
--cc=sandeen@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