]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, super.c:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 13 Dec 2000 18:50:22 +0000 (18:50 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 13 Dec 2000 18:50:22 +0000 (18:50 +0000)
  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.)

e2fsck/ChangeLog
e2fsck/journal.c
e2fsck/super.c
e2fsck/unix.c

index e51a154cb4f01662290c6627d237c082916d388d..966e5a978eb8ac9ac0ddf460ea81b97481a89a3b 100644 (file)
@@ -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.
index c9043334fc889ab573f61d9b692d018bdde63cf0..1c596095c049c76d372a959322d5dc2641639a10 100644 (file)
@@ -465,6 +465,10 @@ static void e2fsck_journal_release(e2fsck_t ctx, journal_t *journal, int reset)
        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 e2fsck_check_ext3_journal(e2fsck_t ctx)
        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;
index 76ce46578fd3c334f9f272179a3d022827bad554..92eb4604faa851200a9286cf80ee38dba6072853 100644 (file)
@@ -244,7 +244,7 @@ static int release_orphan_inodes(e2fsck_t ctx)
        }
 
        block_buf = (char *) e2fsck_allocate_memory(ctx, fs->blocksize * 4,
-                                                   "block interate buffer");
+                                                   "block iterate buffer");
        e2fsck_read_bitmaps(ctx);
        
        while (ino) {
index 29e13f549e476140f0dd55c13c86921da0b5beb5..c19a289515c2462cebc294782d5136e43de9833d 100644 (file)
@@ -795,8 +795,7 @@ restart:
                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 @@ restart:
                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 "