From patchwork Wed Oct 11 20:22:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shaohua Li X-Patchwork-Id: 10000517 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 CEFE860216 for ; Wed, 11 Oct 2017 20:22:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C259F28B69 for ; Wed, 11 Oct 2017 20:22:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B479328B6D; Wed, 11 Oct 2017 20:22:58 +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 510AA28B69 for ; Wed, 11 Oct 2017 20:22:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752411AbdJKUW5 (ORCPT ); Wed, 11 Oct 2017 16:22:57 -0400 Received: from mx0b-00082601.pphosted.com ([67.231.153.30]:41920 "EHLO mx0b-00082601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752275AbdJKUW4 (ORCPT ); Wed, 11 Oct 2017 16:22:56 -0400 Received: from pps.filterd (m0109331.ppops.net [127.0.0.1]) by mx0a-00082601.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id v9BKI9B3017741 for ; Wed, 11 Oct 2017 13:22:56 -0700 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=VUtWe2erf5DYbZsalmGxDJlP2To7DY+3N7yGPoruUgg=; b=SoMaAFM7E9SXNTip1vStyMl/n8iMkET+hJyG1PrMd7A27Yz8e1G0XMmNStJhI2vGXYiq fmUsyYkiRnkQbwdJ54DuxhZx2UDLkYFY0MsPMZL0CAptnx0i9D2OF2R+NqfigMr4Kmw+ iohs+WioUaRQ5CrFNCZBd9mF++ibKbCt2Tc= Received: from mail.thefacebook.com ([199.201.64.23]) by mx0a-00082601.pphosted.com with ESMTP id 2dhr6qrh2v-2 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Wed, 11 Oct 2017 13:22:56 -0700 Received: from mx-out.facebook.com (192.168.52.123) by PRN-CHUB10.TheFacebook.com (192.168.16.20) with Microsoft SMTP Server id 14.3.319.2; Wed, 11 Oct 2017 13:22:54 -0700 Received: by devbig638.prn2.facebook.com (Postfix, from userid 11222) id E339042403A0; Wed, 11 Oct 2017 13:22:08 -0700 (PDT) Smtp-Origin-Hostprefix: devbig From: Shaohua Li Smtp-Origin-Hostname: devbig638.prn2.facebook.com To: CC: Jens Axboe , Smtp-Origin-Cluster: prn2c22 Subject: [PATCH] blk-throttle: allow configure 0 for some settings Date: Wed, 11 Oct 2017 13:22:08 -0700 Message-ID: <8113e6416a121db19c9c80212c63be960f3a45df.1507753200.git.shli@fb.com> X-Mailer: git-send-email 2.9.5 X-FB-Internal: Safe MIME-Version: 1.0 X-Proofpoint-Spam-Reason: safe X-FB-Internal: Safe X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-10-11_06:, , signatures=0 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 as long as not all of them are 0. Signed-off-by: Shaohua Li --- 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 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;