Lines Matching refs:pctx
38 struct problem_context pctx; in e2fsck_pass5() local
45 clear_problem_context(&pctx); in e2fsck_pass5()
48 fix_problem(ctx, PR_5_PASS_HEADER, &pctx); in e2fsck_pass5()
86 struct problem_context pctx; in check_inode_bitmap_checksum() local
108 clear_problem_context(&pctx); in check_inode_bitmap_checksum()
122 pctx.group = i; in check_inode_bitmap_checksum()
123 if (!fix_problem(ctx, PR_5_INODE_BITMAP_CSUM_INVALID, &pctx)) in check_inode_bitmap_checksum()
140 struct problem_context pctx; in check_block_bitmap_checksum() local
162 clear_problem_context(&pctx); in check_block_bitmap_checksum()
178 pctx.group = i; in check_block_bitmap_checksum()
179 if (!fix_problem(ctx, PR_5_BLOCK_BITMAP_CSUM_INVALID, &pctx)) in check_block_bitmap_checksum()
272 struct problem_context *pctx) in print_bitmap_problem() argument
276 if (pctx->blk == pctx->blk2) in print_bitmap_problem()
277 pctx->blk2 = 0; in print_bitmap_problem()
282 if (pctx->blk == pctx->blk2) in print_bitmap_problem()
283 pctx->blk2 = 0; in print_bitmap_problem()
288 if (pctx->ino == pctx->ino2) in print_bitmap_problem()
289 pctx->ino2 = 0; in print_bitmap_problem()
294 if (pctx->ino == pctx->ino2) in print_bitmap_problem()
295 pctx->ino2 = 0; in print_bitmap_problem()
300 fix_problem(ctx, problem, pctx); in print_bitmap_problem()
301 pctx->blk = pctx->blk2 = NO_BLK; in print_bitmap_problem()
302 pctx->ino = pctx->ino2 = 0; in print_bitmap_problem()
322 struct problem_context pctx; in check_block_bitmaps() local
334 clear_problem_context(&pctx); in check_block_bitmaps()
342 pctx.num = 1; in check_block_bitmaps()
343 pctx.blk = B2C(fs->super->s_first_data_block); in check_block_bitmaps()
344 pctx.blk2 = B2C(ext2fs_blocks_count(fs->super) - 1); in check_block_bitmaps()
345 pctx.ino = ext2fs_get_block_bitmap_start2(ctx->block_found_map); in check_block_bitmaps()
346 pctx.ino2 = ext2fs_get_block_bitmap_end2(ctx->block_found_map); in check_block_bitmaps()
347 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_block_bitmaps()
357 pctx.num = 2; in check_block_bitmaps()
358 pctx.blk = B2C(fs->super->s_first_data_block); in check_block_bitmaps()
359 pctx.blk2 = B2C(ext2fs_blocks_count(fs->super) - 1); in check_block_bitmaps()
360 pctx.ino = ext2fs_get_block_bitmap_start2(fs->block_map); in check_block_bitmaps()
361 pctx.ino2 = ext2fs_get_block_bitmap_end2(fs->block_map); in check_block_bitmaps()
362 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_block_bitmaps()
371 pctx.blk = pctx.blk2 = NO_BLK; in check_block_bitmaps()
446 if (pctx.blk == NO_BLK) { in check_block_bitmaps()
447 pctx.blk = pctx.blk2 = i; in check_block_bitmaps()
451 (pctx.blk2 == i - EXT2FS_CLUSTER_RATIO(fs))) in check_block_bitmaps()
452 pctx.blk2 += EXT2FS_CLUSTER_RATIO(fs); in check_block_bitmaps()
454 print_bitmap_problem(ctx, save_problem, &pctx); in check_block_bitmaps()
455 pctx.blk = pctx.blk2 = i; in check_block_bitmaps()
503 if (pctx.blk != NO_BLK) in check_block_bitmaps()
504 print_bitmap_problem(ctx, save_problem, &pctx); in check_block_bitmaps()
516 clear_problem_context(&pctx); in check_block_bitmaps()
517 fix_problem(ctx, PR_5_COPY_BBITMAP_ERROR, &pctx); in check_block_bitmaps()
534 pctx.group = g; in check_block_bitmaps()
535 pctx.blk = ext2fs_bg_free_blocks_count(fs, g); in check_block_bitmaps()
536 pctx.blk2 = free_array[g]; in check_block_bitmaps()
539 &pctx)) { in check_block_bitmaps()
548 pctx.group = 0; in check_block_bitmaps()
549 pctx.blk = ext2fs_free_blocks_count(fs->super); in check_block_bitmaps()
550 pctx.blk2 = free_blocks; in check_block_bitmaps()
552 if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT, &pctx)) { in check_block_bitmaps()
576 struct problem_context pctx; in check_inode_bitmaps() local
584 clear_problem_context(&pctx); in check_inode_bitmaps()
594 pctx.num = 3; in check_inode_bitmaps()
595 pctx.blk = 1; in check_inode_bitmaps()
596 pctx.blk2 = fs->super->s_inodes_count; in check_inode_bitmaps()
597 pctx.ino = ext2fs_get_inode_bitmap_start2(ctx->inode_used_map); in check_inode_bitmaps()
598 pctx.ino2 = ext2fs_get_inode_bitmap_end2(ctx->inode_used_map); in check_inode_bitmaps()
599 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_inode_bitmaps()
607 pctx.num = 4; in check_inode_bitmaps()
608 pctx.blk = 1; in check_inode_bitmaps()
609 pctx.blk2 = fs->super->s_inodes_count; in check_inode_bitmaps()
610 pctx.ino = ext2fs_get_inode_bitmap_start2(fs->inode_map); in check_inode_bitmaps()
611 pctx.ino2 = ext2fs_get_inode_bitmap_end2(fs->inode_map); in check_inode_bitmaps()
612 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_inode_bitmaps()
622 pctx.ino = pctx.ino2 = 0; in check_inode_bitmaps()
687 if (pctx.ino == 0) { in check_inode_bitmaps()
688 pctx.ino = pctx.ino2 = i; in check_inode_bitmaps()
692 (pctx.ino2 == i-1)) in check_inode_bitmaps()
693 pctx.ino2++; in check_inode_bitmaps()
695 print_bitmap_problem(ctx, save_problem, &pctx); in check_inode_bitmaps()
696 pctx.ino = pctx.ino2 = i; in check_inode_bitmaps()
766 if (pctx.ino) in check_inode_bitmaps()
767 print_bitmap_problem(ctx, save_problem, &pctx); in check_inode_bitmaps()
780 clear_problem_context(&pctx); in check_inode_bitmaps()
781 fix_problem(ctx, PR_5_COPY_IBITMAP_ERROR, &pctx); in check_inode_bitmaps()
800 pctx.group = i; in check_inode_bitmaps()
801 pctx.ino = ext2fs_bg_free_inodes_count(fs, i); in check_inode_bitmaps()
802 pctx.ino2 = free_array[i]; in check_inode_bitmaps()
804 &pctx)) { in check_inode_bitmaps()
811 pctx.group = i; in check_inode_bitmaps()
812 pctx.ino = ext2fs_bg_used_dirs_count(fs, i); in check_inode_bitmaps()
813 pctx.ino2 = dir_array[i]; in check_inode_bitmaps()
816 &pctx)) { in check_inode_bitmaps()
824 pctx.group = -1; in check_inode_bitmaps()
825 pctx.ino = fs->super->s_free_inodes_count; in check_inode_bitmaps()
826 pctx.ino2 = free_inodes; in check_inode_bitmaps()
828 if (fix_problem(ctx, PR_5_FREE_INODE_COUNT, &pctx)) { in check_inode_bitmaps()
842 struct problem_context pctx; in check_inode_end() local
844 clear_problem_context(&pctx); in check_inode_end()
847 pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map, end, in check_inode_end()
849 if (pctx.errcode) { in check_inode_end()
850 pctx.num = 1; in check_inode_end()
851 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_inode_end()
861 if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx)) { in check_inode_end()
872 pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map, in check_inode_end()
874 if (pctx.errcode) { in check_inode_end()
875 pctx.num = 2; in check_inode_end()
876 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_inode_end()
886 struct problem_context pctx; in check_block_end() local
888 clear_problem_context(&pctx); in check_block_end()
892 pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map, end, in check_block_end()
894 if (pctx.errcode) { in check_block_end()
895 pctx.num = 3; in check_block_end()
896 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_block_end()
907 if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) { in check_block_end()
918 pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map, in check_block_end()
920 if (pctx.errcode) { in check_block_end()
921 pctx.num = 4; in check_block_end()
922 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_block_end()