Ted,

I think this is a small buglet in e2fsck: if a file has multiple hard links, e2fsck pass1c search_dirent_proc() doesn't maintain its count properly and may return DIRENT_ABORT before it has found containing directories for all inodes sharing blocks.

Signed-off-by: Jim Garlick <[EMAIL PROTECTED]>

Index: e2fsprogs+chaos/e2fsck/pass1b.c
===================================================================
--- e2fsprogs+chaos.orig/e2fsck/pass1b.c
+++ e2fsprogs+chaos/e2fsck/pass1b.c
@@ -372,8 +372,10 @@ static int search_dirent_proc(ext2_ino_t
        if (!n)
                return 0;
        p = (struct dup_inode *) dnode_get(n);
-       p->dir = dir;
-       sd->count--;
+       if (!p->dir) {
+               p->dir = dir;
+               sd->count--;
+       }

        return(sd->count ? 0 : DIRENT_ABORT);
 }
-
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to