Whamcloud - gitweb
resize2fs: fix off-line resize of file systems with flex_bg && !resize_inode
authorTheodore Ts'o <tytso@mit.edu>
Sun, 31 Mar 2013 17:24:39 +0000 (13:24 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 1 Apr 2013 00:40:57 +0000 (20:40 -0400)
commitf026f1a37061a021f7188c9e45d0fbff1bde9e60
tree6b7453df1c999c33e76ee485cdbdd945fca3e736
parent871ad942641b604631a9d33a7008e073ba946a9e
resize2fs: fix off-line resize of file systems with flex_bg && !resize_inode

When doing an off-line resize2fs of an initially very small file
system, it's possible to run out of reserved gdt blocks (which are
reserved via the resize inode).  Once we run out, we need to move the
allocation bitmaps and inode table out of the way to grow the gdt
blocks.  Unfortunately, when moving these metadata blocks, it was
possible that a block that had been just been newly allocated for a
new block group could also get allocated for a metadata block for an
existing block group that was being moved.

To prevent this, after we grow the gdt blocks and allocate the
metadata blocks for the new block groups, make sure all of these
blocks are marked as reserved.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Reported-by: John Jolly <john.jolly@gmail.com>
resize/resize2fs.c