Whamcloud - gitweb
resize2fs: prevent block group descriptors from overflowing the first bg
authorTheodore Ts'o <tytso@mit.edu>
Fri, 2 Oct 2020 18:47:25 +0000 (14:47 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 2 Oct 2020 18:47:25 +0000 (14:47 -0400)
commit21bad2b6797f387756af4480d338c0b877c86ba0
tree4f3ae1d5f0df1eb64c0992ecd70b0c3647cc6551
parentb1a780ed7bc909026eab3f7318b2eafcff7d3c67
resize2fs: prevent block group descriptors from overflowing the first bg

For 1k block file systems, resizing a file system larger than
1073610752 blocks will result in the size of the block group
descriptors to be so large that it will overlap with the backup
superblock in block group #1.   This problem can be reproduced via:

    mke2fs -t ext4 /tmp/foo.img 200M
    resize2fs /tmp/foo.img 1T
    e2fsck -f /tmp/foo.img

https://github.com/tytso/e2fsprogs/issues/50

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
resize/main.c