Whamcloud - gitweb
.del-ChangeLog~905e7699, image.gz:
authorTheodore Ts'o <tytso@mit.edu>
Sat, 21 Feb 1998 01:41:39 +0000 (01:41 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 21 Feb 1998 01:41:39 +0000 (01:41 +0000)
  Set the immutable flag on the block and character device so that
  e2fsck notices them as bad devices, and offers to fix them.  E2fsck
  currently only checks devices with the immutable flag set, since
  otherwise there might be some false positives --- the kernel doesn't
  always clear the all of i_blocks[n], n>=4, due to a race condition.
ChangeLog, inode.c:
  inode.c (ext2fs_get_next_inode): Always do the check to see if the
   inode table is missing so that we catch the case where the first block
   group is missing.

lib/ext2fs/ChangeLog
lib/ext2fs/inode.c
tests/f_badinode/ChangeLog [new file with mode: 0644]
tests/f_badinode/image.gz

index 454a00f..ddc1f76 100644 (file)
@@ -1,5 +1,9 @@
 1998-02-20  Theodore Y. Ts'o  <tytso@edt.mit.edu>
 
+       * inode.c (ext2fs_get_next_inode): Always do the check to see if the
+               inode table is missing so that we catch the case where the
+               first block group is missing.
+
        * getsize.c, ismounted.c, unix_io.c: #include errno.h since it's
                needed.
 
index cceaa95..0edee7f 100644 (file)
@@ -371,13 +371,18 @@ errcode_t ext2fs_get_next_inode(ext2_inode_scan scan, ino_t *ino,
                retval = get_next_blockgroup(scan);
                if (retval)
                        return retval;
-               if (scan->current_block == 0) {
-                       if (scan->scan_flags & EXT2_SF_SKIP_MISSING_ITABLE) {
-                               goto retry;
-                       } else
-                               return EXT2_ET_MISSING_INODE_TABLE;
-               }
        }
+       /*
+        * This is done outside the above if statement so that the
+        * check can be done for block group #0.
+        */
+       if (scan->current_block == 0) {
+               if (scan->scan_flags & EXT2_SF_SKIP_MISSING_ITABLE) {
+                       goto retry;
+               } else
+                       return EXT2_ET_MISSING_INODE_TABLE;
+       }
+       
 
        /*
         * Have we run out of space in the inode buffer?  If so, we
diff --git a/tests/f_badinode/ChangeLog b/tests/f_badinode/ChangeLog
new file mode 100644 (file)
index 0000000..2edd33f
--- /dev/null
@@ -0,0 +1,8 @@
+1998-02-20  Theodore Y. Ts'o  <tytso@edt.mit.edu>
+
+       * Set the immutable flag on the block and character device so that
+               e2fsck notices them as bad devices, and offers to fix them.
+               E2fsck currently only checks devices with the immutable
+               flag set, since otherwise there might be some false
+               positives --- the kernel doesn't always clear the all of
+               i_blocks[n], n>=4, due to a race condition.
index e399c4b..6beecc8 100644 (file)
Binary files a/tests/f_badinode/image.gz and b/tests/f_badinode/image.gz differ