]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
resize2fs: handle bg descriptors which overlap with other bg's metadata
authorTheodore Ts'o <tytso@mit.edu>
Sat, 29 Dec 2012 08:25:10 +0000 (03:25 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Sat, 29 Dec 2012 08:25:10 +0000 (03:25 -0500)
commitddcf1dbff2b8523c2207fbebaa4e5f42880dd2a3
treebeb45e0051a786d40dc07dbc37653dc07d4fa0f8
parent4b04fb30e01c7418331caa01ecf071bd55672f1a
resize2fs: handle bg descriptors which overlap with other bg's metadata

With flex_bg file systems, bg-specific metadata (i.e., bitmaps and the
inode table blocks) can be located in another block group.  Hence,
when we grow the number of block group descriptors, we need to check
if we need to relocate metadata blocks not just for the block group
where the bgd blocks are located, but in all block groups.

This change fixes the following test case:

rm -f foo.img; touch foo.img
truncate -s 32G foo.img
mke2fs -F -t ext4 -E resize=12582912 foo.img
e2fsck -f foo.img
truncate -s 256G foo.img
./resize2fs foo.img
e2fsck -fy foo.img

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