From: Lokesh Nagappa Jaliminche Date: Thu, 14 Apr 2016 08:12:01 +0000 (+0530) Subject: LU-7922 ldiskfs: correction in ext4_kzalloc X-Git-Tag: 2.8.53~41 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=101e729708289e46fe858a6b7162f779e24dfa5a LU-7922 ldiskfs: correction in ext4_kzalloc ext4_kzalloc uses kmalloc instead of kzalloc, this was introduced by commit 9933fc0. Due to this get_orlov_stats was not working properly, making orlov allocator completely random. kmalloc is replaced with kzalloc to get correct stats.This is corrected in kernel as part of following commit v3.0-7217-gdb9481c04 Added __GFP_NOWARN to k.alloc calls with v.alloc fallbacks as per this commit v3.11-rc2-221-g8be04b937. Seagate-bug-id: MRP-3412 Signed-off-by: Lokesh Nagappa Jaliminche Change-Id: I15f1a28537cb5e4f32d63527c99508383e12c97f Reviewed-on: http://review.whamcloud.com/19541 Tested-by: Jenkins Reviewed-by: Andreas Dilger Reviewed-by: Yang Sheng Tested-by: Maloo --- diff --git a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch index 290b514..6bea919 100644 --- a/ldiskfs/kernel_patches/patches/rhel6.3/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch +++ b/ldiskfs/kernel_patches/patches/rhel6.3/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch @@ -38,7 +38,7 @@ Signed-off-by: Jeff Mahoney +{ + void *ret; + -+ ret = kmalloc(size, flags); ++ ret = kmalloc(size, flags | __GFP_NOWARN); + if (!ret) + ret = __vmalloc(size, flags, PAGE_KERNEL); + return ret; @@ -48,7 +48,7 @@ Signed-off-by: Jeff Mahoney +{ + void *ret; + -+ ret = kmalloc(size, flags); ++ ret = kzalloc(size, flags | __GFP_NOWARN); + if (!ret) + ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); + return ret; diff --git a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch index 3da7dac..30cb1e7 100644 --- a/ldiskfs/kernel_patches/patches/sles11sp2/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch +++ b/ldiskfs/kernel_patches/patches/sles11sp2/ext4-introduce-ext4_kvmalloc-ext4_kzalloc-and-ext4_kvfree.patch @@ -42,7 +42,7 @@ index cfe9f39..658f586 100644 +{ + void *ret; + -+ ret = kmalloc(size, flags); ++ ret = kmalloc(size, flags | __GFP_NOWARN); + if (!ret) + ret = __vmalloc(size, flags, PAGE_KERNEL); + return ret; @@ -52,7 +52,7 @@ index cfe9f39..658f586 100644 +{ + void *ret; + -+ ret = kmalloc(size, flags); ++ ret = kzalloc(size, flags | __GFP_NOWARN); + if (!ret) + ret = __vmalloc(size, flags | __GFP_ZERO, PAGE_KERNEL); + return ret;