Skip to content

Commit 732312e

Browse files
wangxiuhong134axboe
authored andcommitted
Revert "blk-throttle: Fix IO hang for a corner case"
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 <[email protected]> Cc: Yu Kuai <[email protected]> Signed-off-by: Xiuhong Wang <[email protected]> Signed-off-by: Zhiguo Niu <[email protected]> Acked-by: Tejun Heo <[email protected]> Reviewed-by: Yu Kuai <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 2887873 commit 732312e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

block/blk-throttle.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,13 +1485,13 @@ static ssize_t tg_set_limit(struct kernfs_open_file *of,
14851485
goto out_finish;
14861486

14871487
ret = -EINVAL;
1488-
if (!strcmp(tok, "rbps") && val > 1)
1488+
if (!strcmp(tok, "rbps"))
14891489
v[0] = val;
1490-
else if (!strcmp(tok, "wbps") && val > 1)
1490+
else if (!strcmp(tok, "wbps"))
14911491
v[1] = val;
1492-
else if (!strcmp(tok, "riops") && val > 1)
1492+
else if (!strcmp(tok, "riops"))
14931493
v[2] = min_t(u64, val, UINT_MAX);
1494-
else if (!strcmp(tok, "wiops") && val > 1)
1494+
else if (!strcmp(tok, "wiops"))
14951495
v[3] = min_t(u64, val, UINT_MAX);
14961496
else
14971497
goto out_finish;

0 commit comments

Comments
 (0)