]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
Fix up xfs_repair aborting if it finds an inode with an invalid inode type.
authorBarry Naujok <bnaujok@sgi.com>
Thu, 30 Nov 2006 14:47:23 +0000 (14:47 +0000)
committerBarry Naujok <bnaujok@sgi.com>
Thu, 30 Nov 2006 14:47:23 +0000 (14:47 +0000)
Merge of master-melb:xfs-cmds:27589a by kenmcd.

doc/CHANGES
repair/dinode.c

index f9b5e700ca92f972e0fb6d651b5401845debc2c0..a2d2708937d1aa060dbd80fab7a1e389b4e3a99a 100644 (file)
@@ -1,6 +1,8 @@
 xfsprogs-2.8.x
-       - Fix up libxfs initialisation with bad filesystem.
-         Thanks to Utako Kuzaka <utako@tnes.co.jp> for this.
+       - Fix up libxfs SEGV when attempting to mount a non-XFS filesystem.
+         Thanks to Utako Kuzaka <utako@tnes.nec.co.jp> for this.
+       - Fix up xfs_repair aborting if it finds an inode with an invalid 
+         inode type.
 
 xfsprogs-2.8.16 (30 October 2006)
        - Fix up an endian problem for nlink setting in phase 7 for xfs_repair.
@@ -12,7 +14,7 @@ xfsprogs-2.8.15 (19 October 2006)
        
 xfsprogs-2.8.14 (6 October 2006)
        - Fix up the ring command in xfs_db,
-         Thanks to Utako Kuzaka <utako@tnes.co.jp> for this.
+         Thanks to Utako Kuzaka <utako@tnes.nec.co.jp> for this.
        - Set the blocksize on the device to the given sector
          size which is _not_ necessarily 512 bytes;
          idea suggested by Shailendra Tripathi.
index c4648f24045a90fb5c8617671f8a8ee0718d705d..b237319782d88baaf0bc5daf3975cda9a3a9ae62 100644 (file)
@@ -2060,11 +2060,21 @@ process_dinode_int(xfs_mount_t *mp,
                type = XR_INO_FIFO;
                break;
        default:
-               type = XR_INO_UNKNOWN;
-               do_warn(_("Unexpected inode type %#o inode %llu\n"),
-                       (int) (INT_GET(dinoc->di_mode, ARCH_CONVERT) & S_IFMT), lino);
-               abort();
-               break;
+               retval++;
+               if (!verify_mode)  {
+                       do_warn(_("bad inode type %#o inode %llu\n"),
+                               (int) (INT_GET(dinoc->di_mode, ARCH_CONVERT) & S_IFMT), lino);
+                       if (!no_modify)  
+                               *dirty += clear_dinode(mp, dino, lino);
+                       else 
+                               *dirty = 1;
+                       *cleared = 1;
+                       *used = is_free;
+               } else if (!uncertain)  {
+                       do_warn(_("bad inode type %#o inode %llu\n"),
+                               (int) (INT_GET(dinoc->di_mode, ARCH_CONVERT) & S_IFMT), lino);
+               }
+               return 1;
        }
 
        /*