Whamcloud - gitweb
LU-1365 resize2fs: clear uninit if allocating from new group 31/23831/9 v1.42.13.wc6
authorEric Sandeen <sandeen@redhat.com>
Sun, 2 Apr 2017 01:51:39 +0000 (09:51 +0800)
committerAndreas Dilger <andreas.dilger@intel.com>
Fri, 5 May 2017 21:02:28 +0000 (21:02 +0000)
commit6ba8ad101d4a8331b8131abb56ea821b77b7d2b0
treebc0d75449b6fa2716289daff9c52cb4601a62ffb
parentb44aec24e65d1bb38908c4cb5becbe6a5f9c74ef
LU-1365 resize2fs: clear uninit 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.

E2fsprogs-commit: f3745728bc254892da4c569ba3fd8801895f3524

Change-Id: I5aa430cf6a9e7f07088b0accabccbdec5f93647e
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Li Xi <lixi@ddn.com>
Reviewed-on: https://review.whamcloud.com/23831
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
lib/ext2fs/alloc.c
lib/ext2fs/ext2fs.h
resize/resize2fs.c