[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230913035033.1549277-5-chengming.zhou@linux.dev>
Date: Wed, 13 Sep 2023 03:50:31 +0000
From: chengming.zhou@...ux.dev
To: axboe@...nel.dk, ming.lei@...hat.com, bvanassche@....org,
hch@....de
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
chengming.zhou@...ux.dev,
Chengming Zhou <zhouchengming@...edance.com>
Subject: [PATCH v4 4/6] blk-mq: delete superfluous check in iterate callback
From: Chengming Zhou <zhouchengming@...edance.com>
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 <bvanassche@....org>
Signed-off-by: Chengming Zhou <zhouchengming@...edance.com>
---
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
Powered by blists - more mailing lists