From: Andrew Perepechko Date: Tue, 1 Nov 2022 16:26:54 +0000 (+0300) Subject: LU-16286 ldiskfs: reimplement nodelalloc optimization X-Git-Tag: 2.15.54~100 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3dd73b5c5d61a219c702873711055cb1cc80394a;p=fs%2Flustre-release.git LU-16286 ldiskfs: reimplement nodelalloc optimization fiemap calls perform costly delayed extent search affecting BRW performance, however, in Lustre we don't use delayed allocation at all. Let's skip this search completely as we did in RHEL7. Change-Id: I2c3562cf5cbdf3c5532e4b79b28a040a995322b7 Signed-off-by: Andrew Perepechko HPE-bug-id: LUS-11161 Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/49007 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Andreas Dilger Reviewed-by: Alexander Boyko --- diff --git a/ldiskfs/kernel_patches/patches/rhel8.4/ext4-optimize-find_delayed_extent.patch b/ldiskfs/kernel_patches/patches/rhel8.4/ext4-optimize-find_delayed_extent.patch new file mode 100644 index 0000000..a6b156a --- /dev/null +++ b/ldiskfs/kernel_patches/patches/rhel8.4/ext4-optimize-find_delayed_extent.patch @@ -0,0 +1,16 @@ +--- linux-stage.orig/fs/ext4/extents.c 2022-09-05 09:04:31.628122705 -0600 ++++ linux-stage/fs/ext4/extents.c 2022-09-06 05:32:57.083369853 -0600 +@@ -5064,6 +5064,13 @@ static int ext4_find_delayed_extent(s + struct extent_status es; + ext4_lblk_t block, next_del; + ++ if (!test_opt(inode->i_sb, DELALLOC)) { ++ if (newes->es_pblk == 0) ++ return 0; ++ ++ return EXT_MAX_BLOCKS; ++ } ++ + if (newes->es_pblk == 0) { + ext4_es_find_extent_range(inode, &ext4_es_is_delayed, + newes->es_lblk, diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.4.series b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.4.series index 2fe189e..4cf9472 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.4.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.4.series @@ -32,3 +32,4 @@ rhel8.4/ext4-enc-flag.patch base/ext4-delayed-iput.patch rhel8.5/ext4-filename-encode.patch rhel8/ext4-old_ea_inodes_handling_fix.patch +rhel8.4/ext4-optimize-find_delayed_extent.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.5.series b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.5.series index 58634b1..a4237d2 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.5.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.5.series @@ -32,3 +32,4 @@ rhel8.5/ext4-enc-flag.patch base/ext4-delayed-iput.patch rhel8.5/ext4-filename-encode.patch rhel8/ext4-old_ea_inodes_handling_fix.patch +rhel8.4/ext4-optimize-find_delayed_extent.patch diff --git a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.6.series b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.6.series index 58634b1..a4237d2 100644 --- a/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.6.series +++ b/ldiskfs/kernel_patches/series/ldiskfs-4.18-rhel8.6.series @@ -32,3 +32,4 @@ rhel8.5/ext4-enc-flag.patch base/ext4-delayed-iput.patch rhel8.5/ext4-filename-encode.patch rhel8/ext4-old_ea_inodes_handling_fix.patch +rhel8.4/ext4-optimize-find_delayed_extent.patch