From 9046b4dfd0ce4ad589f5dce1135b91c342022de1 Mon Sep 17 00:00:00 2001 From: Li Dongyang Date: Sun, 26 Jan 2020 22:06:36 -0500 Subject: [PATCH] mke2fs: set overhead in super block If overhead is not recorded in the super block, it is calculated during mount in kernel, for bigalloc file systems it takes O(groups**2) in time. For a 1PB device with 32K cluster size it takes ~12 mins to mount, with most of the time spent on figuring out overhead. While we can not improve the overhead algorithm in kernel due to the nature of bigalloc, we can work out the overhead during mke2fs and set it in the super block, avoiding calculating it every time when it mounts. Overhead is s_first_data_block plus internal journal blocks plus the block and inode bitmaps, inode table, super block backups and group descriptor blocks for every group. This patch introduces ext2fs_count_used_clusters(), which calculates the clusters used in the block bitmap for the given range. When bad blocks are involved, it gets tricky because the blocks counted as overhead and the bad blocks can end up in the same allocation cluster. In this case we will unmark the bad blocks from the block bitmap, convert to cluster bitmap and get the overhead, then mark the bad blocks back in the cluster bitmap. Reset the overhead to zero when resizing, we can not simply count the used blocks as overhead like we do when mke2fs. The overhead can be calculated by kernel side during mount. Signed-off-by: Li Dongyang Signed-off-by: Theodore Ts'o --- lib/ext2fs/ext2fs.h | 2 ++ lib/ext2fs/gen_bitmap64.c | 35 +++++++++++++++++++++++++ misc/mke2fs.c | 47 ++++++++++++++++++++++++++++++++++ resize/resize2fs.c | 1 + tests/f_opt_extent/expect | 6 ++--- tests/m_64bit_flexbg/expect.1 | 1 + tests/m_bigjournal/expect.1 | 1 + tests/m_dasd_bs/expect.1 | 1 + tests/m_desc_size_128/expect.1 | 1 + tests/m_extent_journal/expect.1 | 1 + tests/m_large_file/expect.1 | 1 + tests/m_meta_bg/expect.1 | 1 + tests/m_minrootdir/expect | 1 + tests/m_mmp/expect.1 | 1 + tests/m_no_opt/expect.1 | 1 + tests/m_quota/expect.1 | 1 + tests/m_raid_opt/expect.1 | 1 + tests/m_resize_inode_meta_bg/expect.1 | 1 + tests/m_root_owner/expect.1 | 1 + tests/m_rootdir/expect | 1 + tests/m_std/expect.1 | 1 + tests/m_uninit/expect.1 | 1 + tests/r_32to64bit/expect | 14 +++++++--- tests/r_32to64bit_meta/expect | 7 ++--- tests/r_32to64bit_move_itable/expect | 11 ++++---- tests/r_64to32bit/expect | 9 ++++--- tests/r_64to32bit_meta/expect | 7 ++--- tests/t_disable_mcsum/expect | 2 +- tests/t_disable_mcsum_noinitbg/expect | 4 +-- tests/t_disable_mcsum_yesinitbg/expect | 2 +- tests/t_enable_mcsum/expect | 8 +++--- tests/t_enable_mcsum_ext3/expect | 8 +++--- tests/t_enable_mcsum_initbg/expect | 8 +++--- tests/t_iexpand_full/expect | 6 ++--- tests/t_iexpand_mcsum/expect | 6 ++--- 35 files changed, 156 insertions(+), 44 deletions(-) diff --git a/lib/ext2fs/ext2fs.h b/lib/ext2fs/ext2fs.h index 4b7c836..6bda6d2 100644 --- a/lib/ext2fs/ext2fs.h +++ b/lib/ext2fs/ext2fs.h @@ -1439,6 +1439,8 @@ errcode_t ext2fs_set_generic_bmap_range(ext2fs_generic_bitmap bmap, void *in); errcode_t ext2fs_convert_subcluster_bitmap(ext2_filsys fs, ext2fs_block_bitmap *bitmap); +errcode_t ext2fs_count_used_clusters(ext2_filsys fs, blk64_t start, + blk64_t end, blk64_t *out); /* get_num_dirs.c */ extern errcode_t ext2fs_get_num_dirs(ext2_filsys fs, ext2_ino_t *ret_num_dirs); diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c index f1dd189..b237066 100644 --- a/lib/ext2fs/gen_bitmap64.c +++ b/lib/ext2fs/gen_bitmap64.c @@ -940,3 +940,38 @@ errcode_t ext2fs_find_first_set_generic_bmap(ext2fs_generic_bitmap bitmap, return ENOENT; } + +errcode_t ext2fs_count_used_clusters(ext2_filsys fs, blk64_t start, + blk64_t end, blk64_t *out) +{ + blk64_t next; + blk64_t tot_set = 0; + errcode_t retval; + + while (start < end) { + retval = ext2fs_find_first_set_block_bitmap2(fs->block_map, + start, end, &next); + if (retval) { + if (retval == ENOENT) + retval = 0; + break; + } + start = next; + + retval = ext2fs_find_first_zero_block_bitmap2(fs->block_map, + start, end, &next); + if (retval == 0) { + tot_set += next - start; + start = next + 1; + } else if (retval == ENOENT) { + retval = 0; + tot_set += end - start + 1; + break; + } else + break; + } + + if (!retval) + *out = EXT2FS_NUM_B2C(fs, tot_set); + return retval; +} diff --git a/misc/mke2fs.c b/misc/mke2fs.c index 27e7d17..ac5ee69 100644 --- a/misc/mke2fs.c +++ b/misc/mke2fs.c @@ -2910,6 +2910,8 @@ int main (int argc, char *argv[]) errcode_t retval = 0; ext2_filsys fs; badblocks_list bb_list = 0; + badblocks_iterate bb_iter; + blk_t blk; unsigned int journal_blocks = 0; unsigned int i, checkinterval; int max_mnt_count; @@ -2920,6 +2922,7 @@ int main (int argc, char *argv[]) char opt_string[40]; char *hash_alg_str; int itable_zeroed = 0; + blk64_t overhead; #ifdef ENABLE_NLS setlocale(LC_MESSAGES, ""); @@ -3211,6 +3214,23 @@ int main (int argc, char *argv[]) if (!quiet) printf("%s", _("done \n")); + /* + * Unmark bad blocks to calculate overhead, because metadata + * blocks and bad blocks can land on the same allocation cluster. + */ + if (bb_list) { + retval = ext2fs_badblocks_list_iterate_begin(bb_list, + &bb_iter); + if (retval) { + com_err("ext2fs_badblocks_list_iterate_begin", retval, + "%s", _("while unmarking bad blocks")); + exit(1); + } + while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) + ext2fs_unmark_block_bitmap2(fs->block_map, blk); + ext2fs_badblocks_list_iterate_end(bb_iter); + } + retval = ext2fs_convert_subcluster_bitmap(fs, &fs->block_map); if (retval) { com_err(program_name, retval, "%s", @@ -3218,6 +3238,28 @@ int main (int argc, char *argv[]) exit(1); } + retval = ext2fs_count_used_clusters(fs, fs->super->s_first_data_block, + ext2fs_blocks_count(fs->super) - 1, + &overhead); + if (retval) { + com_err(program_name, retval, "%s", + _("while calculating overhead")); + exit(1); + } + + if (bb_list) { + retval = ext2fs_badblocks_list_iterate_begin(bb_list, + &bb_iter); + if (retval) { + com_err("ext2fs_badblocks_list_iterate_begin", retval, + "%s", _("while marking bad blocks as used")); + exit(1); + } + while (ext2fs_badblocks_list_iterate(bb_iter, &blk)) + ext2fs_mark_block_bitmap2(fs->block_map, blk); + ext2fs_badblocks_list_iterate_end(bb_iter); + } + if (super_only) { check_plausibility(device_name, CHECK_FS_EXIST, NULL); printf(_("%s may be further corrupted by superblock rewrite\n"), @@ -3315,6 +3357,7 @@ int main (int argc, char *argv[]) free(journal_device); } else if ((journal_size) || ext2fs_has_feature_journal(&fs_param)) { + overhead += EXT2FS_NUM_B2C(fs, journal_blocks); if (super_only) { printf("%s", _("Skipping journal creation in super-only mode\n")); fs->super->s_journal_inum = EXT2_JOURNAL_INO; @@ -3357,6 +3400,10 @@ no_journal: fs->super->s_mmp_update_interval); } + overhead += fs->super->s_first_data_block; + if (!super_only) + fs->super->s_overhead_clusters = overhead; + if (ext2fs_has_feature_bigalloc(&fs_param)) fix_cluster_bg_counts(fs); if (ext2fs_has_feature_quota(&fs_param)) diff --git a/resize/resize2fs.c b/resize/resize2fs.c index 8a3d08d..2443ff6 100644 --- a/resize/resize2fs.c +++ b/resize/resize2fs.c @@ -703,6 +703,7 @@ errcode_t adjust_fs_info(ext2_filsys fs, ext2_filsys old_fs, double percent; ext2fs_blocks_count_set(fs->super, new_size); + fs->super->s_overhead_clusters = 0; retry: fs->group_desc_count = ext2fs_div64_ceil(ext2fs_blocks_count(fs->super) - diff --git a/tests/f_opt_extent/expect b/tests/f_opt_extent/expect index 6d4863b..6d1f9d1 100644 --- a/tests/f_opt_extent/expect +++ b/tests/f_opt_extent/expect @@ -26,16 +26,16 @@ Pass 5: Checking group summary information Change in FS metadata: -@@ -10,7 +10,7 @@ - Inode count: 65536 +@@ -11,7 +11,7 @@ Block count: 524288 Reserved block count: 26214 + Overhead clusters: 35246 -Free blocks: 570 +Free blocks: 567 Free inodes: 65047 First block: 1 Block size: 1024 -@@ -47,8 +47,8 @@ +@@ -48,8 +48,8 @@ Block bitmap at 262 (+261) Inode bitmap at 278 (+277) Inode table at 294-549 (+293) diff --git a/tests/m_64bit_flexbg/expect.1 b/tests/m_64bit_flexbg/expect.1 index cfa3bc9..956d248 100644 --- a/tests/m_64bit_flexbg/expect.1 +++ b/tests/m_64bit_flexbg/expect.1 @@ -24,6 +24,7 @@ Filesystem OS type: Linux Inode count: 128 Block count: 1024 Reserved block count: 51 +Overhead clusters: 28 Free blocks: 982 Free inodes: 117 First block: 1 diff --git a/tests/m_bigjournal/expect.1 b/tests/m_bigjournal/expect.1 index 8900596..80f71d1 100644 --- a/tests/m_bigjournal/expect.1 +++ b/tests/m_bigjournal/expect.1 @@ -18,6 +18,7 @@ Filesystem OS type: Linux Inode count: 1344 Block count: 2750000 Reserved block count: 137500 +Overhead clusters: 1286982 Free blocks: 1463011 Free inodes: 1333 First block: 0 diff --git a/tests/m_dasd_bs/expect.1 b/tests/m_dasd_bs/expect.1 index 0e55e8f..970d556 100644 --- a/tests/m_dasd_bs/expect.1 +++ b/tests/m_dasd_bs/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 16384 Block count: 32768 Reserved block count: 1638 +Overhead clusters: 1094 Free blocks: 31664 Free inodes: 16373 First block: 0 diff --git a/tests/m_desc_size_128/expect.1 b/tests/m_desc_size_128/expect.1 index 5a7da87..1cd9758 100644 --- a/tests/m_desc_size_128/expect.1 +++ b/tests/m_desc_size_128/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 8192 Block count: 131072 Reserved block count: 6553 +Overhead clusters: 4284 Free blocks: 126774 Free inodes: 8181 First block: 1 diff --git a/tests/m_extent_journal/expect.1 b/tests/m_extent_journal/expect.1 index 34e8a80..cfc052a 100644 --- a/tests/m_extent_journal/expect.1 +++ b/tests/m_extent_journal/expect.1 @@ -27,6 +27,7 @@ Filesystem OS type: Linux Inode count: 16384 Block count: 65536 Reserved block count: 3276 +Overhead clusters: 7446 Free blocks: 58076 Free inodes: 16373 First block: 1 diff --git a/tests/m_large_file/expect.1 b/tests/m_large_file/expect.1 index 06c8257..955ba77 100644 --- a/tests/m_large_file/expect.1 +++ b/tests/m_large_file/expect.1 @@ -24,6 +24,7 @@ Filesystem OS type: Linux Inode count: 64 Block count: 16384 Reserved block count: 819 +Overhead clusters: 11 Free blocks: 16367 Free inodes: 53 First block: 0 diff --git a/tests/m_meta_bg/expect.1 b/tests/m_meta_bg/expect.1 index 7df4230..1b90b55 100644 --- a/tests/m_meta_bg/expect.1 +++ b/tests/m_meta_bg/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 32768 Block count: 131072 Reserved block count: 6553 +Overhead clusters: 4376 Free blocks: 126683 Free inodes: 32757 First block: 1 diff --git a/tests/m_minrootdir/expect b/tests/m_minrootdir/expect index 90158da..d2e9a9e 100644 --- a/tests/m_minrootdir/expect +++ b/tests/m_minrootdir/expect @@ -11,6 +11,7 @@ Filesystem OS type: Linux Inode count: 1024 Block count: 16384 Reserved block count: 819 +Overhead clusters: 265 Free blocks: 16065 Free inodes: 1006 First block: 1 diff --git a/tests/m_mmp/expect.1 b/tests/m_mmp/expect.1 index 9d8a5a3..475cd1d 100644 --- a/tests/m_mmp/expect.1 +++ b/tests/m_mmp/expect.1 @@ -27,6 +27,7 @@ Filesystem OS type: Linux Inode count: 65536 Block count: 65536 Reserved block count: 3276 +Overhead clusters: 2086 Free blocks: 63443 Free inodes: 65525 First block: 0 diff --git a/tests/m_no_opt/expect.1 b/tests/m_no_opt/expect.1 index 58b311c..deaf22e 100644 --- a/tests/m_no_opt/expect.1 +++ b/tests/m_no_opt/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 16384 Block count: 65536 Reserved block count: 3276 +Overhead clusters: 2081 Free blocks: 63442 Free inodes: 16373 First block: 1 diff --git a/tests/m_quota/expect.1 b/tests/m_quota/expect.1 index 8cdad30..74e38ca 100644 --- a/tests/m_quota/expect.1 +++ b/tests/m_quota/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 32768 Block count: 131072 Reserved block count: 6553 +Overhead clusters: 9773 Free blocks: 121267 Free inodes: 32756 First block: 1 diff --git a/tests/m_raid_opt/expect.1 b/tests/m_raid_opt/expect.1 index 0fccb7c..7536631 100644 --- a/tests/m_raid_opt/expect.1 +++ b/tests/m_raid_opt/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 32768 Block count: 131072 Reserved block count: 6553 +Overhead clusters: 7224 Free blocks: 123834 Free inodes: 32757 First block: 1 diff --git a/tests/m_resize_inode_meta_bg/expect.1 b/tests/m_resize_inode_meta_bg/expect.1 index d36f973..6a7f399 100644 --- a/tests/m_resize_inode_meta_bg/expect.1 +++ b/tests/m_resize_inode_meta_bg/expect.1 @@ -27,6 +27,7 @@ Filesystem OS type: Linux Inode count: 960 Block count: 3840 Reserved block count: 192 +Overhead clusters: 1122 Free blocks: 2713 Free inodes: 949 First block: 0 diff --git a/tests/m_root_owner/expect.1 b/tests/m_root_owner/expect.1 index 30d119e..9c978b0 100644 --- a/tests/m_root_owner/expect.1 +++ b/tests/m_root_owner/expect.1 @@ -24,6 +24,7 @@ Filesystem OS type: Linux Inode count: 128 Block count: 1024 Reserved block count: 51 +Overhead clusters: 24 Free blocks: 986 Free inodes: 117 First block: 1 diff --git a/tests/m_rootdir/expect b/tests/m_rootdir/expect index 7b5c18d..113ffc6 100644 --- a/tests/m_rootdir/expect +++ b/tests/m_rootdir/expect @@ -10,6 +10,7 @@ Filesystem OS type: Linux Inode count: 1024 Block count: 16384 Reserved block count: 819 +Overhead clusters: 1543 Free blocks: 14786 Free inodes: 1005 First block: 1 diff --git a/tests/m_std/expect.1 b/tests/m_std/expect.1 index b05031f..a11cb9b 100644 --- a/tests/m_std/expect.1 +++ b/tests/m_std/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 16384 Block count: 65536 Reserved block count: 3276 +Overhead clusters: 3350 Free blocks: 62172 Free inodes: 16373 First block: 1 diff --git a/tests/m_uninit/expect.1 b/tests/m_uninit/expect.1 index e886dfb..b60e8cc 100644 --- a/tests/m_uninit/expect.1 +++ b/tests/m_uninit/expect.1 @@ -26,6 +26,7 @@ Filesystem OS type: Linux Inode count: 32768 Block count: 131072 Reserved block count: 6553 +Overhead clusters: 5677 Free blocks: 125381 Free inodes: 32757 First block: 1 diff --git a/tests/r_32to64bit/expect b/tests/r_32to64bit/expect index f5fa56b..c6816b7 100644 --- a/tests/r_32to64bit/expect +++ b/tests/r_32to64bit/expect @@ -31,7 +31,13 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -15,7 +15,8 @@ +@@ -10,13 +10,13 @@ + Inode count: 65536 + Block count: 524288 + Reserved block count: 26214 +-Overhead clusters: 35228 + Free blocks: 589 + Free inodes: 65048 First block: 1 Block size: 1024 Fragment size: 1024 @@ -41,7 +47,7 @@ Change in FS metadata: Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 1024 -@@ -40,16 +41,16 @@ +@@ -41,16 +41,16 @@ group:block:super:gdt:bbitmap:ibitmap:itable @@ -64,7 +70,7 @@ Change in FS metadata: 10:81921:-1:-1:270:286:2852 11:90113:-1:-1:271:287:3108 12:98305:-1:-1:272:288:3364 -@@ -65,9 +66,9 @@ +@@ -66,9 +66,9 @@ 22:180225:-1:-1:131079:131095:132641 23:188417:-1:-1:131080:131096:132897 24:196609:-1:-1:131081:131097:133153 @@ -76,7 +82,7 @@ Change in FS metadata: 28:229377:-1:-1:131085:131101:134177 29:237569:-1:-1:131086:131102:134433 30:245761:-1:-1:131087:131103:134689 -@@ -89,7 +90,7 @@ +@@ -90,7 +90,7 @@ 46:376833:-1:-1:262159:262175:265761 47:385025:-1:-1:262160:262176:266017 48:393217:-1:-1:393217:393233:393249 diff --git a/tests/r_32to64bit_meta/expect b/tests/r_32to64bit_meta/expect index 0eacd45..c4f3926 100644 --- a/tests/r_32to64bit_meta/expect +++ b/tests/r_32to64bit_meta/expect @@ -31,10 +31,11 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -10,11 +10,12 @@ +@@ -10,12 +10,12 @@ Inode count: 65536 Block count: 524288 Reserved block count: 26214 +-Overhead clusters: 32912 -Free blocks: 858 +Free blocks: 852 Free inodes: 65046 @@ -45,7 +46,7 @@ Change in FS metadata: Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 1024 -@@ -54,9 +55,9 @@ +@@ -55,9 +55,9 @@ 12:98305:-1:-1:15:31:3107 13:106497:-1:-1:16:32:3363 14:114689:-1:-1:17:33:3619 @@ -58,7 +59,7 @@ Change in FS metadata: 18:147457:-1:-1:131075:131091:131617 19:155649:-1:-1:131076:131092:131873 20:163841:-1:-1:131077:131093:132129 -@@ -86,9 +87,9 @@ +@@ -87,9 +87,9 @@ 44:360449:-1:-1:262158:262174:265250 45:368641:-1:-1:262159:262175:265506 46:376833:-1:-1:262160:262176:265762 diff --git a/tests/r_32to64bit_move_itable/expect b/tests/r_32to64bit_move_itable/expect index b51663d..0a3b78e 100644 --- a/tests/r_32to64bit_move_itable/expect +++ b/tests/r_32to64bit_move_itable/expect @@ -31,10 +31,11 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -10,11 +10,12 @@ +@@ -10,12 +10,12 @@ Inode count: 98304 Block count: 786432 Reserved block count: 39321 +-Overhead clusters: 41193 -Free blocks: 764 +Free blocks: 734 Free inodes: 97566 @@ -45,7 +46,7 @@ Change in FS metadata: Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 1024 -@@ -38,16 +39,16 @@ +@@ -39,16 +39,16 @@ group:block:super:gdt:bbitmap:ibitmap:itable @@ -68,7 +69,7 @@ Change in FS metadata: 10:81921:-1:-1:81921:81922:81923 11:90113:-1:-1:90113:90114:90115 12:98305:-1:-1:98305:98306:98307 -@@ -63,9 +64,9 @@ +@@ -64,9 +64,9 @@ 22:180225:-1:-1:180225:180226:180227 23:188417:-1:-1:188417:188418:188419 24:196609:-1:-1:196609:196610:196611 @@ -80,7 +81,7 @@ Change in FS metadata: 28:229377:-1:-1:229377:229378:229379 29:237569:-1:-1:237569:237570:237571 30:245761:-1:-1:245761:245762:245763 -@@ -87,7 +88,7 @@ +@@ -88,7 +88,7 @@ 46:376833:-1:-1:376833:376834:376835 47:385025:-1:-1:385025:385026:385027 48:393217:-1:-1:393217:393218:393219 @@ -89,7 +90,7 @@ Change in FS metadata: 50:409601:-1:-1:409601:409602:409603 51:417793:-1:-1:417793:417794:417795 52:425985:-1:-1:425985:425986:425987 -@@ -119,7 +120,7 @@ +@@ -120,7 +120,7 @@ 78:638977:-1:-1:638977:638978:638979 79:647169:-1:-1:647169:647170:647171 80:655361:-1:-1:655361:655362:655363 diff --git a/tests/r_64to32bit/expect b/tests/r_64to32bit/expect index 13e94a2..7dff2a0 100644 --- a/tests/r_64to32bit/expect +++ b/tests/r_64to32bit/expect @@ -31,10 +31,11 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -10,12 +10,11 @@ +@@ -10,13 +10,11 @@ Inode count: 65536 Block count: 524288 Reserved block count: 26214 +-Overhead clusters: 35246 -Free blocks: 571 +Free blocks: 589 Free inodes: 65048 @@ -45,7 +46,7 @@ Change in FS metadata: Reserved GDT blocks: 256 Blocks per group: 8192 Fragments per group: 8192 -@@ -41,16 +40,16 @@ +@@ -42,16 +40,16 @@ group:block:super:gdt:bbitmap:ibitmap:itable @@ -68,7 +69,7 @@ Change in FS metadata: 10:81921:-1:-1:272:288:2854 11:90113:-1:-1:273:289:3110 12:98305:-1:-1:274:290:3366 -@@ -66,9 +65,9 @@ +@@ -67,9 +65,9 @@ 22:180225:-1:-1:131079:131095:132641 23:188417:-1:-1:131080:131096:132897 24:196609:-1:-1:131081:131097:133153 @@ -80,7 +81,7 @@ Change in FS metadata: 28:229377:-1:-1:131085:131101:134177 29:237569:-1:-1:131086:131102:134433 30:245761:-1:-1:131087:131103:134689 -@@ -90,7 +89,7 @@ +@@ -91,7 +89,7 @@ 46:376833:-1:-1:262159:262175:265761 47:385025:-1:-1:262160:262176:266017 48:393217:-1:-1:393217:393233:393249 diff --git a/tests/r_64to32bit_meta/expect b/tests/r_64to32bit_meta/expect index d6e2dcc..b17a878 100644 --- a/tests/r_64to32bit_meta/expect +++ b/tests/r_64to32bit_meta/expect @@ -31,10 +31,11 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -10,12 +10,11 @@ +@@ -10,13 +10,11 @@ Inode count: 65536 Block count: 524288 Reserved block count: 26214 +-Overhead clusters: 32918 -Free blocks: 852 +Free blocks: 858 Free inodes: 65046 @@ -45,7 +46,7 @@ Change in FS metadata: Blocks per group: 8192 Fragments per group: 8192 Inodes per group: 1024 -@@ -55,9 +54,9 @@ +@@ -56,9 +54,9 @@ 12:98305:-1:-1:15:31:3107 13:106497:-1:-1:16:32:3363 14:114689:-1:-1:17:33:3619 @@ -58,7 +59,7 @@ Change in FS metadata: 18:147457:-1:-1:131076:131092:131618 19:155649:-1:-1:131077:131093:131874 20:163841:-1:-1:131078:131094:132130 -@@ -87,9 +86,9 @@ +@@ -88,9 +86,9 @@ 44:360449:-1:-1:262158:262174:265250 45:368641:-1:-1:262159:262175:265506 46:376833:-1:-1:262160:262176:265762 diff --git a/tests/t_disable_mcsum/expect b/tests/t_disable_mcsum/expect index e04f26a..3341ad7 100644 --- a/tests/t_disable_mcsum/expect +++ b/tests/t_disable_mcsum/expect @@ -28,7 +28,7 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -33,7 +33,6 @@ +@@ -34,7 +34,6 @@ Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks diff --git a/tests/t_disable_mcsum_noinitbg/expect b/tests/t_disable_mcsum_noinitbg/expect index a022631..62eca4e 100644 --- a/tests/t_disable_mcsum_noinitbg/expect +++ b/tests/t_disable_mcsum_noinitbg/expect @@ -28,7 +28,7 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -33,7 +33,6 @@ +@@ -34,7 +34,6 @@ Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks @@ -36,7 +36,7 @@ Change in FS metadata: Journal features: (none) Journal size: 16M Journal length: 16384 -@@ -47,18 +46,18 @@ +@@ -48,18 +47,18 @@ Block bitmap at 262 (+261) Inode bitmap at 278 (+277) Inode table at 294-549 (+293) diff --git a/tests/t_disable_mcsum_yesinitbg/expect b/tests/t_disable_mcsum_yesinitbg/expect index df3d6c0..7e3485f 100644 --- a/tests/t_disable_mcsum_yesinitbg/expect +++ b/tests/t_disable_mcsum_yesinitbg/expect @@ -28,7 +28,7 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -33,7 +33,6 @@ +@@ -34,7 +34,6 @@ Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks diff --git a/tests/t_enable_mcsum/expect b/tests/t_enable_mcsum/expect index c8a2674..cb0aef6 100644 --- a/tests/t_enable_mcsum/expect +++ b/tests/t_enable_mcsum/expect @@ -43,16 +43,16 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -10,7 +10,7 @@ - Inode count: 65536 +@@ -11,7 +11,7 @@ Block count: 524288 Reserved block count: 26214 + Overhead clusters: 35246 -Free blocks: 571 +Free blocks: 568 Free inodes: 65048 First block: 1 Block size: 1024 -@@ -33,6 +33,7 @@ +@@ -34,6 +34,7 @@ Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks @@ -60,7 +60,7 @@ Change in FS metadata: Journal features: (none) Journal size: 16M Journal length: 16384 -@@ -46,8 +47,8 @@ +@@ -47,8 +48,8 @@ Block bitmap at 262 (+261) Inode bitmap at 278 (+277) Inode table at 294-549 (+293) diff --git a/tests/t_enable_mcsum_ext3/expect b/tests/t_enable_mcsum_ext3/expect index 0f761a9..11c5a26 100644 --- a/tests/t_enable_mcsum_ext3/expect +++ b/tests/t_enable_mcsum_ext3/expect @@ -31,7 +31,7 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -29,6 +29,7 @@ +@@ -30,6 +30,7 @@ Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks @@ -39,7 +39,7 @@ Change in FS metadata: Journal features: (none) Journal size: 16M Journal length: 16384 -@@ -36,7 +37,7 @@ +@@ -37,7 +38,7 @@ Journal start: 0 @@ -48,7 +48,7 @@ Change in FS metadata: Primary superblock at 1, Group descriptors at 2-3 Reserved GDT blocks at 4-259 Block bitmap at 260 (+259) -@@ -45,7 +46,7 @@ +@@ -46,7 +47,7 @@ 0 free blocks, 1013 free inodes, 2 directories Free blocks: Free inodes: 12-1024 @@ -57,7 +57,7 @@ Change in FS metadata: Backup superblock at 8193, Group descriptors at 8194-8195 Reserved GDT blocks at 8196-8451 Block bitmap at 8452 (+259) -@@ -54,6 +55,6 @@ +@@ -55,6 +56,6 @@ 0 free blocks, 1024 free inodes, 0 directories Free blocks: Free inodes: 1025-2048 diff --git a/tests/t_enable_mcsum_initbg/expect b/tests/t_enable_mcsum_initbg/expect index e05dd60..a37648b 100644 --- a/tests/t_enable_mcsum_initbg/expect +++ b/tests/t_enable_mcsum_initbg/expect @@ -43,16 +43,16 @@ Change in FS metadata: Default mount options: user_xattr acl Filesystem state: clean Errors behavior: Continue -@@ -10,7 +10,7 @@ - Inode count: 65536 +@@ -11,7 +11,7 @@ Block count: 524288 Reserved block count: 26214 + Overhead clusters: 35246 -Free blocks: 571 +Free blocks: 568 Free inodes: 65048 First block: 1 Block size: 1024 -@@ -33,6 +33,7 @@ +@@ -34,6 +34,7 @@ Journal inode: 8 Default directory hash: half_md4 Journal backup: inode blocks @@ -60,7 +60,7 @@ Change in FS metadata: Journal features: (none) Journal size: 16M Journal length: 16384 -@@ -40,24 +41,24 @@ +@@ -41,24 +42,24 @@ Journal start: 0 diff --git a/tests/t_iexpand_full/expect b/tests/t_iexpand_full/expect index 3eb1715..354818e 100644 --- a/tests/t_iexpand_full/expect +++ b/tests/t_iexpand_full/expect @@ -20,13 +20,13 @@ tune2fs -I 256 test.img Setting inode size 256 Exit status is 0 Change in FS metadata: -@@ -13 +13 @@ +@@ -14 +14 @@ -Free blocks: 12301 +Free blocks: 12 -@@ -22 +22 @@ +@@ -23 +23 @@ -Inode blocks per group: 128 +Inode blocks per group: 256 -@@ -28 +28 @@ +@@ -29 +29 @@ -Inode size: 128 +Inode size: 256 Pass 1: Checking inodes, blocks, and sizes diff --git a/tests/t_iexpand_mcsum/expect b/tests/t_iexpand_mcsum/expect index 772bd62..c24a245 100644 --- a/tests/t_iexpand_mcsum/expect +++ b/tests/t_iexpand_mcsum/expect @@ -39,13 +39,13 @@ Change in FS metadata: @@ -5 +5 @@ -Filesystem features: has_journal ext_attr dir_index filetype extent 64bit sparse_super large_file huge_file uninit_bg dir_nlink extra_isize +Filesystem features: has_journal ext_attr dir_index filetype extent 64bit sparse_super large_file huge_file dir_nlink extra_isize metadata_csum -@@ -21 +21 @@ +@@ -22 +22 @@ -Inode blocks per group: 128 +Inode blocks per group: 256 -@@ -27 +27 @@ +@@ -28 +28 @@ -Inode size: 128 +Inode size: 256 -@@ -30,0 +31 @@ +@@ -31,0 +32 @@ +Checksum type: crc32c Pass 1: Checking inodes, blocks, and sizes Pass 2: Checking directory structure -- 1.8.3.1