Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1756095pxk; Tue, 1 Sep 2020 07:07:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw1OkhTDJ29xmf3j/HIS4tq1t1StaKuim9543XcWiDcb7LTJn8S1a77VOFncX9YJL6PoxFI X-Received: by 2002:a17:906:40c9:: with SMTP id a9mr1603900ejk.3.1598969237068; Tue, 01 Sep 2020 07:07:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598969237; cv=none; d=google.com; s=arc-20160816; b=iS/+honMwJox1nJmSctuOugWG6UnnHFmbXdg6rVhCymUgMj3HYN7C0nHWq6dN2Utun awQcd2Goc60Od7NujH+qIvqM/n+93Q5EBZi/VBefChePtQ22oRRsfLpussfJC3SiIU1P +RVukp3NkrtoaPyH/hEMdLCml5vOYOId1rYVdBG0upF273FVDZskLyb/pWlI0MLtmjdJ GLF2B5GgbXeax+HgHLI3fVE2SO6Ly0Q8O6iAXZBHO/rcM9tiBzJ+9oMn62yEk0tKbH9K JIu+KG9qlICYjnA315mZX0RB96fXRKXyGTqiTm3gKF23WipNB5LflzId8sgpDUYR6wv/ 7DgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:cc:to:from; bh=jsWRmxZYorPIf3ixDQiZTL98hDmZWFETKPTr8Fkwo4w=; b=EkSxNuzuPTc3qm2853TFlC8TqethvpQcbVBMedXW8f7Irk5q2B+VtAJdgNvuMe50N6 LE2mLYgKy/+wyRdHSnHkm0UDwQoWIA4PXEESUGsujck+8qnjixHaHyAV03eS772XnQwP supWxm3T9ydxJYn0oMZKVwumraTnod4hM5V2k3fJiQC3VNIYQ5mBu2Q73uLrzOiP96Lj SFgvqHaBR97t1sz0YuM7plOjvTCVzJD28rK3SF0YBxhdk3/fn1PLCXmPDbDHdBFTyVMR tlawRcv/dGYxp3ZRtYCgbUfPZDFjrFupt9XzJPTkmkUE/USioLQq4j4Erx/sM3fPZwOA kdnQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lw23si713164ejb.741.2020.09.01.07.06.51; Tue, 01 Sep 2020 07:07:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728275AbgIAOFd convert rfc822-to-8bit (ORCPT + 99 others); Tue, 1 Sep 2020 10:05:33 -0400 Received: from smtp.h3c.com ([60.191.123.50]:1764 "EHLO h3cspam02-ex.h3c.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728272AbgIAOEt (ORCPT ); Tue, 1 Sep 2020 10:04:49 -0400 Received: from DAG2EX10-IDC.srv.huawei-3com.com ([10.8.0.73]) by h3cspam02-ex.h3c.com with ESMTPS id 081E3IK3046769 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 1 Sep 2020 22:03:19 +0800 (GMT-8) (envelope-from tian.xianting@h3c.com) Received: from DAG2EX03-BASE.srv.huawei-3com.com (10.8.0.66) by DAG2EX10-IDC.srv.huawei-3com.com (10.8.0.73) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 1 Sep 2020 22:03:22 +0800 Received: from DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074]) by DAG2EX03-BASE.srv.huawei-3com.com ([fe80::5d18:e01c:bbbd:c074%7]) with mapi id 15.01.1713.004; Tue, 1 Sep 2020 22:03:22 +0800 From: Tianxianting To: "axboe@kernel.dk" CC: "linux-block@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: RE: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Thread-Topic: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Thread-Index: AQHWfD0K8koEXAvdJUKfqbC/GaNLZ6lT1/Nw Date: Tue, 1 Sep 2020 14:03:22 +0000 Message-ID: <465ec9bf9b7b45fb98d7f21498328300@h3c.com> References: <20200827063417.35851-1-tian.xianting@h3c.com> In-Reply-To: <20200827063417.35851-1-tian.xianting@h3c.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.99.141.128] x-sender-location: DAG2 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-DNSRBL: X-MAIL: h3cspam02-ex.h3c.com 081E3IK3046769 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jens Could I get the feedback from you whether this patch can be applied? Thanks a lot. -----Original Message----- From: tianxianting (RD) Sent: Thursday, August 27, 2020 2:34 PM To: axboe@kernel.dk Cc: linux-block@vger.kernel.org; linux-kernel@vger.kernel.org; tianxianting (RD) Subject: [PATCH] [v3] blk-mq: use BLK_MQ_NO_TAG for no tag Replace various magic -1 constants for tags with BLK_MQ_NO_TAG. Signed-off-by: Xianting Tian --- block/blk-core.c | 4 ++-- block/blk-mq-sched.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/block/blk-core.c b/block/blk-core.c index d9d632639..c7eaf7504 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -116,8 +116,8 @@ void blk_rq_init(struct request_queue *q, struct request *rq) rq->__sector = (sector_t) -1; INIT_HLIST_NODE(&rq->hash); RB_CLEAR_NODE(&rq->rb_node); - rq->tag = -1; - rq->internal_tag = -1; + rq->tag = BLK_MQ_NO_TAG; + rq->internal_tag = BLK_MQ_NO_TAG; rq->start_time_ns = ktime_get_ns(); rq->part = NULL; refcount_set(&rq->ref, 1); diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c index a19cdf159..439481f59 100644 --- a/block/blk-mq-sched.c +++ b/block/blk-mq-sched.c @@ -522,7 +522,7 @@ void blk_mq_sched_insert_request(struct request *rq, bool at_head, goto run; } - WARN_ON(e && (rq->tag != -1)); + WARN_ON(e && (rq->tag != BLK_MQ_NO_TAG)); if (blk_mq_sched_bypass_insert(hctx, !!e, rq)) { /* -- 2.17.1