diff mbox

blk-throttle: allow configure 0 for some settings --resend

Message ID 74e04440fa46aca5488912050395f2bc406f7afa.1510787708.git.shli@fb.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shaohua Li Nov. 15, 2017, 11:27 p.m. UTC
For io.low, latency target 0 is legit. 0 for rbps/wbps/rios/wios is ok
too. And we use 0 to clear io.low settings.

Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Shaohua Li <shli@fb.com>
---
 block/blk-throttle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Tejun Heo Nov. 15, 2017, 11:30 p.m. UTC | #1
On Wed, Nov 15, 2017 at 03:27:29PM -0800, Shaohua Li wrote:
> For io.low, latency target 0 is legit. 0 for rbps/wbps/rios/wios is ok
> too. And we use 0 to clear io.low settings.
> 
> Cc: Tejun Heo <tj@kernel.org>
> Signed-off-by: Shaohua Li <shli@fb.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.
diff mbox

Patch

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 96ad326..7040285 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1633,7 +1633,7 @@  static ssize_t tg_set_limit(struct kernfs_open_file *of,
 			goto out_finish;
 
 		ret = -ERANGE;
-		if (!val)
+		if (!val && off != LIMIT_LOW)
 			goto out_finish;
 
 		ret = -EINVAL;