Whamcloud - gitweb
resize2fs: Fix corruption bug impacting ext4 filesystems with uninit_bg
authorTheodore Ts'o <tytso@mit.edu>
Sun, 19 Apr 2009 02:42:13 +0000 (22:42 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 19 Apr 2009 02:42:13 +0000 (22:42 -0400)
commit2d7361ebfae31d462027479fd32799e01b37ec19
treec2bee587ad0dfef4a6956c52f8540398a203167a
parentc09043f1abb99c73d681e630ee0a4b142e4abf6b
resize2fs: Fix corruption bug impacting ext4 filesystems with uninit_bg

Due to a fencepost bug, when skipping a block group whose block bitmap
was uninitialized (and hence could not contain any blocks eligible for
relaocation), the block immediately following the block group wasn't
checked as well.  If it was in use and required relocation, it
wouldn't get properly relocated, with the result that an inode using
such a block would end up, post resize, with a pointer to a block now
outside the bounds of the filesystem.

This commit fixes this fencepost error.

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