mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-12-27 12:21:22 -05:00
Merge tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4
Pull ext4 fix from Ted Ts'o: "Fix an ext4 regression which landed during the 6.4 merge window" * tag 'ext4_for_linus_stable' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: Revert "ext4: remove ac->ac_found > sbi->s_mb_min_to_scan dead check in ext4_mb_check_limits"
This commit is contained in:
@@ -2062,7 +2062,7 @@ static void ext4_mb_check_limits(struct ext4_allocation_context *ac,
|
||||
if (bex->fe_len < gex->fe_len)
|
||||
return;
|
||||
|
||||
if (finish_group)
|
||||
if (finish_group || ac->ac_found > sbi->s_mb_min_to_scan)
|
||||
ext4_mb_use_best_found(ac, e4b);
|
||||
}
|
||||
|
||||
@@ -2074,6 +2074,20 @@ static void ext4_mb_check_limits(struct ext4_allocation_context *ac,
|
||||
* in the context. Later, the best found extent will be used, if
|
||||
* mballoc can't find good enough extent.
|
||||
*
|
||||
* The algorithm used is roughly as follows:
|
||||
*
|
||||
* * If free extent found is exactly as big as goal, then
|
||||
* stop the scan and use it immediately
|
||||
*
|
||||
* * If free extent found is smaller than goal, then keep retrying
|
||||
* upto a max of sbi->s_mb_max_to_scan times (default 200). After
|
||||
* that stop scanning and use whatever we have.
|
||||
*
|
||||
* * If free extent found is bigger than goal, then keep retrying
|
||||
* upto a max of sbi->s_mb_min_to_scan times (default 10) before
|
||||
* stopping the scan and using the extent.
|
||||
*
|
||||
*
|
||||
* FIXME: real allocation policy is to be designed yet!
|
||||
*/
|
||||
static void ext4_mb_measure_extent(struct ext4_allocation_context *ac,
|
||||
|
||||
Reference in New Issue
Block a user