Whamcloud - gitweb
Merge branch 'maint' into next
[tools/e2fsprogs.git] / e2fsck / unix.c
index 628faeb..c1d5b62 100644 (file)
@@ -1161,7 +1161,14 @@ check_error:
                        ext2fs_mmp_clear(fs);
                        retval = 0;
                }
-       }
+       } else if (retval == EXT2_ET_MMP_CSUM_INVALID) {
+               if (fix_problem(ctx, PR_0_MMP_CSUM_INVALID, &pctx)) {
+                       ext2fs_mmp_clear(fs);
+                       retval = 0;
+               }
+       } else
+               com_err(ctx->program_name, retval, "%s",
+                       _("while reading MMP block"));
        return retval;
 }
 
@@ -1280,6 +1287,7 @@ restart:
        if (!ctx->superblock && !(ctx->options & E2F_OPT_PREEN) &&
            !(ctx->flags & E2F_FLAG_SB_SPECIFIED) &&
            ((retval == EXT2_ET_BAD_MAGIC) ||
+            (retval == EXT2_ET_SB_CSUM_INVALID) ||
             (retval == EXT2_ET_CORRUPT_SUPERBLOCK) ||
             ((retval == 0) && (retval2 = ext2fs_check_desc(fs))))) {
                if (retval) {