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.
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.
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
--- /dev/null
+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.