while ((pctx->errcode == 0 ||
pctx->errcode == EXT2_ET_EXTENT_CSUM_INVALID) &&
info.num_entries-- > 0) {
+ __u16 badness;
+
+ if (ctx->inode_badness &&
+ !ext2fs_icount_fetch(ctx->inode_badness,
+ pb->ino, &badness) &&
+ badness > ctx->inode_badness_threshold) {
+ log_out(ctx, "Inode %lu is badly corrupt, skipping block check\n",
+ pb->ino);
+ return;
+ }
+
is_leaf = extent.e_flags & EXT2_EXTENT_FLAGS_LEAF;
is_dir = LINUX_S_ISDIR(pctx->inode->i_mode);
last_lblk = extent.e_lblk + extent.e_len - 1;
int ret_code = 0;
problem_t problem = 0;
e2fsck_t ctx;
+ __u16 badness;
p = (struct process_block_struct *) priv_data;
pctx = p->pctx;
if (blk == 0)
return 0;
+ if (ctx->inode_badness &&
+ !ext2fs_icount_fetch(ctx->inode_badness, p->ino, &badness) &&
+ badness > ctx->inode_badness_threshold) {
+ log_out(ctx, "Inode %lu is badly corrupt, skipping block check\n",
+ p->ino);
+ return BLOCK_ABORT;
+ }
+
#if 0
printf("Process_block, inode %lu, block %u, #%d\n", p->ino, blk,
blockcnt);
--- /dev/null
+Pass 1: Checking inodes, blocks, and sizes
+process_block: increase inode 12 badness 0 to 2 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+process_block: increase inode 12 badness 2 to 4 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+process_block: increase inode 12 badness 4 to 6 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+process_block: increase inode 12 badness 6 to 8 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+process_block: increase inode 12 badness 8 to 10 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+process_block: increase inode 12 badness 10 to 12 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+process_block: increase inode 12 badness 12 to 14 for 10071
+Inode 12 block 104 conflicts with critical metadata, skipping block checks.
+Inode 12 is badly corrupt, skipping block check
+check_blocks: increase inode 12 badness 14 to 15 for 1000d
+Inode 12, i_blocks is 2, should be 16. Fix? yes
+
+Inode 12 is badly corrupt (badness value = 15). Clear? yes
+
+Restarting e2fsck from the beginning...
+Pass 1: Checking inodes, blocks, and sizes
+Pass 2: Checking directory structure
+Entry 'testfile' in / (2) has deleted/unused inode 12. Clear? yes
+
+Pass 3: Checking directory connectivity
+Pass 4: Checking reference counts
+Pass 5: Checking group summary information
+Block bitmap differences: -2651
+Fix? yes
+
+Free blocks count wrong for group #0 (5541, counted=5542).
+Fix? yes
+
+Free blocks count wrong (13153, counted=13154).
+Fix? yes
+
+Inode bitmap differences: -12
+Fix? yes
+
+Free inodes count wrong for group #0 (2036, counted=2037).
+Fix? yes
+
+Free inodes count wrong (4084, counted=4085).
+Fix? yes
+
+
+test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
+test_filesys: 11/4096 files (0.0% non-contiguous), 3230/16384 blocks
+Exit status is 1