Whamcloud - gitweb
resize2fs: fix r_bigalloc_big_expand test failure
authorTheodore Ts'o <tytso@mit.edu>
Sun, 28 Apr 2024 01:04:33 +0000 (21:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 28 Apr 2024 02:47:33 +0000 (22:47 -0400)
commitd43fb24ca0db24cdb3d53d0cc0bf8c211f416b78
tree917dd54b9c816e2a53044a4ec6922b56866a8df8
parent53618d8de3639766ad485ab4c6a4194de5ec2b43
resize2fs: fix r_bigalloc_big_expand test failure

Manually count the number free clusters in the last block group since
it might not be a multiple of 8, and using ext2fs_bitcount() might not
work if bitmap isn't properly padding out.

In addition, when setting up the block bitmap for the resized file
system, resize2fs was setting up the "real end" of the bitmap in units
of blocks instead of clusters.

We didn't notice this problem earlier because of a test failure which
caused the test to be skipped.

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