@@ -1562,6 +1562,9 @@ static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx,
*/
pctx->blk = blk;
pctx->errcode = ext2fs_read_ext_attr3(fs, blk, block_buf, pctx->ino);
+ if (pctx->errcode == EXT2_ET_EXT_ATTR_CSUM_INVALID &&
+ fix_problem(ctx, PR_1_EA_BLOCK_CSUM_INVALID, pctx))
+ goto clear_extattr;
if (pctx->errcode && fix_problem(ctx, PR_1_READ_EA_BLOCK, pctx))
goto clear_extattr;
header = (struct ext2_ext_attr_header *) block_buf;
@@ -952,6 +952,11 @@ static struct e2fsck_problem problem_table[] = {
"%c, @n physical @b %b, len %N)\n"),
PROMPT_CLEAR, 0 },
+ /* Checksum failure reading extended attribute block */
+ { PR_1_EA_BLOCK_CSUM_INVALID,
+ N_("Extended attribute @a @b %b for @i %i does not match. "),
+ PROMPT_CLEAR, 0 },
+
/* Pass 1b errors */
/* Pass 1B: Rescan for duplicate/bad blocks */
@@ -556,6 +556,9 @@ struct problem_context {
/* extent block checksum does not match extent block */
#define PR_1_EXTENT_CSUM_INVALID 0x010067
+/* ea block checksum invalid */
+#define PR_1_EA_BLOCK_CSUM_INVALID 0x010068
+
/*
* Pass 1b errors
*/
Verify the checksums of separate extended attribute blocks and offer to clear it if there is a mismatch. Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> --- e2fsck/pass1.c | 3 +++ e2fsck/problem.c | 5 +++++ e2fsck/problem.h | 3 +++ 3 files changed, 11 insertions(+), 0 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html