Lines Matching refs:fs_param

105 static struct ext2_super_block fs_param;  variable
662 if (ext2fs_blocks_count(&fs_param) != ext2fs_blocks_count(s)) in show_stats()
664 ext2fs_blocks_count(&fs_param) - ext2fs_blocks_count(s)); in show_stats()
808 if (!ext2fs_has_feature_64bit(&fs_param)) { in parse_extended_opts()
1548 memset(&fs_param, 0, sizeof(struct ext2_super_block)); in PRS()
1549 fs_param.s_rev_level = 1; /* Create revision 1 filesystems now */ in PRS()
1552 fs_param.s_rev_level = 0; in PRS()
1580 fs_param.s_log_block_size = in PRS()
1628 fs_param.s_blocks_per_group = strtoul(optarg, &tmp, 0); in PRS()
1634 if ((fs_param.s_blocks_per_group % 8) != 0) { in PRS()
1770 fs_param.s_rev_level = r_opt; in PRS()
1858 fs_param.s_log_block_size = in PRS()
1865 fs_param.s_log_block_size); in PRS()
1900 EXT2_BLOCK_SIZE(&fs_param), in PRS()
1929 if (sys_page_size > EXT2_BLOCK_SIZE(&fs_param)) in PRS()
1931 EXT2_BLOCK_SIZE(&fs_param))-1)); in PRS()
1951 fs_types = parse_fs_type(fs_type, usage_types, &fs_param, in PRS()
1962 if (fs_param.s_rev_level != EXT2_GOOD_OLD_REV) { in PRS()
1965 edit_feature(tmp, &fs_param.s_feature_compat); in PRS()
1971 edit_mntopts(tmp, &fs_param.s_default_mount_opts); in PRS()
1980 edit_feature(tmp, &fs_param.s_feature_compat); in PRS()
1989 ext2fs_clear_feature_filetype(&fs_param); in PRS()
1990 ext2fs_clear_feature_huge_file(&fs_param); in PRS()
1991 ext2fs_clear_feature_metadata_csum(&fs_param); in PRS()
1994 &fs_param.s_feature_compat); in PRS()
2002 if (ext2fs_has_feature_filetype(&fs_param)) { in PRS()
2007 if (ext2fs_has_feature_huge_file(&fs_param)) { in PRS()
2012 if (ext2fs_has_feature_metadata_csum(&fs_param)) { in PRS()
2072 fs_param.s_log_block_size = in PRS()
2080 ext2fs_has_feature_64bit(&fs_param)) in PRS()
2081 ext2fs_clear_feature_resize_inode(&fs_param); in PRS()
2083 !ext2fs_has_feature_64bit(&fs_param) && in PRS()
2085 ext2fs_set_feature_64bit(&fs_param); in PRS()
2086 ext2fs_clear_feature_resize_inode(&fs_param); in PRS()
2089 !ext2fs_has_feature_64bit(&fs_param)) { in PRS()
2094 EXT2_BLOCK_SIZE(&fs_param)); in PRS()
2098 ext2fs_blocks_count_set(&fs_param, fs_blocks_count); in PRS()
2100 if (ext2fs_has_feature_journal_dev(&fs_param)) { in PRS()
2111 (fs_param.s_feature_compat || fs_param.s_feature_incompat || in PRS()
2112 fs_param.s_feature_ro_compat)) { in PRS()
2125 ext2fs_set_feature_sparse_super(&fs_param); in PRS()
2127 ext2fs_clear_feature_sparse_super(&fs_param); in PRS()
2135 ext2fs_set_feature_journal(&fs_param); in PRS()
2150 if (ext2fs_has_feature_journal_dev(&fs_param)) { in PRS()
2152 fs_param.s_feature_incompat = EXT3_FEATURE_INCOMPAT_JOURNAL_DEV; in PRS()
2153 fs_param.s_feature_compat = 0; in PRS()
2154 fs_param.s_feature_ro_compat &= in PRS()
2159 if (ext2fs_has_feature_64bit(&fs_param) && in PRS()
2160 !ext2fs_has_feature_extents(&fs_param)) { in PRS()
2168 if (ext2fs_has_feature_meta_bg(&fs_param) && in PRS()
2170 fs_param.s_first_meta_bg = atoi(tmp); in PRS()
2171 if (ext2fs_has_feature_bigalloc(&fs_param)) { in PRS()
2176 fs_param.s_log_cluster_size = in PRS()
2178 if (fs_param.s_log_cluster_size && in PRS()
2179 fs_param.s_log_cluster_size < fs_param.s_log_block_size) { in PRS()
2191 fs_param.s_log_cluster_size = fs_param.s_log_block_size; in PRS()
2198 if (inode_ratio < EXT2_CLUSTER_SIZE(&fs_param)) in PRS()
2199 inode_ratio = EXT2_CLUSTER_SIZE(&fs_param); in PRS()
2203 retval = get_device_geometry(device_name, &fs_param, in PRS()
2219 blocksize = EXT2_BLOCK_SIZE(&fs_param); in PRS()
2226 if (ext2fs_has_feature_64bit(&fs_param)) in PRS()
2227 fs_param.s_desc_size = EXT2_MIN_DESC_SIZE_64BIT; in PRS()
2244 ext2fs_has_feature_metadata_csum(&fs_param)) in PRS()
2276 fs_param.s_log_block_size); in PRS()
2289 parse_extended_opts(&fs_param, tmp); in PRS()
2294 parse_extended_opts(&fs_param, extended_opts); in PRS()
2297 fs_blocks_count -= offset / EXT2_BLOCK_SIZE(&fs_param); in PRS()
2298 ext2fs_blocks_count_set(&fs_param, fs_blocks_count); in PRS()
2309 if (ext2fs_has_feature_metadata_csum(&fs_param) && in PRS()
2310 ext2fs_has_feature_gdt_csum(&fs_param)) in PRS()
2311 ext2fs_clear_feature_gdt_csum(&fs_param); in PRS()
2314 if (ext2fs_has_feature_bigalloc(&fs_param) && in PRS()
2315 !ext2fs_has_feature_extents(&fs_param)) { in PRS()
2322 if (ext2fs_has_feature_meta_bg(&fs_param) && in PRS()
2323 ext2fs_has_feature_resize_inode(&fs_param)) { in PRS()
2331 if (!quiet && ext2fs_has_feature_bigalloc(&fs_param)) in PRS()
2341 if (ext2fs_has_feature_resize_inode(&fs_param) && in PRS()
2342 !ext2fs_has_feature_sparse_super(&fs_param)) { in PRS()
2349 if (fs_param.s_blocks_per_group) { in PRS()
2350 if (fs_param.s_blocks_per_group < 256 || in PRS()
2351 fs_param.s_blocks_per_group > 8 * (unsigned) blocksize) { in PRS()
2362 if (ext2fs_has_feature_bigalloc(&fs_param)) { in PRS()
2363 fs_param.s_clusters_per_group = fs_param.s_blocks_per_group; in PRS()
2364 fs_param.s_blocks_per_group = 0; in PRS()
2369 if (!flex_bg_size && ext2fs_has_feature_flex_bg(&fs_param)) in PRS()
2373 if (!ext2fs_has_feature_flex_bg(&fs_param)) { in PRS()
2379 fs_param.s_log_groups_per_flex = int_log2(flex_bg_size); in PRS()
2382 if (inode_size && fs_param.s_rev_level >= EXT2_DYNAMIC_REV) { in PRS()
2384 inode_size > EXT2_BLOCK_SIZE(&fs_param) || in PRS()
2392 fs_param.s_inode_size = inode_size; in PRS()
2399 if (ext2fs_has_feature_inline_data(&fs_param) && in PRS()
2400 fs_param.s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) { in PRS()
2404 fs_param.s_inode_size); in PRS()
2412 if (ext2fs_has_feature_project(&fs_param) && in PRS()
2413 fs_param.s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) { in PRS()
2417 fs_param.s_inode_size); in PRS()
2424 n = ext2fs_blocks_count(&fs_param) * blocksize / inode_ratio; in PRS()
2426 if (ext2fs_has_feature_64bit(&fs_param)) in PRS()
2444 fs_param.s_inodes_count = num_inodes ? num_inodes : in PRS()
2445 (ext2fs_blocks_count(&fs_param) * blocksize) / inode_ratio; in PRS()
2447 if ((((unsigned long long)fs_param.s_inodes_count) * in PRS()
2449 ((ext2fs_blocks_count(&fs_param)) * in PRS()
2450 EXT2_BLOCK_SIZE(&fs_param))) { in PRS()
2457 fs_param.s_inodes_count, in PRS()
2458 (unsigned long long) ext2fs_blocks_count(&fs_param)); in PRS()
2465 ext2fs_r_blocks_count_set(&fs_param, reserved_ratio * in PRS()
2466 ext2fs_blocks_count(&fs_param) / 100.0); in PRS()
2468 if (ext2fs_has_feature_sparse_super2(&fs_param)) { in PRS()
2470 fs_param.s_backup_bgs[0] = 1; in PRS()
2472 fs_param.s_backup_bgs[1] = ~0; in PRS()
2488 csum_flag = ext2fs_has_feature_metadata_csum(&fs_param) || in should_do_undo()
2489 ext2fs_has_feature_gdt_csum(&fs_param); in should_do_undo()
2824 device_name, fs_param.s_blocks_count, in main()
2825 1024 << fs_param.s_log_block_size); in main()
2827 &fs_param, sparse_io_manager, &fs); in main()
2829 retval = ext2fs_initialize(device_name, flags, &fs_param, in main()
2871 ext2fs_has_feature_journal(&fs_param))) in main()
2896 if (fs_param.s_flags & EXT2_FLAGS_TEST_FILESYS) in main()
2899 if (ext2fs_has_feature_flex_bg(&fs_param) || in main()
2900 ext2fs_has_feature_huge_file(&fs_param) || in main()
2901 ext2fs_has_feature_gdt_csum(&fs_param) || in main()
2902 ext2fs_has_feature_dir_nlink(&fs_param) || in main()
2903 ext2fs_has_feature_metadata_csum(&fs_param) || in main()
2904 ext2fs_has_feature_extra_isize(&fs_param)) in main()
3154 ext2fs_has_feature_journal(&fs_param)) { in main()
3197 if (ext2fs_has_feature_bigalloc(&fs_param)) in main()
3199 if (ext2fs_has_feature_project(&fs_param)) in main()
3201 if (ext2fs_has_feature_quota(&fs_param)) in main()