From patchwork Wed Nov 15 23:27:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 10060507 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 2F22F604D4 for ; Wed, 15 Nov 2017 23:27:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 183112A2AD for ; Wed, 15 Nov 2017 23:27:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0CC5B2A2B5; Wed, 15 Nov 2017 23:27:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9C66D2A2AD for ; Wed, 15 Nov 2017 23:27:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933513AbdKOX1o (ORCPT ); Wed, 15 Nov 2017 18:27:44 -0500 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:47474 "EHLO mx0a-00082601.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933448AbdKOX1c (ORCPT ); Wed, 15 Nov 2017 18:27:32 -0500 Received: from pps.filterd (m0001255.ppops.net [127.0.0.1]) by mx0b-00082601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAFNRWET016948 for ; Wed, 15 Nov 2017 15:27:32 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fb.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=facebook; bh=CIZvugfkgZHxAK4nuRTA+dAatebkzs/FuxwO16VBVkw=; b=Ye02AEhvIi2lkpPvJBfhAhbjMZ9pGd8ylxcZ9cAUxp6ciMs1Y+8qQQN3I5QDe2DT3N5W yBL7XojPr/f91DuU9DfbDf26Aq7hinTDg9Dz+NAP6exMErIGZ3YMLvoOUVdJxu3WXAD8 4AsGeYRBmzGSlYQ1UEfWzPkZi6BGyEBV+Vc= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0b-00082601.pphosted.com with ESMTP id 2e8x9p85p0-1 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 15 Nov 2017 15:27:31 -0800 Received: from mx-out.facebook.com (192.168.52.123) by PRN-CHUB09.TheFacebook.com (192.168.16.19) with Microsoft SMTP Server id 14.3.361.1; Wed, 15 Nov 2017 15:27:30 -0800 Received: by devbig638.prn2.facebook.com (Postfix, from userid 11222) id 04B5B4240827; Wed, 15 Nov 2017 15:27:29 -0800 (PST) Smtp-Origin-Hostprefix: devbig From: Shaohua Li Smtp-Origin-Hostname: devbig638.prn2.facebook.com To: CC: Jens Axboe , , Tejun Heo Smtp-Origin-Cluster: prn2c22 Subject: [PATCH] blk-throttle: allow configure 0 for some settings --resend Date: Wed, 15 Nov 2017 15:27:29 -0800 Message-ID: <74e04440fa46aca5488912050395f2bc406f7afa.1510787708.git.shli@fb.com> X-Mailer: git-send-email 2.9.5 X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-15_11:, , signatures=0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Shaohua Li Acked-by: Tejun Heo --- block/blk-throttle.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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;