]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
5.4-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2022 11:55:43 +0000 (13:55 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 27 Sep 2022 11:55:43 +0000 (13:55 +0200)
added patches:
ext4-make-directory-inode-spreading-reflect-flexbg-size.patch

queue-5.4/ext4-make-directory-inode-spreading-reflect-flexbg-size.patch [new file with mode: 0644]
queue-5.4/series

diff --git a/queue-5.4/ext4-make-directory-inode-spreading-reflect-flexbg-size.patch b/queue-5.4/ext4-make-directory-inode-spreading-reflect-flexbg-size.patch
new file mode 100644 (file)
index 0000000..3c06822
--- /dev/null
@@ -0,0 +1,39 @@
+From 613c5a85898d1cd44e68f28d65eccf64a8ace9cf Mon Sep 17 00:00:00 2001
+From: Jan Kara <jack@suse.cz>
+Date: Thu, 8 Sep 2022 11:21:26 +0200
+Subject: ext4: make directory inode spreading reflect flexbg size
+
+From: Jan Kara <jack@suse.cz>
+
+commit 613c5a85898d1cd44e68f28d65eccf64a8ace9cf upstream.
+
+Currently the Orlov inode allocator searches for free inodes for a
+directory only in flex block groups with at most inodes_per_group/16
+more directory inodes than average per flex block group. However with
+growing size of flex block group this becomes unnecessarily strict.
+Scale allowed difference from average directory count per flex block
+group with flex block group size as we do with other metrics.
+
+Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
+Tested-by: Ojaswin Mujoo <ojaswin@linux.ibm.com>
+Cc: stable@kernel.org
+Link: https://lore.kernel.org/all/0d81a7c2-46b7-6010-62a4-3e6cfc1628d6@i2se.com/
+Signed-off-by: Jan Kara <jack@suse.cz>
+Link: https://lore.kernel.org/r/20220908092136.11770-3-jack@suse.cz
+Signed-off-by: Theodore Ts'o <tytso@mit.edu>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+---
+ fs/ext4/ialloc.c |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/fs/ext4/ialloc.c
++++ b/fs/ext4/ialloc.c
+@@ -500,7 +500,7 @@ static int find_group_orlov(struct super
+               goto fallback;
+       }
+-      max_dirs = ndirs / ngroups + inodes_per_group / 16;
++      max_dirs = ndirs / ngroups + inodes_per_group*flex_size / 16;
+       min_inodes = avefreei - inodes_per_group*flex_size / 4;
+       if (min_inodes < 1)
+               min_inodes = 1;
index b1eb65c81691d36772496f08d525cbdfc49bc1b2..abe426d32733befc3eeadfaff56274f4a9ada10f 100644 (file)
@@ -112,3 +112,4 @@ xfs-split-the-sunit-parameter-update-into-two-parts.patch
 xfs-don-t-commit-sunit-swidth-updates-to-disk-if-that-would-cause-repair-failures.patch
 xfs-fix-an-abba-deadlock-in-xfs_rename.patch
 xfs-fix-use-after-free-when-aborting-corrupt-attr-inactivation.patch
+ext4-make-directory-inode-spreading-reflect-flexbg-size.patch