[PATCH v2 1/9] blk-mq: remove blk_mq_in_flight()

Yu Kuai posted 9 patches 7 months, 3 weeks ago
There is a newer version of this series
[PATCH v2 1/9] blk-mq: remove blk_mq_in_flight()
Posted by Yu Kuai 7 months, 3 weeks ago
From: Yu Kuai <yukuai3@huawei.com>

It's not used and can be removed.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
---
 block/blk-mq.c | 10 ----------
 block/blk-mq.h |  2 --
 2 files changed, 12 deletions(-)

diff --git a/block/blk-mq.c b/block/blk-mq.c
index c2697db59109..301dbd3e1743 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -101,16 +101,6 @@ static bool blk_mq_check_inflight(struct request *rq, void *priv)
 	return true;
 }
 
-unsigned int blk_mq_in_flight(struct request_queue *q,
-		struct block_device *part)
-{
-	struct mq_inflight mi = { .part = part };
-
-	blk_mq_queue_tag_busy_iter(q, blk_mq_check_inflight, &mi);
-
-	return mi.inflight[0] + mi.inflight[1];
-}
-
 void blk_mq_in_flight_rw(struct request_queue *q, struct block_device *part,
 		unsigned int inflight[2])
 {
diff --git a/block/blk-mq.h b/block/blk-mq.h
index 3011a78cf16a..a23d5812d08f 100644
--- a/block/blk-mq.h
+++ b/block/blk-mq.h
@@ -246,8 +246,6 @@ static inline bool blk_mq_hw_queue_mapped(struct blk_mq_hw_ctx *hctx)
 	return hctx->nr_ctx && hctx->tags;
 }
 
-unsigned int blk_mq_in_flight(struct request_queue *q,
-		struct block_device *part);
 void blk_mq_in_flight_rw(struct request_queue *q, struct block_device *part,
 		unsigned int inflight[2]);
 
-- 
2.39.2
Re: [PATCH v2 1/9] blk-mq: remove blk_mq_in_flight()
Posted by Hannes Reinecke 7 months, 3 weeks ago
On 4/27/25 10:29, Yu Kuai wrote:
> From: Yu Kuai <yukuai3@huawei.com>
> 
> It's not used and can be removed.
> 
> Signed-off-by: Yu Kuai <yukuai3@huawei.com>
> ---
>   block/blk-mq.c | 10 ----------
>   block/blk-mq.h |  2 --
>   2 files changed, 12 deletions(-)
> 
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@suse.de                                +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
Re: [PATCH v2 1/9] blk-mq: remove blk_mq_in_flight()
Posted by John Garry 7 months, 3 weeks ago
On 27/04/2025 09:29, Yu Kuai wrote:
> From: Yu Kuai<yukuai3@huawei.com>
> 
> It's not used and can be removed.
> 

it's nice to mention when it stopped being used.

> Signed-off-by: Yu Kuai<yukuai3@huawei.com>

Regardless, FWIW:
Reviewed-by: John Garry <john.g.garry@oracle.com>
Re: [PATCH v2 1/9] blk-mq: remove blk_mq_in_flight()
Posted by Yu Kuai 7 months, 3 weeks ago
Hi,

在 2025/04/28 21:45, John Garry 写道:
> On 27/04/2025 09:29, Yu Kuai wrote:
>> From: Yu Kuai<yukuai3@huawei.com>
>>
>> It's not used and can be removed.
>>
> 
> it's nice to mention when it stopped being used.

Ok
> 
>> Signed-off-by: Yu Kuai<yukuai3@huawei.com>
> 
> Regardless, FWIW:
> Reviewed-by: John Garry <john.g.garry@oracle.com>

Thanks,
Kuai

> 
> .
> 

Re: [PATCH v2 1/9] blk-mq: remove blk_mq_in_flight()
Posted by Christoph Hellwig 7 months, 3 weeks ago
Looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>