Whamcloud - gitweb
LU-15002 mke2fs: try to pack the GDT blocks together
Once a 4KiB block filesystem is 256TiB+ in size, the GDT grows
larger than the 128MiB size of the first block group, and would
overlap the backup superblock+GDT normally in the next group.
If this is the case, mke2fs will now automatically enable the
sparse_super2 and flex_bg features to allow the primary GDT to
spill into the second group, instead of enabling meta_bg, unless
meta_bg is explicitly requested.
Since sparse_super2 and flexbg already allow flexible placement
of the first and second backup superblock+GDT, no change is
needed to ext4 or e2fsck to use such a filesystem.
Using sparse_super2 and flexbg is preferable to meta_bg because it
packs the metadata close together at the start of the device. This
avoids millions of seeks at filesystem mount/open to read the
GDT blocks spread across a large filesystem by meta_bg.
Currently with sparse_super2 the backup superblock and GDT are put
in group #1 group and last group. To allow the primary GDT to
spill into group #1, relocate the backups to the same group numbers
3^n, 5^n, 7^n that normal "sparse_super" backups are in. The
first backup is close to the start of the device, while the second
backup is in a "sparse_super" group near the end of the device.
Remove the m_resize_inode_meta_bg test case, since mke2fs no
longer enables the meta_bg feature automatically.
Change-Id: I90a1d3b448fc17d4b11e8f52e41cf4ce87b89e08
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/tools/e2fsprogs/+/51295
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>