Whamcloud - gitweb
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 e51a154..966e5a9 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 c904333..1c59609 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 76ce465..92eb460 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 29e13f5..c19a289 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 "