ChangeLog, super.c:
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.)
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index e51a154..966e5a9 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,5 +1,14 @@
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.
diff --git a/e2fsck/journal.c b/e2fsck/journal.c
index c904333..1c59609 100644
--- a/e2fsck/journal.c
+++ b/e2fsck/journal.c
@@ -465,6 +465,10 @@
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;
@@ -475,8 +479,10 @@
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;
diff --git a/e2fsck/super.c b/e2fsck/super.c
index 76ce465..92eb460 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -244,7 +244,7 @@
}
block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
- "block interate buffer");
+ "block iterate buffer");
e2fsck_read_bitmaps(ctx);
while (ino) {
diff --git a/e2fsck/unix.c b/e2fsck/unix.c
index 29e13f5..c19a289 100644
--- a/e2fsck/unix.c
+++ b/e2fsck/unix.c
@@ -795,8 +795,7 @@
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) {
@@ -807,6 +806,10 @@
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 "