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.
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
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,
/* 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,
/* 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