aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorJens Axboe <axboe@fb.com>2014-05-28 12:18:51 -0400
committerJens Axboe <axboe@fb.com>2014-05-28 12:18:51 -0400
commit0fb662e2250afdf2c54253dbf2063dc9d8369b69 (patch)
tree6a1014ab27531dae2702894e9e3cb6cdad9f0d60 /drivers/block
parent6178976500ae61fa7b12ebb2d3de816dc9396388 (diff)
parentcdef54dd85ad66e77262ea57796a3e81683dd5d6 (diff)
Merge branch 'for-3.16/core' into for-3.16/drivers
Pull in core changes (again), since we got rid of the alloc/free hctx mq_ops hooks and mtip32xx then needed updating again. Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c2
-rw-r--r--drivers/block/null_blk.c28
-rw-r--r--drivers/block/virtio_blk.c2
3 files changed, 1 insertions, 31 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index ea323e91903b..74abd49fabdc 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -3832,8 +3832,6 @@ static int mtip_init_cmd(void *data, struct request *rq, unsigned int hctx_idx,
3832static struct blk_mq_ops mtip_mq_ops = { 3832static struct blk_mq_ops mtip_mq_ops = {
3833 .queue_rq = mtip_queue_rq, 3833 .queue_rq = mtip_queue_rq,
3834 .map_queue = blk_mq_map_queue, 3834 .map_queue = blk_mq_map_queue,
3835 .alloc_hctx = blk_mq_alloc_single_hw_queue,
3836 .free_hctx = blk_mq_free_single_hw_queue,
3837 .init_request = mtip_init_cmd, 3835 .init_request = mtip_init_cmd,
3838 .exit_request = mtip_free_cmd, 3836 .exit_request = mtip_free_cmd,
3839}; 3837};
diff --git a/drivers/block/null_blk.c b/drivers/block/null_blk.c
index 5a8081114df6..77087a29b127 100644
--- a/drivers/block/null_blk.c
+++ b/drivers/block/null_blk.c
@@ -321,18 +321,6 @@ static int null_queue_rq(struct blk_mq_hw_ctx *hctx, struct request *rq)
321 return BLK_MQ_RQ_QUEUE_OK; 321 return BLK_MQ_RQ_QUEUE_OK;
322} 322}
323 323
324static struct blk_mq_hw_ctx *null_alloc_hctx(struct blk_mq_tag_set *set,
325 unsigned int hctx_index,
326 int node)
327{
328 return kzalloc_node(sizeof(struct blk_mq_hw_ctx), GFP_KERNEL, node);
329}
330
331static void null_free_hctx(struct blk_mq_hw_ctx *hctx, unsigned int hctx_index)
332{
333 kfree(hctx);
334}
335
336static void null_init_queue(struct nullb *nullb, struct nullb_queue *nq) 324static void null_init_queue(struct nullb *nullb, struct nullb_queue *nq)
337{ 325{
338 BUG_ON(!nullb); 326 BUG_ON(!nullb);
@@ -360,17 +348,6 @@ static struct blk_mq_ops null_mq_ops = {
360 .map_queue = blk_mq_map_queue, 348 .map_queue = blk_mq_map_queue,
361 .init_hctx = null_init_hctx, 349 .init_hctx = null_init_hctx,
362 .complete = null_softirq_done_fn, 350 .complete = null_softirq_done_fn,
363 .alloc_hctx = blk_mq_alloc_single_hw_queue,
364 .free_hctx = blk_mq_free_single_hw_queue,
365};
366
367static struct blk_mq_ops null_mq_ops_pernode = {
368 .queue_rq = null_queue_rq,
369 .map_queue = blk_mq_map_queue,
370 .init_hctx = null_init_hctx,
371 .complete = null_softirq_done_fn,
372 .alloc_hctx = null_alloc_hctx,
373 .free_hctx = null_free_hctx,
374}; 351};
375 352
376static void null_del_dev(struct nullb *nullb) 353static void null_del_dev(struct nullb *nullb)
@@ -496,10 +473,7 @@ static int null_add_dev(void)
496 goto out_free_nullb; 473 goto out_free_nullb;
497 474
498 if (queue_mode == NULL_Q_MQ) { 475 if (queue_mode == NULL_Q_MQ) {
499 if (use_per_node_hctx) 476 nullb->tag_set.ops = &null_mq_ops;
500 nullb->tag_set.ops = &null_mq_ops_pernode;
501 else
502 nullb->tag_set.ops = &null_mq_ops;
503 nullb->tag_set.nr_hw_queues = submit_queues; 477 nullb->tag_set.nr_hw_queues = submit_queues;
504 nullb->tag_set.queue_depth = hw_queue_depth; 478 nullb->tag_set.queue_depth = hw_queue_depth;
505 nullb->tag_set.numa_node = home_node; 479 nullb->tag_set.numa_node = home_node;
diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c
index 9f340fafca5c..c8f286e8d80f 100644
--- a/drivers/block/virtio_blk.c
+++ b/drivers/block/virtio_blk.c
@@ -497,8 +497,6 @@ static int virtblk_init_request(void *data, struct request *rq,
497static struct blk_mq_ops virtio_mq_ops = { 497static struct blk_mq_ops virtio_mq_ops = {
498 .queue_rq = virtio_queue_rq, 498 .queue_rq = virtio_queue_rq,
499 .map_queue = blk_mq_map_queue, 499 .map_queue = blk_mq_map_queue,
500 .alloc_hctx = blk_mq_alloc_single_hw_queue,
501 .free_hctx = blk_mq_free_single_hw_queue,
502 .complete = virtblk_request_done, 500 .complete = virtblk_request_done,
503 .init_request = virtblk_init_request, 501 .init_request = virtblk_init_request,
504}; 502};