]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
fix xfs_repair bug in handling a corrupt root directory inode with multiple "lost...
authorNathan Scott <nathans@sgi.com>
Fri, 28 Sep 2001 00:30:25 +0000 (00:30 +0000)
committerNathan Scott <nathans@sgi.com>
Fri, 28 Sep 2001 00:30:25 +0000 (00:30 +0000)
doc/CHANGES
repair/phase4.c

index 64b436e547b5d13af5c7e3506fa762a1eb5be4a5..3eaed26117bbee2505c5c52d8b5385fd54e791d0 100644 (file)
@@ -1,3 +1,7 @@
+xfsprogs-current
+       - fix xfs_repair bug in handling a corrupt root directory
+         inode with multiple "lost+found" entries
+
 xfsprogs-1.3.8 (19 September 2001)
        - rewrote the LVM support used by mkfs.xfs to call external
          lvdisplay program to get volume geometry (mkp@mkp.net)
index d665b0a0f86adfc59a0f4502a9db542412ba47ae..41103ff8433b9831517d0f3b008c8a3a1e4cc474 100644 (file)
@@ -1019,7 +1019,7 @@ delete_orphanage(xfs_mount_t *mp)
                else
                        res = shortform_delete_orphanage(mp, ino, dino, dbp,
                                &dirty);
-               ASSERT((res == 0 && dirty == 0) || (res == 1 && dirty == 1));
+               ASSERT((res == 0 && dirty == 0) || (res > 0 && dirty == 1));
                break;
        default:
                break;
@@ -1028,12 +1028,12 @@ delete_orphanage(xfs_mount_t *mp)
        if (res)  {
                switch (dino->di_core.di_version)  {
                case XFS_DINODE_VERSION_1:
-                       INT_MOD(dino->di_core.di_onlink, ARCH_CONVERT, -1);
+                       INT_MOD(dino->di_core.di_onlink, ARCH_CONVERT, -res);
                        INT_SET(dino->di_core.di_nlink, ARCH_CONVERT,
                                INT_GET(dino->di_core.di_onlink, ARCH_CONVERT));
                        break;
                case XFS_DINODE_VERSION_2:
-                       INT_MOD(dino->di_core.di_nlink, ARCH_CONVERT, -1);
+                       INT_MOD(dino->di_core.di_nlink, ARCH_CONVERT, -res);
                        break;
                default:
                        do_error("unknown version #%d in root inode\n",