diff options
| author | Nilay Shroff <nilay@linux.ibm.com> | 2025-07-30 13:16:07 +0530 |
|---|---|---|
| committer | Jens Axboe <axboe@kernel.dk> | 2025-07-30 06:20:51 -0600 |
| commit | 49811586be373e26a3ab52f54e0dfa663c02fddd (patch) | |
| tree | a6d88add0ff7bc1a9cfa3184856cf553fd8b2d7b /block/elevator.h | |
| parent | 5421681bc3ef13476bd9443379cd69381e8760fa (diff) | |
| download | linux-49811586be373e26a3ab52f54e0dfa663c02fddd.tar.gz linux-49811586be373e26a3ab52f54e0dfa663c02fddd.tar.bz2 linux-49811586be373e26a3ab52f54e0dfa663c02fddd.zip | |
block: move elevator queue allocation logic into blk_mq_init_sched
In preparation for allocating sched_tags before freezing the request
queue and acquiring ->elevator_lock, move the elevator queue allocation
logic from the elevator ops ->init_sched callback into blk_mq_init_sched.
As elevator_alloc is now only invoked from block layer core, we don't
need to export it, so unexport elevator_alloc function.
This refactoring provides a centralized location for elevator queue
initialization, which makes it easier to store pre-allocated sched_tags
in the struct elevator_queue during later changes.
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nilay Shroff <nilay@linux.ibm.com>
Link: https://lore.kernel.org/r/20250730074614.2537382-2-nilay@linux.ibm.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/elevator.h')
| -rw-r--r-- | block/elevator.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/block/elevator.h b/block/elevator.h index a07ce773a38f..a4de5f9ad790 100644 --- a/block/elevator.h +++ b/block/elevator.h @@ -24,7 +24,7 @@ struct blk_mq_alloc_data; struct blk_mq_hw_ctx; struct elevator_mq_ops { - int (*init_sched)(struct request_queue *, struct elevator_type *); + int (*init_sched)(struct request_queue *, struct elevator_queue *); void (*exit_sched)(struct elevator_queue *); int (*init_hctx)(struct blk_mq_hw_ctx *, unsigned int); void (*exit_hctx)(struct blk_mq_hw_ctx *, unsigned int); |
