Skip to content

[rocky9_6] History Rebuild for kernel-5.14.0-570.19.1.el9_6 #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: rocky9_6
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
File renamed without changes.
2 changes: 1 addition & 1 deletion Makefile.rhelver
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ RHEL_MINOR = 6
#
# Use this spot to avoid future merge conflicts.
# Do not trim this comment.
RHEL_RELEASE = 570.18.1
RHEL_RELEASE = 570.19.1

#
# ZSTREAM
Expand Down
70 changes: 70 additions & 0 deletions ciq/ciq_backports/kernel-5.14.0-570.19.1.el9_6/1f6bc02f.failed
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
ext4: fallback to complex scan if aligned scan doesn't work

jira LE-3187
Rebuild_History Non-Buildable kernel-5.14.0-570.19.1.el9_6
commit-author Ojaswin Mujoo <[email protected]>
commit 1f6bc02f18489b9c9ea39b068d0695fb0e4567e9
Empty-Commit: Cherry-Pick Conflicts during history rebuild.
Will be included in final tarball splat. Ref for failed cherry-pick at:
ciq/ciq_backports/kernel-5.14.0-570.19.1.el9_6/1f6bc02f.failed

Currently in case the goal length is a multiple of stripe size we use
ext4_mb_scan_aligned() to find the stripe size aligned physical blocks.
In case we are not able to find any, we again go back to calling
ext4_mb_choose_next_group() to search for a different suitable block
group. However, since the linear search always begins from the start,
most of the times we end up with the same BG and the cycle continues.

With large fliesystems, the CPU can be stuck in this loop for hours
which can slow down the whole system. Hence, until we figure out a
better way to continue the search (rather than starting from beginning)
in ext4_mb_choose_next_group(), lets just fallback to
ext4_mb_complex_scan_group() in case aligned scan fails, as it is much
more likely to find the needed blocks.

Signed-off-by: Ojaswin Mujoo <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Link: https://lore.kernel.org/r/ee033f6dfa0a7f2934437008a909c3788233950f.1702455010.git.ojaswin@linux.ibm.com
Signed-off-by: Theodore Ts'o <[email protected]>
(cherry picked from commit 1f6bc02f18489b9c9ea39b068d0695fb0e4567e9)
Signed-off-by: Jonathan Maple <[email protected]>

# Conflicts:
# fs/ext4/mballoc.c
diff --cc fs/ext4/mballoc.c
index 7f56e4c1f4c7,ebbceb2bac4d..000000000000
--- a/fs/ext4/mballoc.c
+++ b/fs/ext4/mballoc.c
@@@ -2784,14 -2887,21 +2784,30 @@@ repeat
}

ac->ac_groups_scanned++;
- if (cr == CR_POWER2_ALIGNED)
+ if (cr == 0)
ext4_mb_simple_scan_group(ac, &e4b);
++<<<<<<< HEAD
+ else if (cr == 1 && sbi->s_stripe &&
+ !(ac->ac_g_ex.fe_len %
+ EXT4_B2C(sbi, sbi->s_stripe)))
+ ext4_mb_scan_aligned(ac, &e4b);
+ else
+ ext4_mb_complex_scan_group(ac, &e4b);
++=======
+ else {
+ bool is_stripe_aligned = sbi->s_stripe &&
+ !(ac->ac_g_ex.fe_len %
+ EXT4_B2C(sbi, sbi->s_stripe));
+
+ if ((cr == CR_GOAL_LEN_FAST ||
+ cr == CR_BEST_AVAIL_LEN) &&
+ is_stripe_aligned)
+ ext4_mb_scan_aligned(ac, &e4b);
+
+ if (ac->ac_status == AC_STATUS_CONTINUE)
+ ext4_mb_complex_scan_group(ac, &e4b);
+ }
++>>>>>>> 1f6bc02f1848 (ext4: fallback to complex scan if aligned scan doesn't work)

ext4_unlock_group(sb, group);
ext4_mb_unload_buddy(&e4b);
* Unmerged path fs/ext4/mballoc.c
Loading