Lines Matching refs:info
259 dentries[i].link = calloc(info.block_size, 1); in build_directory_structure()
260 readlink(dentries[i].full_path, dentries[i].link, info.block_size - 1); in build_directory_structure()
359 u32 journal_blocks = DIV_ROUND_UP(info.len, info.block_size) / 64; in compute_journal_blocks()
369 return info.block_size * 8; in compute_blocks_per_group()
374 return DIV_ROUND_UP(info.len, info.block_size) / 4; in compute_inodes()
379 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); in compute_inodes_per_group()
380 u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); in compute_inodes_per_group()
381 u32 inodes = DIV_ROUND_UP(info.inodes, block_groups); in compute_inodes_per_group()
382 inodes = EXT4_ALIGN(inodes, (info.block_size / info.inode_size)); in compute_inodes_per_group()
387 info.inodes = inodes * block_groups; in compute_inodes_per_group()
394 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); in compute_bg_desc_reserve_blocks()
395 u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); in compute_bg_desc_reserve_blocks()
397 info.block_size); in compute_bg_desc_reserve_blocks()
401 info.block_size) - bg_desc_blocks; in compute_bg_desc_reserve_blocks()
403 if (bg_desc_reserve_blocks > info.block_size / sizeof(u32)) in compute_bg_desc_reserve_blocks()
404 bg_desc_reserve_blocks = info.block_size / sizeof(u32); in compute_bg_desc_reserve_blocks()
412 memset(&info, 0, sizeof(info)); in reset_ext4fs_info()
432 info.len = len; in make_ext4fs_sparse_fd_directory()
453 info.len = len; in make_ext4fs_directory()
603 real_file_block_size = DIV_ROUND_UP(real_file_block_size, info.block_size); in extract_base_fs_allocations()
697 info.block_device = is_block_device_fd(fd); in make_ext4fs_internal()
699 if (info.block_device && (sparse || gzip || crc)) { in make_ext4fs_internal()
718 if (info.len <= 0) in make_ext4fs_internal()
719 info.len = get_file_size(fd); in make_ext4fs_internal()
721 if (info.len <= 0) { in make_ext4fs_internal()
726 if (info.block_size <= 0) in make_ext4fs_internal()
727 info.block_size = compute_block_size(); in make_ext4fs_internal()
730 info.len &= ~((u64)info.block_size - 1); in make_ext4fs_internal()
732 if (info.journal_blocks == 0) in make_ext4fs_internal()
733 info.journal_blocks = compute_journal_blocks(); in make_ext4fs_internal()
735 if (info.no_journal == 0) in make_ext4fs_internal()
736 info.feat_compat = EXT4_FEATURE_COMPAT_HAS_JOURNAL; in make_ext4fs_internal()
738 info.journal_blocks = 0; in make_ext4fs_internal()
740 if (info.blocks_per_group <= 0) in make_ext4fs_internal()
741 info.blocks_per_group = compute_blocks_per_group(); in make_ext4fs_internal()
743 if (info.inodes <= 0) in make_ext4fs_internal()
744 info.inodes = compute_inodes(); in make_ext4fs_internal()
746 if (info.inode_size <= 0) in make_ext4fs_internal()
747 info.inode_size = 256; in make_ext4fs_internal()
749 if (info.label == NULL) in make_ext4fs_internal()
750 info.label = ""; in make_ext4fs_internal()
752 info.inodes_per_group = compute_inodes_per_group(); in make_ext4fs_internal()
754 info.feat_compat |= in make_ext4fs_internal()
758 info.feat_ro_compat |= in make_ext4fs_internal()
763 info.feat_incompat |= in make_ext4fs_internal()
768 info.bg_desc_reserve_blocks = compute_bg_desc_reserve_blocks(); in make_ext4fs_internal()
771 printf(" Size: %"PRIu64"\n", info.len); in make_ext4fs_internal()
772 printf(" Block size: %d\n", info.block_size); in make_ext4fs_internal()
773 printf(" Blocks per group: %d\n", info.blocks_per_group); in make_ext4fs_internal()
774 printf(" Inodes per group: %d\n", info.inodes_per_group); in make_ext4fs_internal()
775 printf(" Inode size: %d\n", info.inode_size); in make_ext4fs_internal()
776 printf(" Journal blocks: %d\n", info.journal_blocks); in make_ext4fs_internal()
777 printf(" Label: %s\n", info.label); in make_ext4fs_internal()
783 printf(" Reserved block group size: %d\n", info.bg_desc_reserve_blocks); in make_ext4fs_internal()
785 ext4_sparse_file = sparse_file_new(info.block_size, info.len); in make_ext4fs_internal()
797 if (info.feat_compat & EXT4_FEATURE_COMPAT_HAS_JOURNAL) in make_ext4fs_internal()
800 if (info.feat_compat & EXT4_FEATURE_COMPAT_RESIZE_INODE) in make_ext4fs_internal()
867 wipe_block_device(fd, info.len); in make_ext4fs_internal()