From: James Simmons Date: Fri, 14 Jun 2013 11:44:17 +0000 (-0400) Subject: LU-3021 ldiskfs: to not verify preallocation in umount path X-Git-Tag: 2.4.52~29 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6aad6ae81a46394b82c565c39c7b4f711e5b0936 LU-3021 ldiskfs: to not verify preallocation in umount path When recovery test is running, device rdonly flag is set and all updates will be erred out so on-disk data can be inconsistent with memory data. Signed-off-by: Jinshan Xiong Signed-off-by: James Simmons Change-Id: I69d3fa462c69f5f85978265075165b488661e863 Reviewed-on: http://review.whamcloud.com/5883 Reviewed-by: Andreas Dilger Tested-by: Hudson Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Oleg Drokin --- diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-not-discard-preallocation-umount.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-not-discard-preallocation-umount.patch new file mode 100644 index 0000000..a52d91f --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-not-discard-preallocation-umount.patch @@ -0,0 +1,14 @@ +Index: linux-stage/fs/ext4/mballoc.c +=================================================================== +--- linux-stage.orig/fs/ext4/mballoc.c ++++ linux-stage/fs/ext4/mballoc.c +@@ -3781,7 +3781,8 @@ ext4_mb_release_inode_pa(struct ext4_bud + * from the bitmap and continue. + */ + } +- BUG_ON(pa->pa_free != free); ++ /* do not verify if the file system is being umounted */ ++ BUG_ON(atomic_read(&sb->s_active) > 0 && pa->pa_free != free); + atomic_add(free, &sbi->s_mb_discarded); + + return err; diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series index 6bdb397..639c546 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.4.series @@ -42,3 +42,4 @@ rhel6.4/ext4-fix-mbgroups-access.patch rhel6.3/ext4-fix-ext4_mb_add_n_trim.patch rhel6.3/ext4-max-dir-size.patch rhel6.4/ext4-max-dir-size-options.patch +rhel6.3/ext4-not-discard-preallocation-umount.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series index 75eb54c..89125c6d 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-rhel6.series @@ -42,3 +42,4 @@ rhel6.3/ext4-fix-mbgroups-access.patch rhel6.3/ext4-fix-ext4_mb_add_n_trim.patch rhel6.3/ext4-max-dir-size.patch rhel6.3/ext4-max-dir-size-options.patch +rhel6.3/ext4-not-discard-preallocation-umount.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series index 2e18297..53aa553 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-2.6-sles11.series @@ -42,3 +42,4 @@ rhel6.3/ext4-quota-first-class.patch rhel6.3/ext4-fix-ext4_mb_add_n_trim.patch rhel6.3/ext4-max-dir-size.patch sles11sp1/ext4-max-dir-size-options.patch +rhel6.3/ext4-not-discard-preallocation-umount.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series b/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series index 598524c..179edb7 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-3.0-sles11.series @@ -43,3 +43,4 @@ sles11sp2/ext4-store-tree-generation-at-find.patch sles11sp2/ext4_pdirop.patch rhel6.3/ext4-max-dir-size.patch sles11sp2/ext4-max-dir-size-options.patch +rhel6.3/ext4-not-discard-preallocation-umount.patch