diff options
author | Baokun Li <[email protected]> | 2024-02-01 22:18:45 +0800 |
---|---|---|
committer | Theodore Ts'o <[email protected]> | 2024-02-21 22:46:39 -0500 |
commit | 4fbf8bc733d14bceb16dda46a3f5e19c6a9621c5 (patch) | |
tree | 4919ce933ae0246407313c816b76de3c43f636da /tools/testing/selftests/bpf/progs/test_autoload.c | |
parent | d8b945fa475f13d787df00c26a6dc45a3e2e1d1d (diff) |
ext4: correct best extent lstart adjustment logic
When yangerkun review commit 93cdf49f6eca ("ext4: Fix best extent lstart
adjustment logic in ext4_mb_new_inode_pa()"), it was found that the best
extent did not completely cover the original request after adjusting the
best extent lstart in ext4_mb_new_inode_pa() as follows:
original request: 2/10(8)
normalized request: 0/64(64)
best extent: 0/9(9)
When we check if best ex can be kept at start of goal, ac_o_ex.fe_logical
is 2 less than the adjusted best extent logical end 9, so we think the
adjustment is done. But obviously 0/9(9) doesn't cover 2/10(8), so we
should determine here if the original request logical end is less than or
equal to the adjusted best extent logical end.
In addition, add a comment stating when adjusted best_ex will not cover
the original request, and remove the duplicate assertion because adjusting
lstart makes no change to b_ex.fe_len.
Link: https://lore.kernel.org/r/[email protected]
Fixes: 93cdf49f6eca ("ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()")
Cc: <[email protected]>
Signed-off-by: yangerkun <[email protected]>
Signed-off-by: Baokun Li <[email protected]>
Reviewed-by: Jan Kara <[email protected]>
Reviewed-by: Ojaswin Mujoo <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Theodore Ts'o <[email protected]>
Diffstat (limited to 'tools/testing/selftests/bpf/progs/test_autoload.c')
0 files changed, 0 insertions, 0 deletions