diff mbox series

[2/3] blk-mq: delete redundant tagset map update when fallback

Message ID 20230821095602.70742-2-chengming.zhou@linux.dev (mailing list archive)
State New, archived
Headers show
Series [1/3] blk-mq: fix tags leak when shrink nr_hw_queues | expand

Commit Message

Chengming Zhou Aug. 21, 2023, 9:56 a.m. UTC
From: Chengming Zhou <zhouchengming@bytedance.com>

When we increase nr_hw_queues fail, the fallback path will use
blk_mq_update_queue_map() to clear and update all maps.
Obviously, this line of update of HCTX_TYPE_DEFAULT only is not
needed, so delete it.

Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>
---
 block/blk-mq.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Ming Lei Aug. 22, 2023, 12:46 p.m. UTC | #1
On Mon, Aug 21, 2023 at 05:56:01PM +0800, chengming.zhou@linux.dev wrote:
> From: Chengming Zhou <zhouchengming@bytedance.com>
> 
> When we increase nr_hw_queues fail, the fallback path will use
> blk_mq_update_queue_map() to clear and update all maps.
> Obviously, this line of update of HCTX_TYPE_DEFAULT only is not
> needed, so delete it.
> 
> Signed-off-by: Chengming Zhou <zhouchengming@bytedance.com>

Reviewed-by: Ming Lei <ming.lei@redhat.com>
diff mbox series

Patch

diff --git a/block/blk-mq.c b/block/blk-mq.c
index 8af29a3b1400..8d02bafff331 100644
--- a/block/blk-mq.c
+++ b/block/blk-mq.c
@@ -4737,7 +4737,6 @@  static void __blk_mq_update_nr_hw_queues(struct blk_mq_tag_set *set,
 				__blk_mq_free_map_and_rqs(set, i);
 
 			set->nr_hw_queues = prev_nr_hw_queues;
-			blk_mq_map_queues(&set->map[HCTX_TYPE_DEFAULT]);
 			goto fallback;
 		}
 		blk_mq_map_swqueue(q);