Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3053420rdb; Tue, 12 Sep 2023 23:48:43 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwtDDiXyQRnHKfL70K6jiGpPpfWdAi3RGA4RlZjzKhXwCvQ1i9HBGeRrPHSDf1ju43fcjw X-Received: by 2002:a05:620a:b5d:b0:76d:93e1:99f4 with SMTP id x29-20020a05620a0b5d00b0076d93e199f4mr1508094qkg.8.1694587723385; Tue, 12 Sep 2023 23:48:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694587723; cv=none; d=google.com; s=arc-20160816; b=OQz9IlKkN5lrBiLzcgwxA5R76KGdIR1d1587muehdzeemEPxT/QSN0X+et3E0aPcHt Z6q4/i7VmHUTBIpTJDfpZzcMmc5/plZJQdMkNaw0Zc1G5YpbDuXaYPiKm088XqkVgfBf Nl39KRRNvdbanQhu7+IiDzgqkLL0bvBMdNGKi51mClikH6wRvnVWg1k7fZXKwlcrPv4d Ix3kpPsJjgrbohlpLS7MiS6WDg0/iYbdljdp0ysW2MFUt2sbCOFO2r1rqFf4NEMFftB7 k08UqEi4WoMSgnPObc8c7mwFgIX52Cab+wkpxh0ZiqAr8+URjt/eVJCe2xaWlJJV6APp 9ILw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CwOToPUftF0QYoHtVkc85ZdKan8gl08CbzCEbRbTyKA=; fh=0kSCNnJ+Dz7/k19JqdLGTHBnZxdhAtg5C+lF7soNwhs=; b=JB91fUAuMJpJha6k+QT9M7ASqleDDXU+C+ECA0qj+IpRvOT7Jo1QG9YlrSVeB2Pm2d hWL8OYeUd6YFefMPnWKyWMQ1+1VjaEKCp/EXGQ3QfAyjGXoTAtx1XhLtdgnFsYadBNG5 cJJdhNvUYzPY9CFt66g6eutvX4q3S4bp3pU1K6QRl8OKZgYHMWZMrPcg4qop4wrtoS3w Kn5w+4iFmf+3Ne+7ud8+337/YcRHelctOf2Nwb1Kx2aCNYe8Y+KS/zaFPnKpxXB4bTnS lQnww+DaW0I88TtzYXngOh5Hsd27FLu4f4NL5bIFompiFXQyQCYmj/fLTfEgIeb8HvvE 8qmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aKCAzuHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Return-Path: Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id o9-20020a634e49000000b00574134c9ac4si9272748pgl.524.2023.09.12.23.48.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Sep 2023 23:48:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linux.dev header.s=key1 header.b=aKCAzuHc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linux.dev Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 5DC698243BC5; Tue, 12 Sep 2023 20:51:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238280AbjIMDv2 (ORCPT + 99 others); Tue, 12 Sep 2023 23:51:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53836 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238250AbjIMDvT (ORCPT ); Tue, 12 Sep 2023 23:51:19 -0400 Received: from out-224.mta0.migadu.com (out-224.mta0.migadu.com [91.218.175.224]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6ED0A173C for ; Tue, 12 Sep 2023 20:51:11 -0700 (PDT) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1694577069; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CwOToPUftF0QYoHtVkc85ZdKan8gl08CbzCEbRbTyKA=; b=aKCAzuHc3FjbIB54vrQc5onYeA8q2UVdaWLmog2d/11qaoDItd1QfZ+kudbyz/gvqOsXMt ILAShXyZaHeE6/+qrx6SJtAqP187/lvCLrAlXVZzO0VISLUxn9TDX0IIS0m4OIaXwOC/4g RBOYyy+zxiz+Qth/sfIkfX5f0oxAVlw= From: chengming.zhou@linux.dev To: axboe@kernel.dk, ming.lei@redhat.com, bvanassche@acm.org, hch@lst.de Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, chengming.zhou@linux.dev, Chengming Zhou Subject: [PATCH v4 4/6] blk-mq: delete superfluous check in iterate callback Date: Wed, 13 Sep 2023 03:50:31 +0000 Message-Id: <20230913035033.1549277-5-chengming.zhou@linux.dev> In-Reply-To: <20230913035033.1549277-1-chengming.zhou@linux.dev> References: <20230913035033.1549277-1-chengming.zhou@linux.dev> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 12 Sep 2023 20:51:35 -0700 (PDT) From: Chengming Zhou The previous patch in this series changed the behavior of blk_mq_queue_tag_busy_iter() from iterating over all allocated tags into iterating over started requests only. Leave out the code from blk_mq_rq_inflight() that became superfluous because of this change. Reviewed-by: Bart Van Assche Signed-off-by: Chengming Zhou --- block/blk-mq.c | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/block/blk-mq.c b/block/blk-mq.c index 1fafd54dce3c..1473b49350c4 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -1513,19 +1513,15 @@ EXPORT_SYMBOL(blk_mq_delay_kick_requeue_list); static bool blk_mq_rq_inflight(struct request *rq, void *priv) { + bool *busy = priv; + /* * If we find a request that isn't idle we know the queue is busy * as it's checked in the iter. * Return false to stop the iteration. */ - if (blk_mq_request_started(rq)) { - bool *busy = priv; - - *busy = true; - return false; - } - - return true; + *busy = true; + return false; } bool blk_mq_queue_inflight(struct request_queue *q) -- 2.40.1