summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-cpumap.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2014-04-15 16:14:00 -0400
committerJens Axboe <axboe@fb.com>2014-04-15 16:18:02 -0400
commit24d2f90309b23f2cfe016b2aebc5f0d6e01c57fd (patch)
tree10307829129eb8f96facbb89fefbba3c0032fb46 /block/blk-mq-cpumap.c
parented44832dea8a74f909e0187f350201402927f5e5 (diff)
blk-mq: split out tag initialization, support shared tags
Add a new blk_mq_tag_set structure that gets set up before we initialize the queue. A single blk_mq_tag_set structure can be shared by multiple queues. Signed-off-by: Christoph Hellwig <hch@lst.de> Modular export of blk_mq_{alloc,free}_tagset added by me. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'block/blk-mq-cpumap.c')
-rw-r--r--block/blk-mq-cpumap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/block/blk-mq-cpumap.c b/block/blk-mq-cpumap.c
index 097921329619..5d0f93cf358c 100644
--- a/block/blk-mq-cpumap.c
+++ b/block/blk-mq-cpumap.c
@@ -80,17 +80,17 @@ int blk_mq_update_queue_map(unsigned int *map, unsigned int nr_queues)
80 return 0; 80 return 0;
81} 81}
82 82
83unsigned int *blk_mq_make_queue_map(struct blk_mq_reg *reg) 83unsigned int *blk_mq_make_queue_map(struct blk_mq_tag_set *set)
84{ 84{
85 unsigned int *map; 85 unsigned int *map;
86 86
87 /* If cpus are offline, map them to first hctx */ 87 /* If cpus are offline, map them to first hctx */
88 map = kzalloc_node(sizeof(*map) * num_possible_cpus(), GFP_KERNEL, 88 map = kzalloc_node(sizeof(*map) * num_possible_cpus(), GFP_KERNEL,
89 reg->numa_node); 89 set->numa_node);
90 if (!map) 90 if (!map)
91 return NULL; 91 return NULL;
92 92
93 if (!blk_mq_update_queue_map(map, reg->nr_hw_queues)) 93 if (!blk_mq_update_queue_map(map, set->nr_hw_queues))
94 return map; 94 return map;
95 95
96 kfree(map); 96 kfree(map);