Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=3006c68f...
Commit: 3006c68feb0da6f26d00ade419af0b8d3be30ef1
Parent: 3dc6d9035a2972581f0cb442163ffd0e0ee93868
Author: Bob Peterson <rpeterso(a)redhat.com>
AuthorDate: Mon Jul 15 14:01:16 2013 -0500
Committer: Bob Peterson <rpeterso(a)redhat.com>
CommitterDate: Wed Jul 17 07:31:36 2013 -0500
fsck.gfs2: Fix infinite loop in pass1b caused by duplicates in hash table
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 files 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