blk-mq-sched: add new parameter nr_requests in blk_mq_alloc_sched_tags()
authorYu Kuai <yukuai3@huawei.com>
Wed, 10 Sep 2025 08:04:42 +0000 (16:04 +0800)
committerJens Axboe <axboe@kernel.dk>
Wed, 10 Sep 2025 11:25:56 +0000 (05:25 -0600)
commit6293e336f6d7d3f3415346ce34993b3398846166
treeb7459e1521b4ab70b9f0f40e9361213f66f92080
parente63200404477456ec60c62dd8b3b1092aba2e211
blk-mq-sched: add new parameter nr_requests in blk_mq_alloc_sched_tags()

This helper only support to allocate the default number of requests,
add a new parameter to support specific number of requests.

Prepare to fix potential deadlock in the case nr_requests grow.

Signed-off-by: Yu Kuai <yukuai3@huawei.com>
Reviewed-by: Nilay Shroff <nilay@linux.ibm.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-mq-sched.c
block/blk-mq-sched.h
block/blk-mq.h
block/elevator.c