diff mbox

blk-throttle: allow configure 0 for some settings

Message ID 8113e6416a121db19c9c80212c63be960f3a45df.1507753200.git.shli@fb.com (mailing list archive)
State New, archived
Headers show

Commit Message

Shaohua Li Oct. 11, 2017, 8:22 p.m. UTC
For io.low, latency target 0 is legit. 0 for rbps/wbps/rios/wios is ok
too as long as not all of them are 0.

Signed-off-by: Shaohua Li <shli@fb.com>
---
 block/blk-throttle.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/block/blk-throttle.c b/block/blk-throttle.c
index 0fea76a..ee6d7b0 100644
--- a/block/blk-throttle.c
+++ b/block/blk-throttle.c
@@ -1632,7 +1632,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;