Lines Matching refs:info
264 dentries[i].link = calloc(info.block_size, 1); in build_directory_structure()
265 readlink(dentries[i].full_path, dentries[i].link, info.block_size - 1); in build_directory_structure()
364 u32 journal_blocks = DIV_ROUND_UP(info.len, info.block_size) / 64; in compute_journal_blocks()
374 return info.block_size * 8; in compute_blocks_per_group()
379 return DIV_ROUND_UP(info.len, info.block_size) / 4; in compute_inodes()
384 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); in compute_inodes_per_group()
385 u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); in compute_inodes_per_group()
386 u32 inodes = DIV_ROUND_UP(info.inodes, block_groups); in compute_inodes_per_group()
387 inodes = EXT4_ALIGN(inodes, (info.block_size / info.inode_size)); in compute_inodes_per_group()
392 info.inodes = inodes * block_groups; in compute_inodes_per_group()
399 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); in compute_bg_desc_reserve_blocks()
400 u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); in compute_bg_desc_reserve_blocks()
402 info.block_size); in compute_bg_desc_reserve_blocks()
406 info.block_size) - bg_desc_blocks; in compute_bg_desc_reserve_blocks()
408 if (bg_desc_reserve_blocks > info.block_size / sizeof(u32)) in compute_bg_desc_reserve_blocks()
409 bg_desc_reserve_blocks = info.block_size / sizeof(u32); in compute_bg_desc_reserve_blocks()
417 memset(&info, 0, sizeof(info)); in reset_ext4fs_info()
452 info.len = len; in make_ext4fs_sparse_fd_directory_align()
453 info.flash_erase_block_size = eraseblk; in make_ext4fs_sparse_fd_directory_align()
454 info.flash_logical_block_size = logicalblk; in make_ext4fs_sparse_fd_directory_align()
483 info.len = len; in make_ext4fs_directory_align()
484 info.flash_erase_block_size = eraseblk; in make_ext4fs_directory_align()
485 info.flash_logical_block_size = logicalblk; in make_ext4fs_directory_align()
645 real_file_block_size = DIV_ROUND_UP(real_file_block_size, info.block_size); in extract_base_fs_allocations()
739 info.block_device = is_block_device_fd(fd); in make_ext4fs_internal()
741 if (info.block_device && (sparse || gzip || crc)) { in make_ext4fs_internal()
760 if (info.len <= 0) in make_ext4fs_internal()
761 info.len = get_file_size(fd); in make_ext4fs_internal()
763 if (info.block_size <= 0) in make_ext4fs_internal()
764 info.block_size = compute_block_size(); in make_ext4fs_internal()
767 info.len &= ~((u64)info.block_size - 1); in make_ext4fs_internal()
769 if (info.len <= 0) { in make_ext4fs_internal()
774 if (info.journal_blocks == 0) in make_ext4fs_internal()
775 info.journal_blocks = compute_journal_blocks(); in make_ext4fs_internal()
777 if (info.no_journal == 0) in make_ext4fs_internal()
778 info.feat_compat = EXT4_FEATURE_COMPAT_HAS_JOURNAL; in make_ext4fs_internal()
780 info.journal_blocks = 0; in make_ext4fs_internal()
782 if (info.blocks_per_group <= 0) in make_ext4fs_internal()
783 info.blocks_per_group = compute_blocks_per_group(); in make_ext4fs_internal()
785 if (info.inodes <= 0) in make_ext4fs_internal()
786 info.inodes = compute_inodes(); in make_ext4fs_internal()
788 if (info.inode_size <= 0) in make_ext4fs_internal()
789 info.inode_size = 256; in make_ext4fs_internal()
791 if (info.label == NULL) in make_ext4fs_internal()
792 info.label = ""; in make_ext4fs_internal()
794 info.inodes_per_group = compute_inodes_per_group(); in make_ext4fs_internal()
796 info.feat_compat |= in make_ext4fs_internal()
800 info.feat_ro_compat |= in make_ext4fs_internal()
805 info.feat_incompat |= in make_ext4fs_internal()
810 info.bg_desc_reserve_blocks = compute_bg_desc_reserve_blocks(); in make_ext4fs_internal()
813 printf(" Size: %"PRIu64"\n", info.len); in make_ext4fs_internal()
814 printf(" Block size: %d\n", info.block_size); in make_ext4fs_internal()
815 printf(" Blocks per group: %d\n", info.blocks_per_group); in make_ext4fs_internal()
816 printf(" Inodes per group: %d\n", info.inodes_per_group); in make_ext4fs_internal()
817 printf(" Inode size: %d\n", info.inode_size); in make_ext4fs_internal()
818 printf(" Journal blocks: %d\n", info.journal_blocks); in make_ext4fs_internal()
819 printf(" Label: %s\n", info.label); in make_ext4fs_internal()
825 printf(" Reserved block group size: %d\n", info.bg_desc_reserve_blocks); in make_ext4fs_internal()
827 ext4_sparse_file = sparse_file_new(info.block_size, info.len); in make_ext4fs_internal()
839 if (info.feat_compat & EXT4_FEATURE_COMPAT_HAS_JOURNAL) in make_ext4fs_internal()
842 if (info.feat_compat & EXT4_FEATURE_COMPAT_RESIZE_INODE) in make_ext4fs_internal()
909 wipe_block_device(fd, info.len); in make_ext4fs_internal()