diff options
author | Jens Axboe <axboe@kernel.dk> | 2018-10-29 20:06:14 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2018-11-07 21:44:59 +0100 |
commit | ed76e329d74a4b15ac0f5fd3adbd52ec0178a134 (patch) | |
tree | 628ce9d3ac0997faef04f2d9e4f4d169594fe366 /block/blk-mq-virtio.c | |
parent | blk-mq: kill q->mq_map (diff) | |
download | linux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.tar.xz linux-ed76e329d74a4b15ac0f5fd3adbd52ec0178a134.zip |
blk-mq: abstract out queue map
This is in preparation for allowing multiple sets of maps per
queue, if so desired.
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-virtio.c')
-rw-r--r-- | block/blk-mq-virtio.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/block/blk-mq-virtio.c b/block/blk-mq-virtio.c index c3afbca11299..661fbfef480f 100644 --- a/block/blk-mq-virtio.c +++ b/block/blk-mq-virtio.c @@ -29,7 +29,7 @@ * that maps a queue to the CPUs that have irq affinity for the corresponding * vector. */ -int blk_mq_virtio_map_queues(struct blk_mq_tag_set *set, +int blk_mq_virtio_map_queues(struct blk_mq_queue_map *qmap, struct virtio_device *vdev, int first_vec) { const struct cpumask *mask; @@ -38,17 +38,17 @@ int blk_mq_virtio_map_queues(struct blk_mq_tag_set *set, if (!vdev->config->get_vq_affinity) goto fallback; - for (queue = 0; queue < set->nr_hw_queues; queue++) { + for (queue = 0; queue < qmap->nr_queues; queue++) { mask = vdev->config->get_vq_affinity(vdev, first_vec + queue); if (!mask) goto fallback; for_each_cpu(cpu, mask) - set->mq_map[cpu] = queue; + qmap->mq_map[cpu] = queue; } return 0; fallback: - return blk_mq_map_queues(set); + return blk_mq_map_queues(qmap); } EXPORT_SYMBOL_GPL(blk_mq_virtio_map_queues); |