summaryrefslogtreecommitdiff
path: root/tests/t_disable_mcsum
diff options
context:
space:
mode:
authorLi Dongyang <dongyangli@ddn.com>2020-01-26 22:06:36 -0500
committerTheodore Ts'o <tytso@mit.edu>2020-01-26 23:10:05 -0500
commit59037c5357d39c6d0f14a0aff70e67dc13eafc84 (patch)
treef85c853ef07d80759b15ddbfabe55f4eeb9481b0 /tests/t_disable_mcsum
parent6022925dc445eafb3d06793406af786645303f4a (diff)
downloade2fsprogs-59037c5357d39c6d0f14a0aff70e67dc13eafc84.tar.gz
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 <dongyangli@ddn.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'tests/t_disable_mcsum')
-rw-r--r--tests/t_disable_mcsum/expect2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/t_disable_mcsum/expect b/tests/t_disable_mcsum/expect
index e04f26ad..3341ad71 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