Files
linux/block
Zizhi Wo 31a559510b blk-throttle: Fix wrong tg->[bytes/io]_disp update in __tg_update_carryover()
[ Upstream commit f66cf69eb8 ]

In commit 6cc477c368 ("blk-throttle: carry over directly"), the carryover
bytes/ios was be carried to [bytes/io]_disp. However, its update mechanism
has some issues.

In __tg_update_carryover(), we calculate "bytes" and "ios" to represent the
carryover, but the computation when updating [bytes/io]_disp is incorrect.
And if the sq->nr_queued is empty, we may not update tg->[bytes/io]_disp to
0 in tg_update_carryover(). We should set it to 0 in non carryover case.
This patch fixes the issue.

Fixes: 6cc477c368 ("blk-throttle: carry over directly")
Signed-off-by: Zizhi Wo <wozizhi@huawei.com>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Link: https://lore.kernel.org/r/20250417132054.2866409-2-wozizhi@huaweicloud.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-06-19 15:39:19 +02:00
..
2025-03-12 08:25:28 -06:00
2025-01-04 15:27:35 -07:00
2025-03-12 08:25:28 -06:00
2025-03-12 08:25:28 -06:00
2025-03-12 08:25:28 -06:00
2025-02-11 13:04:11 -07:00
2025-04-24 07:35:23 -06:00
2025-03-12 08:25:28 -06:00