Lines Matching refs:pctx
35 struct problem_context pctx; in e2fsck_pass5() local
42 clear_problem_context(&pctx); in e2fsck_pass5()
45 fix_problem(ctx, PR_5_PASS_HEADER, &pctx); in e2fsck_pass5()
154 struct problem_context *pctx) in print_bitmap_problem() argument
158 if (pctx->blk == pctx->blk2) in print_bitmap_problem()
159 pctx->blk2 = 0; in print_bitmap_problem()
164 if (pctx->blk == pctx->blk2) in print_bitmap_problem()
165 pctx->blk2 = 0; in print_bitmap_problem()
170 if (pctx->ino == pctx->ino2) in print_bitmap_problem()
171 pctx->ino2 = 0; in print_bitmap_problem()
176 if (pctx->ino == pctx->ino2) in print_bitmap_problem()
177 pctx->ino2 = 0; in print_bitmap_problem()
182 fix_problem(ctx, problem, pctx); in print_bitmap_problem()
183 pctx->blk = pctx->blk2 = NO_BLK; in print_bitmap_problem()
184 pctx->ino = pctx->ino2 = 0; in print_bitmap_problem()
204 struct problem_context pctx; in check_block_bitmaps() local
222 clear_problem_context(&pctx); in check_block_bitmaps()
230 pctx.num = 1; in check_block_bitmaps()
231 pctx.blk = B2C(fs->super->s_first_data_block); in check_block_bitmaps()
232 pctx.blk2 = B2C(ext2fs_blocks_count(fs->super) - 1); in check_block_bitmaps()
233 pctx.ino = ext2fs_get_block_bitmap_start2(ctx->block_found_map); in check_block_bitmaps()
234 pctx.ino2 = ext2fs_get_block_bitmap_end2(ctx->block_found_map); in check_block_bitmaps()
235 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_block_bitmaps()
245 pctx.num = 2; in check_block_bitmaps()
246 pctx.blk = B2C(fs->super->s_first_data_block); in check_block_bitmaps()
247 pctx.blk2 = B2C(ext2fs_blocks_count(fs->super) - 1); in check_block_bitmaps()
248 pctx.ino = ext2fs_get_block_bitmap_start2(fs->block_map); in check_block_bitmaps()
249 pctx.ino2 = ext2fs_get_block_bitmap_end2(fs->block_map); in check_block_bitmaps()
250 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_block_bitmaps()
261 pctx.blk = pctx.blk2 = NO_BLK; in check_block_bitmaps()
408 if (pctx.blk == NO_BLK) { in check_block_bitmaps()
409 pctx.blk = pctx.blk2 = i; in check_block_bitmaps()
413 (pctx.blk2 == i - EXT2FS_CLUSTER_RATIO(fs))) in check_block_bitmaps()
414 pctx.blk2 += EXT2FS_CLUSTER_RATIO(fs); in check_block_bitmaps()
416 print_bitmap_problem(ctx, save_problem, &pctx); in check_block_bitmaps()
417 pctx.blk = pctx.blk2 = i; in check_block_bitmaps()
471 if (pctx.blk != NO_BLK) in check_block_bitmaps()
472 print_bitmap_problem(ctx, save_problem, &pctx); in check_block_bitmaps()
484 clear_problem_context(&pctx); in check_block_bitmaps()
485 fix_problem(ctx, PR_5_COPY_BBITMAP_ERROR, &pctx); in check_block_bitmaps()
502 pctx.group = g; in check_block_bitmaps()
503 pctx.blk = ext2fs_bg_free_blocks_count(fs, g); in check_block_bitmaps()
504 pctx.blk2 = free_array[g]; in check_block_bitmaps()
507 &pctx)) { in check_block_bitmaps()
516 pctx.group = 0; in check_block_bitmaps()
517 pctx.blk = ext2fs_free_blocks_count(fs->super); in check_block_bitmaps()
518 pctx.blk2 = free_blocks; in check_block_bitmaps()
520 if (fix_problem(ctx, PR_5_FREE_BLOCK_COUNT, &pctx)) { in check_block_bitmaps()
544 struct problem_context pctx; in check_inode_bitmaps() local
552 clear_problem_context(&pctx); in check_inode_bitmaps()
562 pctx.num = 3; in check_inode_bitmaps()
563 pctx.blk = 1; in check_inode_bitmaps()
564 pctx.blk2 = fs->super->s_inodes_count; in check_inode_bitmaps()
565 pctx.ino = ext2fs_get_inode_bitmap_start2(ctx->inode_used_map); in check_inode_bitmaps()
566 pctx.ino2 = ext2fs_get_inode_bitmap_end2(ctx->inode_used_map); in check_inode_bitmaps()
567 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_inode_bitmaps()
575 pctx.num = 4; in check_inode_bitmaps()
576 pctx.blk = 1; in check_inode_bitmaps()
577 pctx.blk2 = fs->super->s_inodes_count; in check_inode_bitmaps()
578 pctx.ino = ext2fs_get_inode_bitmap_start2(fs->inode_map); in check_inode_bitmaps()
579 pctx.ino2 = ext2fs_get_inode_bitmap_end2(fs->inode_map); in check_inode_bitmaps()
580 fix_problem(ctx, PR_5_BMAP_ENDPOINTS, &pctx); in check_inode_bitmaps()
591 pctx.ino = pctx.ino2 = 0; in check_inode_bitmaps()
656 if (pctx.ino == 0) { in check_inode_bitmaps()
657 pctx.ino = pctx.ino2 = i; in check_inode_bitmaps()
661 (pctx.ino2 == i-1)) in check_inode_bitmaps()
662 pctx.ino2++; in check_inode_bitmaps()
664 print_bitmap_problem(ctx, save_problem, &pctx); in check_inode_bitmaps()
665 pctx.ino = pctx.ino2 = i; in check_inode_bitmaps()
735 if (pctx.ino) in check_inode_bitmaps()
736 print_bitmap_problem(ctx, save_problem, &pctx); in check_inode_bitmaps()
749 clear_problem_context(&pctx); in check_inode_bitmaps()
750 fix_problem(ctx, PR_5_COPY_IBITMAP_ERROR, &pctx); in check_inode_bitmaps()
769 pctx.group = i; in check_inode_bitmaps()
770 pctx.ino = ext2fs_bg_free_inodes_count(fs, i); in check_inode_bitmaps()
771 pctx.ino2 = free_array[i]; in check_inode_bitmaps()
773 &pctx)) { in check_inode_bitmaps()
780 pctx.group = i; in check_inode_bitmaps()
781 pctx.ino = ext2fs_bg_used_dirs_count(fs, i); in check_inode_bitmaps()
782 pctx.ino2 = dir_array[i]; in check_inode_bitmaps()
785 &pctx)) { in check_inode_bitmaps()
793 pctx.group = -1; in check_inode_bitmaps()
794 pctx.ino = fs->super->s_free_inodes_count; in check_inode_bitmaps()
795 pctx.ino2 = free_inodes; in check_inode_bitmaps()
797 if (fix_problem(ctx, PR_5_FREE_INODE_COUNT, &pctx)) { in check_inode_bitmaps()
811 struct problem_context pctx; in check_inode_end() local
813 clear_problem_context(&pctx); in check_inode_end()
816 pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map, end, in check_inode_end()
818 if (pctx.errcode) { in check_inode_end()
819 pctx.num = 1; in check_inode_end()
820 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_inode_end()
830 if (fix_problem(ctx, PR_5_INODE_BMAP_PADDING, &pctx)) { in check_inode_end()
841 pctx.errcode = ext2fs_fudge_inode_bitmap_end(fs->inode_map, in check_inode_end()
843 if (pctx.errcode) { in check_inode_end()
844 pctx.num = 2; in check_inode_end()
845 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_inode_end()
855 struct problem_context pctx; in check_block_end() local
857 clear_problem_context(&pctx); in check_block_end()
861 pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map, end, in check_block_end()
863 if (pctx.errcode) { in check_block_end()
864 pctx.num = 3; in check_block_end()
865 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_block_end()
876 if (fix_problem(ctx, PR_5_BLOCK_BMAP_PADDING, &pctx)) { in check_block_end()
887 pctx.errcode = ext2fs_fudge_block_bitmap_end2(fs->block_map, in check_block_end()
889 if (pctx.errcode) { in check_block_end()
890 pctx.num = 4; in check_block_end()
891 fix_problem(ctx, PR_5_FUDGE_BITMAP_ERROR, &pctx); in check_block_end()