cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Bob Peterson <rpeterso@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] [gfs2-utils PATCH 4/7] fsck.gfs2: Fix infinite loop in pass1b caused by duplicates in hash table
Date: Tue, 16 Jul 2013 07:56:11 -0500	[thread overview]
Message-ID: <5fa61580f2f40e76d04e09589321f04e9abde40c.1373979296.git.rpeterso@redhat.com> (raw)
In-Reply-To: <08b2ef646a21c19d0cdd1212fe8d4b4a8d7ee2b2.1373979296.git.rpeterso@redhat.com>

If directory leaf blocks appeared more than once in a directory hash
table, the duplicate references would be flagged as a duplicate,
but since the duplicates were all from the same directory dinode,
pass1b would not realize it needed to stop. This patch changes the
criteria for duplicate processing so that it stops when the references
are down to a single dinode, not a single reference. This allows
it to get beyond pass1b so that the problem can be fixed by the hash
table checking code in pass2.

rhbz#984085
---
 gfs2/fsck/pass1b.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/gfs2/fsck/pass1b.c b/gfs2/fsck/pass1b.c
index 0dcb306..e3da20a 100644
--- a/gfs2/fsck/pass1b.c
+++ b/gfs2/fsck/pass1b.c
@@ -368,11 +368,11 @@ static int handle_dup_blk(struct gfs2_sbd *sdp, struct duptree *dt)
 	/* If there's still a last remaining reference, and it's a valid
 	   reference, use it to determine the correct block type for our
 	   blockmap and bitmap. */
-	if (dh.ref_count == 1 && !osi_list_empty(&dt->ref_inode_list)) {
+	if (dh.ref_inode_count == 1 && !osi_list_empty(&dt->ref_inode_list)) {
 		uint8_t q;
 
 		log_notice( _("Block %llu (0x%llx) has only one remaining "
-			      "valid reference.\n"),
+			      "valid inode referencing it.\n"),
 			    (unsigned long long)dup_blk,
 			    (unsigned long long)dup_blk);
 		/* If we're down to a single reference (and not all references
-- 
1.8.3.1



  parent reply	other threads:[~2013-07-16 12:56 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-16 12:56 [Cluster-devel] [gfs2-utils PATCH 1/7] fsck.gfs2: Fix reference to uninitialized variable Bob Peterson
2013-07-16 12:56 ` [Cluster-devel] [gfs2-utils PATCH 2/7] fsck.gfs2: fix some log messages Bob Peterson
2013-07-16 12:56 ` [Cluster-devel] [gfs2-utils PATCH 3/7] fsck.gfs2: Fix directory link on relocated directory dirents Bob Peterson
2013-07-16 12:56 ` Bob Peterson [this message]
2013-07-16 12:56 ` [Cluster-devel] [gfs2-utils PATCH 5/7] fsck.gfs2: don't check newly created lost+found in pass2 Bob Peterson
2013-07-16 16:52   ` Andrew Price
2013-07-16 17:14     ` Bob Peterson
2013-07-16 12:56 ` [Cluster-devel] [gfs2-utils PATCH 6/7] fsck.gfs2: avoid negative number in leaf depth Bob Peterson
2013-07-16 12:56 ` [Cluster-devel] [gfs2-utils PATCH 7/7] fsck.gfs2: Detect and fix duplicate references in hash tables Bob Peterson
2013-07-16 16:52   ` Andrew Price
2013-07-16 17:16     ` Bob Peterson
2013-07-17  5:30 ` [Cluster-devel] [gfs2-utils PATCH 1/7] fsck.gfs2: Fix reference to uninitialized variable Fabio M. Di Nitto
2013-07-17  7:53   ` Steven Whitehouse
2013-07-17 11:51     ` [Cluster-devel] [PATCH] fsck.gfs2: Don't rely on cluster.conf when rebuilding sb Andrew Price
2013-07-17 11:52       ` Steven Whitehouse
2013-07-17 12:27       ` Bob Peterson
2013-07-17 18:13       ` Fabio M. Di Nitto
2013-07-17 18:26         ` Bob Peterson

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=5fa61580f2f40e76d04e09589321f04e9abde40c.1373979296.git.rpeterso@redhat.com \
    --to=rpeterso@redhat.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;
as well as URLs for NNTP newsgroup(s).