Whamcloud - gitweb
resize2fs: prevent block bitmap warnings when doing extreme fs expansions
authorTheodore Ts'o <tytso@mit.edu>
Fri, 26 Feb 2021 02:40:27 +0000 (21:40 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Fri, 26 Feb 2021 02:40:27 +0000 (21:40 -0500)
commitbb2349c518bd6d59edac4148e4cd3373731b1d27
treee38c4ecf01182d7477f26c76ad6dd04b1bf19fc1
parent37c2008f1356ba64132514346c1916f7ecc83ddb
resize2fs: prevent block bitmap warnings when doing extreme fs expansions

This commit fixes a bug where if a small file system is resized to
ridiculous sizes, such that the size of the resized block group
descriptor blocks exceed the original file system, and this would
result in resize2fs triggering a large number of scary warning
messages:

   Illegal block number passed to ext2fs_test_block_bitmap #12440
   for block bitmap for broken.img

This can be replicated via:

   ./misc/mke2fs broken.img -b 1024 -T default
   truncate -s +1500G broken.img
   ./resize/resize2fs broken.img

Fortunately, aside from triggering these warning messages, the bug had
no other bad effects.

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

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