Lines Matching refs:pctx
72 char *buf, struct problem_context *pctx);
80 struct problem_context pctx; member
124 struct problem_context pctx; in e2fsck_pass2() local
142 clear_problem_context(&cd.pctx); in e2fsck_pass2()
149 fix_problem(ctx, PR_2_PASS_HEADER, &cd.pctx); in e2fsck_pass2()
151 cd.pctx.errcode = e2fsck_setup_icount(ctx, "inode_count", in e2fsck_pass2()
154 if (cd.pctx.errcode) { in e2fsck_pass2()
155 fix_problem(ctx, PR_2_ALLOCATE_ICOUNT, &cd.pctx); in e2fsck_pass2()
184 cd.pctx.errcode = ext2fs_dblist_iterate2(fs->dblist, check_dir_func, in e2fsck_pass2()
194 if (cd.pctx.errcode) { in e2fsck_pass2()
195 fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx); in e2fsck_pass2()
206 clear_problem_context(&pctx); in e2fsck_pass2()
208 pctx.dir = dx_dir->ino; in e2fsck_pass2()
227 pctx.blkcount = b; in e2fsck_pass2()
228 pctx.group = dx_db->parent; in e2fsck_pass2()
232 pctx.blk = dx_db->min_hash; in e2fsck_pass2()
233 pctx.blk2 = dx_db->node_min_hash; in e2fsck_pass2()
235 fix_problem(ctx, code, &pctx); in e2fsck_pass2()
241 pctx.num = dx_dir->depth; in e2fsck_pass2()
243 fix_problem(ctx, code, &pctx); in e2fsck_pass2()
253 pctx.blk = dx_db->max_hash; in e2fsck_pass2()
254 pctx.blk2 = dx_db->node_max_hash; in e2fsck_pass2()
256 fix_problem(ctx, code, &pctx); in e2fsck_pass2()
261 fix_problem(ctx, code, &pctx); in e2fsck_pass2()
265 fix_problem(ctx, code, &pctx); in e2fsck_pass2()
269 if (bad_dir && fix_problem(ctx, PR_2_HTREE_CLEAR, &pctx)) { in e2fsck_pass2()
292 clear_problem_context(&pctx); in e2fsck_pass2()
295 fix_problem(ctx, PR_2_FEATURE_LARGE_FILES, &pctx)) { in e2fsck_pass2()
301 fix_problem(ctx, PR_1_FS_REV_LEVEL, &pctx)) { in e2fsck_pass2()
376 ext2_ino_t ino, struct problem_context *pctx) in check_dot() argument
394 if (fix_problem(ctx, problem, pctx)) { in check_dot()
407 if (fix_problem(ctx, PR_2_BAD_INODE_DOT, pctx)) { in check_dot()
416 fix_problem(ctx, PR_2_SPLIT_DOT, pctx)) { in check_dot()
440 ext2_ino_t ino, struct problem_context *pctx) in check_dotdot() argument
456 if (fix_problem(ctx, problem, pctx)) { in check_dotdot()
475 fix_problem(ctx, PR_2_NO_DIRINFO, pctx); in check_dotdot()
487 struct problem_context *pctx) in check_name() argument
497 fixup = fix_problem(ctx, PR_2_BAD_NAME, pctx); in check_name()
508 struct problem_context *pctx) in encrypted_check_name() argument
511 if (fix_problem(ctx, PR_2_BAD_ENCRYPTED_NAME, pctx)) { in encrypted_check_name()
526 struct problem_context *pctx) in check_filetype() argument
534 !fix_problem(ctx, PR_2_CLEAR_FILETYPE, pctx)) in check_filetype()
556 pctx->num = should_be; in check_filetype()
559 pctx) == 0) in check_filetype()
598 (e2fsck_dir_will_be_rehashed(cd->ctx, cd->pctx.ino) || in parse_int_node()
600 &cd->pctx))) in parse_int_node()
606 (e2fsck_dir_will_be_rehashed(cd->ctx, cd->pctx.ino) || in parse_int_node()
608 &cd->pctx))) in parse_int_node()
628 cd->pctx.num = ext2fs_le16_to_cpu(limit->limit); in parse_int_node()
629 if (fix_problem(cd->ctx, PR_2_HTREE_BAD_LIMIT, &cd->pctx)) in parse_int_node()
633 cd->pctx.num = count; in parse_int_node()
634 if (fix_problem(cd->ctx, PR_2_HTREE_BAD_COUNT, &cd->pctx)) in parse_int_node()
649 cd->pctx.blk = blk; in parse_int_node()
651 &cd->pctx)) in parse_int_node()
656 fix_problem(cd->ctx, PR_2_HTREE_HASH_ORDER, &cd->pctx)) in parse_int_node()
695 clear_htree(cd->ctx, cd->pctx.ino); in parse_int_node()
697 e2fsck_rehash_dir_later(cd->ctx, cd->pctx.ino); in parse_int_node()
817 struct problem_context *pctx, in fix_inline_dir_size() argument
846 pctx)) { in fix_inline_dir_size()
854 pctx)) { in fix_inline_dir_size()
926 struct problem_context pctx; in check_dir_block() local
962 cd->pctx.ino = ino; in check_dir_block()
963 cd->pctx.blk = block_nr; in check_dir_block()
964 cd->pctx.blkcount = db->blockcnt; in check_dir_block()
965 cd->pctx.ino2 = 0; in check_dir_block()
966 cd->pctx.dirent = 0; in check_dir_block()
967 cd->pctx.num = 0; in check_dir_block()
986 if (allocate_dir_block(ctx, db, buf, &cd->pctx)) in check_dir_block()
1008 cd->pctx.errcode = ext2fs_inline_data_get(fs, ino, 0, buf, 0); in check_dir_block()
1009 if (cd->pctx.errcode) in check_dir_block()
1015 cd->pctx.errcode = ext2fs_dirent_swab_in2(fs, in check_dir_block()
1019 if (cd->pctx.errcode) in check_dir_block()
1025 cd->pctx.errcode = ext2fs_dirent_swab_in2(fs, in check_dir_block()
1031 cd->pctx.errcode = ext2fs_read_dir_block4(fs, block_nr, in check_dir_block()
1034 pctx.ino = ino; in check_dir_block()
1035 pctx.num = inline_data_size; in check_dir_block()
1040 fix_problem(ctx, PR_2_BAD_INLINE_DIR_SIZE, &pctx)) { in check_dir_block()
1042 &inline_data_size, &pctx, in check_dir_block()
1049 if (cd->pctx.errcode == EXT2_ET_DIR_CORRUPTED) in check_dir_block()
1050 cd->pctx.errcode = 0; /* We'll handle this ourselves */ in check_dir_block()
1051 else if (cd->pctx.errcode == EXT2_ET_DIR_CSUM_INVALID) { in check_dir_block()
1052 cd->pctx.errcode = 0; /* We'll handle this ourselves */ in check_dir_block()
1055 if (cd->pctx.errcode) { in check_dir_block()
1057 if (!fix_problem(ctx, PR_2_READ_DIRBLOCK, &cd->pctx)) { in check_dir_block()
1069 pctx.dir = ino; in check_dir_block()
1071 &pctx)) { in check_dir_block()
1096 fix_problem(ctx, PR_2_HTREE_BAD_ROOT, &cd->pctx)) { in check_dir_block()
1127 &cd->pctx)) in check_dir_block()
1172 cd->pctx.dirent = dirent; in check_dir_block()
1173 cd->pctx.num = offset; in check_dir_block()
1179 &cd->pctx)) { in check_dir_block()
1246 cd->pctx.dirent = dirent; in check_dir_block()
1247 cd->pctx.num = offset; in check_dir_block()
1251 if (check_dot(ctx, dirent, ino, &cd->pctx)) in check_dir_block()
1254 ret = check_dotdot(ctx, dirent, ino, &cd->pctx); in check_dir_block()
1261 if (fix_problem(ctx, PR_2_LINK_DOT, &cd->pctx)) { in check_dir_block()
1320 if (fix_problem(ctx, problem, &cd->pctx)) { in check_dir_block()
1355 cd->pctx.group = group; in check_dir_block()
1366 pctx.num = dirent->inode; in check_dir_block()
1368 &cd->pctx)){ in check_dir_block()
1379 pctx.num = dirent->inode; in check_dir_block()
1380 if (fix_problem(ctx, PR_2_INOREF_IN_UNUSED, &cd->pctx)){ in check_dir_block()
1405 if (fix_problem(ctx, problem, &cd->pctx)) { in check_dir_block()
1416 if (!encrypted && check_name(ctx, dirent, &cd->pctx)) in check_dir_block()
1420 encrypted_check_name(ctx, dirent, &cd->pctx)) { in check_dir_block()
1425 if (check_filetype(ctx, dirent, ino, &cd->pctx)) in check_dir_block()
1450 cd->pctx.ino = dirent->inode; in check_dir_block()
1451 fix_problem(ctx, PR_2_NO_DIRINFO, &cd->pctx); in check_dir_block()
1455 cd->pctx.ino2 = subdir_parent; in check_dir_block()
1457 &cd->pctx)) { in check_dir_block()
1462 cd->pctx.ino2 = 0; in check_dir_block()
1472 clear_problem_context(&pctx); in check_dir_block()
1473 pctx.ino = ino; in check_dir_block()
1474 pctx.dirent = dirent; in check_dir_block()
1475 fix_problem(ctx, PR_2_REPORT_DUP_DIRENT, &pctx); in check_dir_block()
1518 cd->pctx.dir = cd->pctx.ino; in check_dir_block()
1525 cd->pctx.num = rec_len + offset - max_block_size; in check_dir_block()
1526 if (fix_problem(ctx, PR_2_FINAL_RECLEN, &cd->pctx)) { in check_dir_block()
1527 dirent->rec_len = cd->pctx.num; in check_dir_block()
1555 cd->pctx.errcode = ext2fs_dirent_swab_out2(fs, in check_dir_block()
1560 if (cd->pctx.errcode) in check_dir_block()
1566 cd->pctx.errcode = ext2fs_dirent_swab_out2(fs, in check_dir_block()
1572 if (cd->pctx.errcode && in check_dir_block()
1573 !fix_problem(ctx, PR_2_WRITE_DIRBLOCK, &cd->pctx)) in check_dir_block()
1576 cd->pctx.errcode = in check_dir_block()
1580 cd->pctx.errcode = ext2fs_write_dir_block4(fs, block_nr, in check_dir_block()
1587 if (cd->pctx.errcode) { in check_dir_block()
1589 &cd->pctx)) in check_dir_block()
1599 &cd->pctx)) in check_dir_block()
1653 struct problem_context pctx; in deallocate_inode() local
1658 clear_problem_context(&pctx); in deallocate_inode()
1659 pctx.ino = ino; in deallocate_inode()
1669 pctx.errcode = ext2fs_adjust_ea_refcount3(fs, in deallocate_inode()
1672 if (pctx.errcode == EXT2_ET_BAD_EA_BLOCK_NUM) { in deallocate_inode()
1673 pctx.errcode = 0; in deallocate_inode()
1676 if (pctx.errcode) { in deallocate_inode()
1677 pctx.blk = ext2fs_file_acl_block(fs, &inode); in deallocate_inode()
1678 fix_problem(ctx, PR_2_ADJ_EA_REFCOUNT, &pctx); in deallocate_inode()
1703 pctx.errcode = ext2fs_block_iterate3(fs, ino, 0, block_buf, in deallocate_inode()
1706 if (pctx.errcode) { in deallocate_inode()
1707 fix_problem(ctx, PR_2_DEALLOC_INODE, &pctx); in deallocate_inode()
1740 struct problem_context pctx; in e2fsck_process_bad_inode() local
1745 clear_problem_context(&pctx); in e2fsck_process_bad_inode()
1746 pctx.ino = ino; in e2fsck_process_bad_inode()
1747 pctx.dir = dir; in e2fsck_process_bad_inode()
1748 pctx.inode = &inode; in e2fsck_process_bad_inode()
1752 if (fix_problem(ctx, PR_2_FILE_ACL_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1782 if (fix_problem(ctx, problem, &pctx)) { in e2fsck_process_bad_inode()
1793 if (fix_problem(ctx, PR_2_FADDR_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1809 pctx.num = *frag; in e2fsck_process_bad_inode()
1810 if (fix_problem(ctx, PR_2_FRAG_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1815 pctx.num = 0; in e2fsck_process_bad_inode()
1818 pctx.num = *fsize; in e2fsck_process_bad_inode()
1819 if (fix_problem(ctx, PR_2_FSIZE_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1824 pctx.num = 0; in e2fsck_process_bad_inode()
1830 pctx.num = inode.osd2.linux2.l_i_blocks_hi; in e2fsck_process_bad_inode()
1831 if (fix_problem(ctx, PR_2_BLOCKS_HI_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1840 pctx.num = inode.osd2.linux2.l_i_file_acl_high; in e2fsck_process_bad_inode()
1841 if (fix_problem(ctx, PR_2_I_FILE_ACL_HI_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1851 if (fix_problem(ctx, PR_2_FILE_ACL_BAD, &pctx)) { in e2fsck_process_bad_inode()
1859 if (fix_problem(ctx, PR_2_DIR_SIZE_HIGH_ZERO, &pctx)) { in e2fsck_process_bad_inode()
1882 struct problem_context *pctx) in allocate_dir_block() argument
1889 if (fix_problem(ctx, PR_2_DIRECTORY_HOLE, pctx) == 0) in allocate_dir_block()
1902 pctx->errcode = ext2fs_map_cluster_block(fs, db->ino, &inode, in allocate_dir_block()
1904 if (pctx->errcode || blk == 0) { in allocate_dir_block()
1906 pctx->errcode = ext2fs_new_block2(fs, blk, in allocate_dir_block()
1908 if (pctx->errcode) { in allocate_dir_block()
1909 pctx->str = "ext2fs_new_block"; in allocate_dir_block()
1910 fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx); in allocate_dir_block()
1922 pctx->errcode = ext2fs_new_dir_block(fs, 0, 0, &block); in allocate_dir_block()
1924 pctx->errcode = ext2fs_new_dir_block(fs, db->ino, in allocate_dir_block()
1927 if (pctx->errcode) { in allocate_dir_block()
1928 pctx->str = "ext2fs_new_dir_block"; in allocate_dir_block()
1929 fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx); in allocate_dir_block()
1933 pctx->errcode = ext2fs_write_dir_block4(fs, blk, block, 0, db->ino); in allocate_dir_block()
1935 if (pctx->errcode) { in allocate_dir_block()
1936 pctx->str = "ext2fs_write_dir_block"; in allocate_dir_block()
1937 fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx); in allocate_dir_block()
1946 pctx->errcode = ext2fs_inode_size_set(fs, &inode, in allocate_dir_block()
1948 if (pctx->errcode) { in allocate_dir_block()
1949 pctx->str = "ext2fs_inode_size_set"; in allocate_dir_block()
1950 fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx); in allocate_dir_block()
1960 pctx->errcode = ext2fs_bmap2(fs, db->ino, &inode, 0, BMAP_SET, in allocate_dir_block()
1962 if (pctx->errcode) { in allocate_dir_block()
1963 pctx->str = "ext2fs_block_iterate"; in allocate_dir_block()
1964 fix_problem(ctx, PR_2_ALLOC_DIRBOCK, pctx); in allocate_dir_block()