• Home
  • Raw
  • Download

Lines Matching refs:aux_info

41 struct fs_aux_info aux_info;  variable
110 aux_info.first_data_block = (info.block_size > 1024) ? 0 : 1; in ext4_create_fs_aux_info()
111 aux_info.len_blocks = info.len / info.block_size; in ext4_create_fs_aux_info()
112 aux_info.inode_table_blocks = DIV_ROUND_UP(info.inodes_per_group * info.inode_size, in ext4_create_fs_aux_info()
114 aux_info.groups = DIV_ROUND_UP(aux_info.len_blocks - aux_info.first_data_block, in ext4_create_fs_aux_info()
116 aux_info.blocks_per_ind = info.block_size / sizeof(u32); in ext4_create_fs_aux_info()
117 aux_info.blocks_per_dind = aux_info.blocks_per_ind * aux_info.blocks_per_ind; in ext4_create_fs_aux_info()
118 aux_info.blocks_per_tind = aux_info.blocks_per_dind * aux_info.blocks_per_dind; in ext4_create_fs_aux_info()
120 aux_info.bg_desc_blocks = in ext4_create_fs_aux_info()
121 DIV_ROUND_UP(aux_info.groups * sizeof(struct ext2_group_desc), in ext4_create_fs_aux_info()
124 aux_info.default_i_flags = EXT4_NOATIME_FL; in ext4_create_fs_aux_info()
126 u32 last_group_size = aux_info.len_blocks == info.blocks_per_group in ext4_create_fs_aux_info()
127 ? aux_info.len_blocks : aux_info.len_blocks % info.blocks_per_group; in ext4_create_fs_aux_info()
128 u32 last_header_size = 2 + aux_info.inode_table_blocks; in ext4_create_fs_aux_info()
129 if (ext4_bg_has_super_block((int)aux_info.groups - 1)) in ext4_create_fs_aux_info()
130 last_header_size += 1 + aux_info.bg_desc_blocks + in ext4_create_fs_aux_info()
132 if (aux_info.groups <= 1 && last_group_size < last_header_size) { in ext4_create_fs_aux_info()
136 aux_info.groups--; in ext4_create_fs_aux_info()
137 aux_info.len_blocks -= last_group_size; in ext4_create_fs_aux_info()
143 aux_info.sb_zero = (struct ext4_super_block *)calloc(1, info.block_size); in ext4_create_fs_aux_info()
144 if (!aux_info.sb_zero) in ext4_create_fs_aux_info()
152 aux_info.sb_block = (struct ext4_super_block *)calloc(1, info.block_size); in ext4_create_fs_aux_info()
153 if (!aux_info.sb_block) in ext4_create_fs_aux_info()
157 aux_info.sb = (struct ext4_super_block *)((char *)aux_info.sb_block + 1024); in ext4_create_fs_aux_info()
159 aux_info.sb = aux_info.sb_block; in ext4_create_fs_aux_info()
162 aux_info.backup_sb = (struct ext4_super_block **)calloc(aux_info.groups, sizeof(char *)); in ext4_create_fs_aux_info()
164 if (!aux_info.sb) in ext4_create_fs_aux_info()
167 aux_info.bg_desc = (struct ext2_group_desc *)calloc(info.block_size, aux_info.bg_desc_blocks); in ext4_create_fs_aux_info()
168 if (!aux_info.bg_desc) in ext4_create_fs_aux_info()
170 aux_info.xattrs = NULL; in ext4_create_fs_aux_info()
177 for (i=0; i<aux_info.groups; i++) { in ext4_free_fs_aux_info()
178 if (aux_info.backup_sb[i]) in ext4_free_fs_aux_info()
179 free(aux_info.backup_sb[i]); in ext4_free_fs_aux_info()
181 free(aux_info.sb_block); in ext4_free_fs_aux_info()
182 free(aux_info.sb_zero); in ext4_free_fs_aux_info()
183 free(aux_info.bg_desc); in ext4_free_fs_aux_info()
198 memcpy(aux_info.sb, sb, sizeof(*sb)); in ext4_parse_sb_info()
200 if (aux_info.first_data_block != sb->s_first_data_block) in ext4_parse_sb_info()
280 ret = lseek64(fd, info.block_size * (aux_info.first_data_block + 1), SEEK_SET); in read_ext()
284 ret = read(fd, aux_info.bg_desc, info.block_size * aux_info.bg_desc_blocks); in read_ext()
287 if (ret != (int)info.block_size * (int)aux_info.bg_desc_blocks) in read_ext()
298 printf(" Blocks: %" PRIext4u64 "\n", aux_info.len_blocks); in read_ext()
299 printf(" Block groups: %d\n", aux_info.groups); in read_ext()
302 aux_info.sb->s_inodes_count - aux_info.sb->s_free_inodes_count, in read_ext()
303 aux_info.sb->s_inodes_count, in read_ext()
304 aux_info.sb->s_blocks_count_lo - aux_info.sb->s_free_blocks_count_lo, in read_ext()
305 aux_info.sb->s_blocks_count_lo); in read_ext()