Skip to content

Commit

Permalink
Revert "blk-throttle: Fix IO hang for a corner case"
Browse files Browse the repository at this point in the history
This reverts commit 5b7048b.

The main purpose of this patch is cleanup.
The throtl_adjusted_limit function was removed after
commit bf20ab5 ("blk-throttle: remove
CONFIG_BLK_DEV_THROTTLING_LOW"), so the problem of not being
able to scale after setting bps or iops to 1 will not occur.
So revert this commit that bps/iops can be set to 1.

Cc: Baolin Wang <baolin.wang@linux.alibaba.com>
Cc: Yu Kuai <yukuai3@huawei.com>
Signed-off-by: Xiuhong Wang <xiuhong.wang@unisoc.com>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Acked-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Yu Kuai <yukuai3@huawei.com>
Link: https://lore.kernel.org/r/20241016024508.3340330-1-xiuhong.wang@unisoc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information
wangxiuhong134 authored and axboe committed Oct 16, 2024
1 parent 7a9b197 commit 97550f7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions block/blk-throttle.c
Original file line number Diff line number Diff line change
Expand Up @@ -1485,13 +1485,13 @@ static ssize_t tg_set_limit(struct kernfs_open_file *of,
goto out_finish;

ret = -EINVAL;
if (!strcmp(tok, "rbps") && val > 1)
if (!strcmp(tok, "rbps"))
v[0] = val;
else if (!strcmp(tok, "wbps") && val > 1)
else if (!strcmp(tok, "wbps"))
v[1] = val;
else if (!strcmp(tok, "riops") && val > 1)
else if (!strcmp(tok, "riops"))
v[2] = min_t(u64, val, UINT_MAX);
else if (!strcmp(tok, "wiops") && val > 1)
else if (!strcmp(tok, "wiops"))
v[3] = min_t(u64, val, UINT_MAX);
else
goto out_finish;
Expand Down

0 comments on commit 97550f7

Please sign in to comment.