Whamcloud - gitweb
resize2fs: avoid allocating over the MMP block
authorTheodore Ts'o <tytso@mit.edu>
Sun, 7 Mar 2021 04:08:12 +0000 (23:08 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 7 Mar 2021 04:08:12 +0000 (23:08 -0500)
commit3042900ae8fd8292266d615020d6c0e0cea0ea6e
tree5f13b3c75ec2c10eb001411929284211d9f239c5
parent67f2b54667e65cf5a478fcea8b85722be9ee6e8d
resize2fs: avoid allocating over the MMP block

When resizing past the point where the reserve inode has reserved
space for the block group descriptors to expand, and resize2fs (in an
offline resize) needs to move the allocation bitmaps and/or inode
table around, it's possible for resize2fs to allocate over the MMP
block, which would be bad.

Prevent this from happening by reserving the MMP block as a file
system metadata block (which it is) in resize2fs's accounting.

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