ext2fs_blocks_count(ctx->fs->super))
problem = PR_1_EXTENT_ENDS_BEYOND;
+ /* Corrupt but passes checks? Ask to fix checksum. */
+ if (failed_csum) {
+ pctx->blk = extent.e_pblk;
+ pctx->blk2 = extent.e_lblk;
+ pctx->num = extent.e_len;
+ problem = 0;
+ if (fix_problem(ctx, PR_1_EXTENT_ONLY_CSUM_INVALID,
+ pctx))
+ ext2fs_extent_replace(ehandle, 0, &extent);
+ }
+
if (problem) {
- report_problem:
+ report_problem:
pctx->blk = extent.e_pblk;
pctx->blk2 = extent.e_lblk;
pctx->num = extent.e_len;
N_("@i %i has zero length extent\n\t(@n logical @b %c, physical @b %b)\n"),
PROMPT_CLEAR, 0 },
+ /* inode checksum does not match inode */
+ { PR_1_INODE_CSUM_INVALID,
+ N_("@i %i checksum does not match @i. "),
+ PROMPT_CLEAR, PR_PREEN_OK },
+
+ /* inode passes checks, but checksum does not match inode */
+ { PR_1_INODE_ONLY_CSUM_INVALID,
+ N_("@i %i passes checks, but checksum does not match @i. "),
+ PROMPT_FIX, PR_PREEN_OK },
+
+ /* Inode extent block checksum does not match extent */
+ { PR_1_EXTENT_CSUM_INVALID,
+ N_("@i %i extent block checksum does not match extent\n\t(logical @b "
+ "%c, @n physical @b %b, len %N)\n"),
+ PROMPT_CLEAR, 0 },
+
+ /*
+ * Inode extent block passes checks, but checksum does not match
+ * extent
+ */
+ { PR_1_EXTENT_ONLY_CSUM_INVALID,
+ N_("@i %i extent block passes checks, but checksum does not match "
+ "extent\n\t(logical @b %c, @n physical @b %b, len %N)\n"),
+ PROMPT_FIX, 0 },
+
+ /* Extended attribute block checksum for inode does not match. */
+ { PR_1_EA_BLOCK_CSUM_INVALID,
+ N_("Extended attribute @a @b %b checksum for @i %i does not "
+ "match. "),
+ PROMPT_CLEAR, 0 },
+
+ /*
+ * Extended attribute block passes checks, but checksum for inode does
+ * not match.
+ */
+ { PR_1_EA_BLOCK_ONLY_CSUM_INVALID,
+ N_("Extended attribute @a @b %b passes checks, but checksum for "
+ "@i %i does not match. "),
+ PROMPT_FIX, 0 },
+
+ /*
+ * Interior extent node logical offset doesn't match first node below it
+ */
+ { PR_1_EXTENT_INDEX_START_INVALID,
+ N_("Interior @x node level %N of @i %i:\n"
+ "Logical start %b does not match logical start %c at next level. "),
+ PROMPT_FIX, 0 },
+
/* Pass 1b errors */
/* Pass 1B: Rescan for duplicate/bad blocks */
/* Extent has zero length */
#define PR_1_EXTENT_LENGTH_ZERO 0x010066
+/* inode checksum does not match inode */
+#define PR_1_INODE_CSUM_INVALID 0x010067
+
+/* inode passes checks, but checksum does not match inode */
+#define PR_1_INODE_ONLY_CSUM_INVALID 0x010068
+
+/* extent block checksum does not match extent block */
+#define PR_1_EXTENT_CSUM_INVALID 0x010069
+
+/* extent block passes checks, but checksum does not match extent block */
+#define PR_1_EXTENT_ONLY_CSUM_INVALID 0x01006A
+
+/* ea block checksum invalid */
+#define PR_1_EA_BLOCK_CSUM_INVALID 0x01006B
+
+/* ea block passes checks, but checksum invalid */
+#define PR_1_EA_BLOCK_ONLY_CSUM_INVALID 0x01006C
+
+ /* Index start doesn't match start of next extent down */
+ #define PR_1_EXTENT_INDEX_START_INVALID 0x01006D
/*
* Pass 1b errors