]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
ChangeLog, journal.c, problem.c, problem.h:
authorTheodore Ts'o <tytso@mit.edu>
Sat, 2 Jun 2001 00:38:40 +0000 (00:38 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 2 Jun 2001 00:38:40 +0000 (00:38 +0000)
  problem.c, problem.h: Change PR_0_JOURNAL_UNSUPP_INCOMPAT and
   PR_0_JOURNAL_UNSUPP_ROCOMPAT so they aren't fatal errors, but prompt
   to see if the user should abort.  Removed the
   PR_0_JOURNAL_RESET_COMPAT problem code.
  journal.c (e2fsck_journal_load): If there are incompatible journal
   flags, just return an error code.
   (e2fsck_check_ext3_journal): If e2fsck_journal_load returns an error
   code indicating that there are incompatible journal flag, check to see
   if we should abort, and then offer to clear the journal.

e2fsck/ChangeLog
e2fsck/journal.c
e2fsck/problem.c
e2fsck/problem.h

index cf515ea6ac34118d453342b6e6ae7acce48812d6..c46f4c32e7c7466068ae7f2558e06fdbcdcea540 100644 (file)
@@ -1,5 +1,17 @@
 2001-06-01  Theodore Tso  <tytso@valinux.com>
 
+       * problem.c, problem.h: Change PR_0_JOURNAL_UNSUPP_INCOMPAT and
+               PR_0_JOURNAL_UNSUPP_ROCOMPAT so they aren't fatal errors,
+               but prompt to see if the user should abort.  Removed the
+               PR_0_JOURNAL_RESET_COMPAT problem code.
+
+       * journal.c (e2fsck_journal_load): If there are incompatible
+               journal flags, just return an error code.
+               (e2fsck_check_ext3_journal): If e2fsck_journal_load
+               returns an error code indicating that there are
+               incompatible journal flag, check to see if we should
+               abort, and then offer to clear the journal.
+
        * Makefile.in: Move include/asm/types.h.in to
                lib/ext2fs/ext2_fs.h.in.
 
index 62df20da5e6a5e7e569502c7e451d157fe73b8fa..dbfa1186a219d816601a97f7d5f7baf805e7780d 100644 (file)
@@ -350,19 +350,11 @@ static errcode_t e2fsck_journal_load(journal_t *journal)
                return EXT2_ET_JOURNAL_UNSUPP_VERSION;
        }
 
-       if (JFS_HAS_INCOMPAT_FEATURE(journal, ~JFS_KNOWN_INCOMPAT_FEATURES)) {
-               if (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_INCOMPAT, &pctx))
-                       return EXT2_ET_UNSUPP_FEATURE;
-               journal->j_superblock->s_feature_incompat &=
-                       JFS_KNOWN_INCOMPAT_FEATURES;
-       }
+       if (JFS_HAS_INCOMPAT_FEATURE(journal, ~JFS_KNOWN_INCOMPAT_FEATURES))
+               return EXT2_ET_UNSUPP_FEATURE;
        
-       if (JFS_HAS_RO_COMPAT_FEATURE(journal, ~JFS_KNOWN_ROCOMPAT_FEATURES)) {
-               if (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_ROCOMPAT, &pctx))
-                       return EXT2_ET_RO_UNSUPP_FEATURE;
-               journal->j_superblock->s_feature_ro_compat &=
-                       JFS_KNOWN_ROCOMPAT_FEATURES;
-       }
+       if (JFS_HAS_RO_COMPAT_FEATURE(journal, ~JFS_KNOWN_ROCOMPAT_FEATURES))
+               return EXT2_ET_RO_UNSUPP_FEATURE;
 
        /* We have now checked whether we know enough about the journal
         * format to be able to proceed safely, so any other checks that
@@ -515,6 +507,12 @@ int e2fsck_check_ext3_journal(e2fsck_t ctx)
        retval = e2fsck_journal_load(journal);
        if (retval) {
                if ((retval == EXT2_ET_CORRUPT_SUPERBLOCK) ||
+                   ((retval == EXT2_ET_UNSUPP_FEATURE) &&
+                   (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_INCOMPAT,
+                                 &pctx))) ||
+                   ((retval == EXT2_ET_RO_UNSUPP_FEATURE) &&
+                   (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_ROCOMPAT,
+                                 &pctx))) ||
                    ((retval == EXT2_ET_JOURNAL_UNSUPP_VERSION) &&
                    (!fix_problem(ctx, PR_0_JOURNAL_UNSUPP_VERSION, &pctx))))
                        retval = e2fsck_journal_fix_corrupt_super(ctx, journal,
index 8c1236050e140f6e8f4242fd05e9e0226047d396..fef814cff3dd0f3a95c2f1544a45ed210be2222c 100644 (file)
@@ -265,17 +265,12 @@ static const struct e2fsck_problem problem_table[] = {
        /* Journal superblock has an unknown read-only feature flag set */
        { PR_0_JOURNAL_UNSUPP_ROCOMPAT,
          N_("Ext3 @j @S has an unknown read-only feature flag set.\n"),
-         PROMPT_NONE, PR_FATAL, PR_0_JOURNAL_RESET_COMPAT },
+         PROMPT_ABORT, 0 },
 
        /* Journal superblock has an unknown incompatible feature flag set */
        { PR_0_JOURNAL_UNSUPP_INCOMPAT,
          N_("Ext3 @j @S has an unknown incompatible feature flag set.\n"),
-         PROMPT_NONE, PR_FATAL, PR_0_JOURNAL_RESET_COMPAT },
-
-       /* Journal superblock has an unknown feature flag set */
-       { PR_0_JOURNAL_RESET_COMPAT,
-         N_("Ext3 @j @S has bad feature flag(s) set.\n"),
-         PROMPT_CLEAR, PR_PREEN_OK|PR_PREEN_NOMSG },
+         PROMPT_ABORT, 0 },
 
        /* Journal has unsupported version number */
        { PR_0_JOURNAL_UNSUPP_VERSION,
index 180631467acb8ba55eea867e684732635a819e1f..b0b6d78f76f33b294614da8de54dd903512e2a57 100644 (file)
@@ -152,11 +152,8 @@ struct problem_context {
 /* Journal has unsupported incompatible feature - abort */
 #define PR_0_JOURNAL_UNSUPP_INCOMPAT           0x000026
 
-/* Journal has unsupported feature - reset */
-#define PR_0_JOURNAL_RESET_COMPAT              0x000027
-
 /* Journal has unsupported version number */
-#define PR_0_JOURNAL_UNSUPP_VERSION            0x000028
+#define PR_0_JOURNAL_UNSUPP_VERSION            0x000027
 
 /*
  * Pass 1 errors