From 278fa1fb23d293f6dc9add95cc0f1178af91a7db Mon Sep 17 00:00:00 2001 From: Alexey Zhuravlev Date: Fri, 9 Aug 2019 13:55:24 +0300 Subject: [PATCH] LU-12652 ldiskfs: disable credits check in 4.18 4.18 has a credits check in xattr_set path with different math resulting in false ENOSPC and subsequent failure to update LMA. as a result - many tests fail on 4.18, especially with DNE. Signed-off-by: Alexey Zhuravlev Change-Id: I82b19c0c24988aed66d74cf2323e93acffb14f31 Reviewed-on: https://review.whamcloud.com/35750 Tested-by: jenkins Reviewed-by: Andreas Dilger Reviewed-by: Wang Shilong Tested-by: Maloo Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- .../patches/rhel8/ext4-xattr-disable-credits-check.patch | 15 +++++++++++++++ ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.1.series | 1 + ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.series | 1 + 3 files changed, 17 insertions(+) create mode 100644 ldiskfs/kernel_patches/patches/rhel8/ext4-xattr-disable-credits-check.patch diff --git a/ldiskfs/kernel_patches/patches/rhel8/ext4-xattr-disable-credits-check.patch b/ldiskfs/kernel_patches/patches/rhel8/ext4-xattr-disable-credits-check.patch new file mode 100644 index 0000000..86fee40 --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel8/ext4-xattr-disable-credits-check.patch @@ -0,0 +1,15 @@ +Index: linux-4.18.0-32.el8.x86_64/fs/ext4/xattr.c +=================================================================== +--- linux-4.18.0-32.el8.x86_64.orig/fs/ext4/xattr.c ++++ linux-4.18.0-32.el8.x86_64/fs/ext4/xattr.c +@@ -655,10 +655,6 @@ enum { + flags & XATTR_CREATE); + brelse(bh); + +- if (!ext4_handle_has_enough_credits(handle, credits)) { +- error = -ENOSPC; +- goto cleanup; +- } + } + + error = ext4_reserve_inode_write(handle, inode, &is.iloc); diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.1.series b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.1.series index cb22107..14380d7 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.1.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.1.series @@ -24,3 +24,4 @@ rhel8/ext4-export-mb-stream-allocator-variables.patch rhel8/ext4-simple-blockalloc.patch rhel8/ext4-mballoc-skip-uninit-groups-cr0.patch rhel8.1/ext4-mballoc-prefetch.patch +rhel8/ext4-xattr-disable-credits-check.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.series b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.series index a64a394d..5d378bb 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.series @@ -25,3 +25,4 @@ rhel8/ext4-export-mb-stream-allocator-variables.patch rhel8/ext4-simple-blockalloc.patch rhel8/ext4-mballoc-skip-uninit-groups-cr0.patch rhel8/ext4-mballoc-prefetch.patch +rhel8/ext4-xattr-disable-credits-check.patch -- 1.8.3.1