super.c (release_orphan_inodes): Fix spelling typo in error message.
ChangeLog, unix.c:
unix.c (main): Clarify coments (no code changes)
ChangeLog, journal.c:
journal.c (e2fsck_check_ext3_journal): Check to make sure the journal
fields are consistent if any of the superblock fields are set. (Backs
out erroneous change made by sct, pointed out by Andreas.)
2000-12-13 Theodore Ts'o <tytso@valinux.com>
+ * journal.c (e2fsck_check_ext3_journal): Check to make sure the
+ journal fields are consistent if any of the superblock
+ fields are set. (Backs out erroneous change made by sct,
+ pointed out by Andreas.)
+
+ * unix.c (main): Clarify coments (no code changes)
+
+ * super.c (release_orphan_inodes): Fix spelling typo in error message.
+
* pass1.c (e2fsck_pass1): Offer to update the filesystem revision
level if we need to set large files flag. Patch from
Andreas Dilger.
ext2fs_free_mem((void **)&journal);
}
+/*
+ * This function makes sure that the superblock fields regarding the
+ * journal are consistent.
+ */
int e2fsck_check_ext3_journal(e2fsck_t ctx)
{
struct ext2fs_sb *s = (struct ext2fs_sb *)ctx->fs->super;
int retval;
/* If we don't have any journal features, don't do anything more */
- if (!(s->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL))
- return 0;
+ if (!(s->s_feature_compat & EXT3_FEATURE_COMPAT_HAS_JOURNAL) &&
+ !recover && s->s_journal_inum == 0 && s->s_journal_dev == 0 &&
+ uuid_is_null(s->s_journal_uuid))
+ return 0;
#ifdef JFS_DEBUG
journal_enable_debug = 2;
}
block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
- "block interate buffer");
+ "block iterate buffer");
e2fsck_read_bitmaps(ctx);
while (ino) {
ctx->device_name = ctx->filesystem_name;
/*
- * Check to see if we need to do ext3-style recovery. If so,
- * do it, and then restart the fsck.
+ * Make sure the ext3 superblock fields are consistent.
*/
retval = e2fsck_check_ext3_journal(ctx);
if (retval) {
fatal_error(ctx, 0);
}
+ /*
+ * Check to see if we need to do ext3-style recovery. If so,
+ * do it, and then restart the fsck.
+ */
if (s->s_feature_incompat & EXT3_FEATURE_INCOMPAT_RECOVER) {
if (ctx->options & E2F_OPT_READONLY) {
printf(_("Warning: skipping journal recovery "