]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commit
resize2fs: clear uninit BG if allocating from new group
authorEric Sandeen <sandeen@redhat.com>
Mon, 7 Mar 2016 02:51:23 +0000 (21:51 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 7 Mar 2016 02:51:23 +0000 (21:51 -0500)
commitf3745728bc254892da4c569ba3fd8801895f3524
treedb275f3dc183917f3fa166e7937d1bbcd29e8d44
parent96fae8869cfe393ce680369154a7847247e354ea
resize2fs: clear uninit BG if allocating from new group

If resize2fs_get_alloc_block() allocates from a BLOCK_UNINIT group, we
need to make sure that the UNINIT flag is cleared on both file system
structures which are maintained by resize2fs.  This causes the
modified bitmaps to not get written out, which leads to post-resize2fs
e2fsck errors; used blocks in UNINIT groups, not marked in the block
bitmap.  This was seen on r_ext4_small_bg.

This patch uses clear_block_uninit() to clear the flag,
and my problem goes away.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/alloc.c
lib/ext2fs/ext2fs.h
resize/resize2fs.c