blk-throttle: Fix IO hang for a corner case
authorBaolin Wang <baolin.wang@linux.alibaba.com>
Thu, 8 Oct 2020 03:52:25 +0000 (11:52 +0800)
committerJens Axboe <axboe@kernel.dk>
Thu, 8 Oct 2020 14:01:38 +0000 (08:01 -0600)
commit5b7048b89745c3c5fb4b3080fb7bced61dba2a2b
tree42f5930231ace93e1cb02357fecbe6f67fa17593
parentb185efa78bf9f13e32f115169e4ab35e68993461
blk-throttle: Fix IO hang for a corner case

It can not scale up in throtl_adjusted_limit() if we set bps or iops is
1, which will cause IO hang when enable low limit. Thus we should treat
1 as a illegal value to avoid this issue.

Signed-off-by: Baolin Wang <baolin.wang@linux.alibaba.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-throttle.c