Whamcloud - gitweb
LU-10837 ldiskfs: skip bitmap check if block bitmap is uninitialized 57/31957/2
authorWang Shilong <wshilong@ddn.com>
Thu, 22 Mar 2018 05:59:55 +0000 (13:59 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Thu, 3 May 2018 19:16:17 +0000 (19:16 +0000)
commit94fb83d93880e678d9396fa380e71fc3447ed0af
treecb58ce8f30a01f9232a9eae3ef6ab78695aea9af
parentabd7908cf34a592d4b5b144e3c6006d81c54bdbd
LU-10837 ldiskfs: skip bitmap check if block bitmap is uninitialized

See comments in ext4_free_clusters_after_init:
/* Return the number of free blocks in a block group.  It is used when
 * the block bitmap is uninitialized, so we can't just count the bits
 * in the bitmap. */
So extra check we enhanced here is wrong if this block group
bitmap is uninitialized, since we only check bitmaps here.

Further, Looking at EXT4_BG_BLOCK_UNINIT clear codes, Kernel
will reinit free_clusters_count when tried to clear the flag, so
extra check for uninited block bitmaps dosen't make much sense.

Let's skip uninited block bitmap check if EXT4_BG_BLOCK_UNINIT
is set, whatever free count group desc recorded is untrustable somehow

Lustre-change: https://review.whamcloud.com/31720
Lustre-commit: f7672143843a86656eaed5b9a8b89ce171b99d7a

Change-Id: I845f2e0e17e53b7e3073399bd8b0a85e3db66ef8
Signed-off-by: Wang Shilong <wshilong@ddn.com>
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31957
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
ldiskfs/kernel_patches/patches/rhel6.3/ext4-mballoc-extra-checks.patch
ldiskfs/kernel_patches/patches/rhel7/ext4-mballoc-extra-checks.patch
ldiskfs/kernel_patches/patches/sles11sp2/ext4-mballoc-extra-checks.patch
ldiskfs/kernel_patches/patches/sles12sp2/ext4-mballoc-extra-checks.patch
ldiskfs/kernel_patches/patches/sles12sp3/ext4-mballoc-extra-checks.patch