Whamcloud - gitweb
mke2fs: batch zeroing inode table
authorLi Dongyang <dongyangli@ddn.com>
Mon, 4 Sep 2023 04:58:06 +0000 (14:58 +1000)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 4 Apr 2024 14:45:49 +0000 (10:45 -0400)
commita192f4f344456c2390ce946b4a71db0b85ce5665
treeb753dac505178aea9cdbe379865552f6e35903d1
parentca8bc9240a00665dd4c96de350e610add8543a08
mke2fs: batch zeroing inode table

For flex_bg enabled fs, we could merge the
inode table blocks into a contiguous range,
this improves mke2fs time on large devices
when lazy_itable_init is disabled.

On a 977TB device, unpatched mke2fs was running
for 449m10s before getting terminated manually.
strace shows huge number of fallocate, given the
offset from fallocate it has done 41% of the inode
tables, the estimated time needed would be 1082m.

unpatched  patched
real 449m10.954s 4m20.531s
user 0m18.217s 0m16.147s
sys 0m20.311s 0m8.944s

Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Link: https://lore.kernel.org/r/20230904045806.827621-1-dongyangli@ddn.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
misc/mke2fs.c