blk-mq: allow the driver to pass in a queue mapping
This allows drivers specify their own queue mapping by overriding the setup-time function that builds the mq_map. This can be used for example to build the map based on the MSI-X vector mapping provided by the core interrupt layer for PCI devices. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Keith Busch <keith.busch@intel.com> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:

committed by
Jens Axboe

parent
7d7e0f90b7
commit
da695ba236
@@ -104,6 +104,7 @@ typedef void (busy_iter_fn)(struct blk_mq_hw_ctx *, struct request *, void *,
|
||||
bool);
|
||||
typedef void (busy_tag_iter_fn)(struct request *, void *, bool);
|
||||
typedef int (poll_fn)(struct blk_mq_hw_ctx *, unsigned int);
|
||||
typedef int (map_queues_fn)(struct blk_mq_tag_set *set);
|
||||
|
||||
|
||||
struct blk_mq_ops {
|
||||
@@ -144,6 +145,8 @@ struct blk_mq_ops {
|
||||
init_request_fn *init_request;
|
||||
exit_request_fn *exit_request;
|
||||
reinit_request_fn *reinit_request;
|
||||
|
||||
map_queues_fn *map_queues;
|
||||
};
|
||||
|
||||
enum {
|
||||
|
Reference in New Issue
Block a user