Lines Matching defs:cd
90 struct check_dir_struct cd;
99 clear_problem_context(&cd.pctx);
106 fix_problem(ctx, PR_2_PASS_HEADER, &cd.pctx);
111 cd.pctx.errcode = 0;
113 cd.pctx.errcode = ext2fs_create_icount2(fs,
117 if (cd.pctx.errcode) {
118 fix_problem(ctx, PR_2_ALLOCATE_ICOUNT, &cd.pctx);
132 cd.buf = buf;
133 cd.ctx = ctx;
134 cd.count = 1;
135 cd.max = ext2fs_dblist_count(fs->dblist);
138 (void) (ctx->progress)(ctx, 2, 0, cd.max);
143 cd.pctx.errcode = ext2fs_dblist_iterate(fs->dblist, check_dir_block,
144 &cd);
153 if (cd.pctx.errcode) {
154 fix_problem(ctx, PR_2_DBLIST_ITERATE, &cd.pctx);
521 struct check_dir_struct *cd,
564 cd->pctx.num = ext2fs_le16_to_cpu(limit->limit);
565 if (fix_problem(cd->ctx, PR_2_HTREE_BAD_LIMIT, &cd->pctx))
569 cd->pctx.num = count;
570 if (fix_problem(cd->ctx, PR_2_HTREE_BAD_COUNT, &cd->pctx))
585 cd->pctx.blk = blk;
586 if (fix_problem(cd->ctx, PR_2_HTREE_BADBLK,
587 &cd->pctx))
592 fix_problem(cd->ctx, PR_2_HTREE_HASH_ORDER, &cd->pctx))
626 clear_htree(cd->ctx, cd->pctx.ino);
721 struct check_dir_struct *cd;
732 cd = (struct check_dir_struct *) priv_data;
733 buf = cd->buf;
734 ctx = cd->ctx;
739 if (ctx->progress && (ctx->progress)(ctx, 2, cd->count++, cd->max))
749 cd->pctx.ino = ino;
750 cd->pctx.blk = block_nr;
751 cd->pctx.blkcount = db->blockcnt;
752 cd->pctx.ino2 = 0;
753 cd->pctx.dirent = 0;
754 cd->pctx.num = 0;
757 if (allocate_dir_block(ctx, db, buf, &cd->pctx))
777 cd->pctx.errcode = ext2fs_read_dir_block(fs, block_nr, buf);
779 if (cd->pctx.errcode == EXT2_ET_DIR_CORRUPTED)
780 cd->pctx.errcode = 0; /* We'll handle this ourselves */
781 if (cd->pctx.errcode) {
782 if (!fix_problem(ctx, PR_2_READ_DIRBLOCK, &cd->pctx)) {
817 fix_problem(ctx, PR_2_HTREE_BAD_ROOT, &cd->pctx)) {
847 cd->pctx.dirent = dirent;
848 cd->pctx.num = offset;
853 if (fix_problem(ctx, PR_2_DIR_CORRUPTED, &cd->pctx)) {
861 if (fix_problem(ctx, PR_2_FILENAME_LONG, &cd->pctx)) {
868 if (check_dot(ctx, dirent, ino, &cd->pctx))
871 ret = check_dotdot(ctx, dirent, ino, &cd->pctx);
878 if (fix_problem(ctx, PR_2_LINK_DOT, &cd->pctx)) {
939 if (fix_problem(ctx, problem, &cd->pctx)) {
974 cd->pctx.group = group;
987 &cd->pctx)){
999 if (fix_problem(ctx, PR_2_INOREF_IN_UNUSED, &cd->pctx)){
1019 if (fix_problem(ctx, problem, &cd->pctx)) {
1030 if (check_name(ctx, dirent, ino, &cd->pctx))
1033 if (check_filetype(ctx, dirent, ino, &cd->pctx))
1060 cd->pctx.ino = dirent->inode;
1061 fix_problem(ctx, PR_2_NO_DIRINFO, &cd->pctx);
1065 cd->pctx.ino2 = subdir_parent;
1067 &cd->pctx)) {
1072 cd->pctx.ino2 = 0;
1116 cd->pctx.dir = cd->pctx.ino;
1119 parse_int_node(fs, db, cd, dx_dir, buf);
1123 cd->pctx.num = rec_len - fs->blocksize + offset;
1124 if (fix_problem(ctx, PR_2_FINAL_RECLEN, &cd->pctx)) {
1125 dirent->rec_len = cd->pctx.num;
1130 cd->pctx.errcode = ext2fs_write_dir_block(fs, block_nr, buf);
1131 if (cd->pctx.errcode) {
1133 &cd->pctx))