• Home
  • Raw
  • Download

Lines Matching refs:info

231 			dentries[i].link = calloc(info.block_size, 1);  in build_directory_structure()
232 readlink(dentries[i].full_path, dentries[i].link, info.block_size - 1); in build_directory_structure()
331 u32 journal_blocks = DIV_ROUND_UP(info.len, info.block_size) / 64; in compute_journal_blocks()
341 return info.block_size * 8; in compute_blocks_per_group()
346 return DIV_ROUND_UP(info.len, info.block_size) / 4; in compute_inodes()
351 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); in compute_inodes_per_group()
352 u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); in compute_inodes_per_group()
353 u32 inodes = DIV_ROUND_UP(info.inodes, block_groups); in compute_inodes_per_group()
354 inodes = EXT4_ALIGN(inodes, (info.block_size / info.inode_size)); in compute_inodes_per_group()
359 info.inodes = inodes * block_groups; in compute_inodes_per_group()
366 u32 blocks = DIV_ROUND_UP(info.len, info.block_size); in compute_bg_desc_reserve_blocks()
367 u32 block_groups = DIV_ROUND_UP(blocks, info.blocks_per_group); in compute_bg_desc_reserve_blocks()
369 info.block_size); in compute_bg_desc_reserve_blocks()
373 info.block_size) - bg_desc_blocks; in compute_bg_desc_reserve_blocks()
375 if (bg_desc_reserve_blocks > info.block_size / sizeof(u32)) in compute_bg_desc_reserve_blocks()
376 bg_desc_reserve_blocks = info.block_size / sizeof(u32); in compute_bg_desc_reserve_blocks()
384 memset(&info, 0, sizeof(info)); in reset_ext4fs_info()
397 info.len = len; in make_ext4fs_sparse_fd()
409 info.len = len; in make_ext4fs()
507 if (info.len <= 0) in make_ext4fs_internal()
508 info.len = get_file_size(fd); in make_ext4fs_internal()
510 if (info.len <= 0) { in make_ext4fs_internal()
515 if (info.block_size <= 0) in make_ext4fs_internal()
516 info.block_size = compute_block_size(); in make_ext4fs_internal()
519 info.len &= ~((u64)info.block_size - 1); in make_ext4fs_internal()
521 if (info.journal_blocks == 0) in make_ext4fs_internal()
522 info.journal_blocks = compute_journal_blocks(); in make_ext4fs_internal()
524 if (info.no_journal == 0) in make_ext4fs_internal()
525 info.feat_compat = EXT4_FEATURE_COMPAT_HAS_JOURNAL; in make_ext4fs_internal()
527 info.journal_blocks = 0; in make_ext4fs_internal()
529 if (info.blocks_per_group <= 0) in make_ext4fs_internal()
530 info.blocks_per_group = compute_blocks_per_group(); in make_ext4fs_internal()
532 if (info.inodes <= 0) in make_ext4fs_internal()
533 info.inodes = compute_inodes(); in make_ext4fs_internal()
535 if (info.inode_size <= 0) in make_ext4fs_internal()
536 info.inode_size = 256; in make_ext4fs_internal()
538 if (info.label == NULL) in make_ext4fs_internal()
539 info.label = ""; in make_ext4fs_internal()
541 info.inodes_per_group = compute_inodes_per_group(); in make_ext4fs_internal()
543 info.feat_compat |= in make_ext4fs_internal()
547 info.feat_ro_compat |= in make_ext4fs_internal()
552 info.feat_incompat |= in make_ext4fs_internal()
557 info.bg_desc_reserve_blocks = compute_bg_desc_reserve_blocks(); in make_ext4fs_internal()
560 printf(" Size: %"PRIu64"\n", info.len); in make_ext4fs_internal()
561 printf(" Block size: %d\n", info.block_size); in make_ext4fs_internal()
562 printf(" Blocks per group: %d\n", info.blocks_per_group); in make_ext4fs_internal()
563 printf(" Inodes per group: %d\n", info.inodes_per_group); in make_ext4fs_internal()
564 printf(" Inode size: %d\n", info.inode_size); in make_ext4fs_internal()
565 printf(" Journal blocks: %d\n", info.journal_blocks); in make_ext4fs_internal()
566 printf(" Label: %s\n", info.label); in make_ext4fs_internal()
572 printf(" Reserved block group size: %d\n", info.bg_desc_reserve_blocks); in make_ext4fs_internal()
574 ext4_sparse_file = sparse_file_new(info.block_size, info.len); in make_ext4fs_internal()
583 if (info.feat_compat & EXT4_FEATURE_COMPAT_HAS_JOURNAL) in make_ext4fs_internal()
586 if (info.feat_compat & EXT4_FEATURE_COMPAT_RESIZE_INODE) in make_ext4fs_internal()
649 wipe_block_device(fd, info.len); in make_ext4fs_internal()