From: Theodore Ts'o Date: Thu, 9 Jan 2014 17:25:37 +0000 (-0500) Subject: Merge branch 'maint' into next X-Git-Tag: v1.43-WIP-2015-05-18~361 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=bc82f39437922f50d5f2846656458e50d65d2dc4;p=tools%2Fe2fsprogs.git Merge branch 'maint' into next Conflicts: e2fsck/pass1.c lib/ext2fs/csum.c --- bc82f39437922f50d5f2846656458e50d65d2dc4 diff --cc e2fsck/pass1.c index bd89b96,38b221c..7554f4e --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@@ -778,11 -735,10 +774,11 @@@ void e2fsck_pass1(e2fsck_t ctx ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino); continue; } - if (pctx.errcode) { + if (pctx.errcode && + pctx.errcode != EXT2_ET_INODE_CSUM_INVALID) { fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx); ctx->flags |= E2F_FLAG_ABORT; - return; + goto endit; } if (!ino) break; @@@ -1193,22 -1141,8 +1189,22 @@@ } else check_blocks(ctx, &pctx, block_buf); + /* + * If the inode failed the checksum and the user didn't + * clear the inode, test the checksum again -- if it still + * fails, ask the user if the checksum should be corrected. + */ + if (failed_csum) { + pctx.errcode = recheck_bad_inode_checksum(fs, ino, ctx, + &pctx); + if (pctx.errcode) { + ctx->flags |= E2F_FLAG_ABORT; + return; + } + } + if (ctx->flags & E2F_FLAG_SIGNAL_MASK) - return; + goto endit; if (process_inode_count >= ctx->process_inode_size) { process_inodes(ctx, block_buf); @@@ -1295,16 -1230,15 +1292,21 @@@ endit: e2fsck_use_inode_shortcuts(ctx, 0); - ext2fs_free_mem(&block_buf); - ext2fs_free_mem(&inode); + if (scan) + ext2fs_close_inode_scan(scan); + if (block_buf) + ext2fs_free_mem(&block_buf); + if (inode) + ext2fs_free_mem(&inode); + /* + * The l+f inode may have been cleared, so zap it now and + * later passes will recalculate it if necessary + */ + ctx->lost_and_found = 0; + - print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io); + if ((ctx->flags & E2F_FLAG_SIGNAL_MASK) == 0) + print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io); } /*