Lines Matching refs:dx_dir_info
18 struct dx_dir_info *dir;
26 if (!ctx->dx_dir_info) {
29 ctx->dx_dir_info = (struct dx_dir_info *)
31 * sizeof (struct dx_dir_info),
36 old_size = ctx->dx_dir_info_size * sizeof(struct dx_dir_info);
39 sizeof(struct dx_dir_info),
40 &ctx->dx_dir_info);
52 * need to move the dx_dir_info entries down to make room, since
53 * the dx_dir_info array needs to be sorted by inode number for
57 ctx->dx_dir_info[ctx->dx_dir_info_count-1].ino >= ino) {
59 if (ctx->dx_dir_info[i-1].ino < ino)
61 dir = &ctx->dx_dir_info[i];
64 ctx->dx_dir_info[j] = ctx->dx_dir_info[j-1];
66 dir = &ctx->dx_dir_info[ctx->dx_dir_info_count++];
81 struct dx_dir_info *e2fsck_get_dx_dir_info(e2fsck_t ctx, ext2_ino_t ino)
87 if (!ctx->dx_dir_info)
89 if (ino == ctx->dx_dir_info[low].ino)
90 return &ctx->dx_dir_info[low];
91 if (ino == ctx->dx_dir_info[high].ino)
92 return &ctx->dx_dir_info[high];
98 if (ino == ctx->dx_dir_info[mid].ino)
99 return &ctx->dx_dir_info[mid];
100 if (ino < ctx->dx_dir_info[mid].ino)
109 * Free the dx_dir_info structure when it isn't needed any more.
114 struct dx_dir_info *dir;
116 if (ctx->dx_dir_info) {
117 dir = ctx->dx_dir_info;
124 ext2fs_free_mem(&ctx->dx_dir_info);
125 ctx->dx_dir_info = 0;
132 * Return the count of number of directories in the dx_dir_info structure
142 struct dx_dir_info *e2fsck_dx_dir_info_iter(e2fsck_t ctx, int *control)
147 return(ctx->dx_dir_info + (*control)++);