ChangeLog, e2fsck.h, journal.c, problem.c, problem.h, super.c:
super.c (check_super_block): Be more strict on checking
s_r_blocks_count superblock field.
problem.c, problem.h (PR_0_JOURNAL_UNSUPP_ROCOMPAT,
PR_0_JOURNAL_UNSUPP_INCOMPAT, PR_0_JOURNAL_RESET_COMPAT): New problem
codes.
journal.c (e2fsck_journal_load): Use a problem code to report
unsupported feature flags. There is code to clear unsupported flags,
but since this is dangerous, it's not allowed in the problem code
table.
journal.c (e2fsck_journal_reset_super): initialize the journal
sequence number to a random value to avoid recovering bad transactions
from a corrupt journal.
diff --git a/e2fsck/problem.c b/e2fsck/problem.c
index a44f014..2ac545c 100644
--- a/e2fsck/problem.c
+++ b/e2fsck/problem.c
@@ -112,7 +112,7 @@
N_("\nThe @S could not be read or does not describe a correct ext2\n"
"@f. If the @v is valid and it really contains an ext2\n"
"@f (and not swap or ufs or something else), then the @S\n"
- "is corrupt, and you might try running e2fsck with an alternate @S:\n"
+ "is corrupt, and you might try running e2fsck with an alternate @S:\n"
" e2fsck -b %S <@v>\n\n"),
PROMPT_NONE, PR_FATAL },
@@ -200,9 +200,12 @@
PROMPT_CLEAR, PR_PREEN_OK },
/* Journal has an unknown superblock type */
- { PR_0_JOURNAL_UNSUPP_SUPER,
- N_("Ext3 @j @S is unknown type %N (unsupported).\n"),
- PROMPT_ABORT, PR_NO_OK | PR_AFTER_CODE, PR_0_JOURNAL_BAD_SUPER },
+ { PR_0_JOURNAL_UNSUPP_SUPER,
+ N_("Ext3 @j @S is unknown type %N (unsupported).\n"
+ "It is likely that your copy of e2fsck is old and/or doesn't "
+ "support this @j format.\n"
+ "It is also possible the @j @S is corrupt.\n"),
+ PROMPT_ABORT, PR_NO_OK | PR_AFTER_CODE, PR_0_JOURNAL_BAD_SUPER },
/* Journal superblock is corrupt */
{ PR_0_JOURNAL_BAD_SUPER,
@@ -259,6 +262,21 @@
"@f has feature flag(s) set, but is a revision 0 @f. ",
PROMPT_FIX, PR_PREEN_OK | PR_NO_OK },
+ /* 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 },
+
+ /* 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 },
+
/* Pass 1 errors */
/* Pass 1: Checking inodes, blocks, and sizes */