blk-mq: blk_mq_start_hw_queue() should use blk_mq_run_hw_queue()
authorJens Axboe <axboe@fb.com>
Wed, 25 Jun 2014 14:22:34 +0000 (08:22 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 25 Jun 2014 14:22:34 +0000 (08:22 -0600)
Currently it calls __blk_mq_run_hw_queue(), which depends on the
CPU placement being correct. This means it's not possible to call
blk_mq_start_hw_queues(q) from a context that is correct for all
queues, leading to triggering the

WARN_ON(!cpumask_test_cpu(raw_smp_processor_id(), hctx->cpumask));

in __blk_mq_run_hw_queue().

Reported-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
block/blk-mq.c

index 0ef2dc7f01bf725884e9fbdff2dd5ea2a852f15b..ad69ef657e850cc79c6379667c0c501f9400a551 100644 (file)
@@ -878,7 +878,7 @@ void blk_mq_start_hw_queue(struct blk_mq_hw_ctx *hctx)
        clear_bit(BLK_MQ_S_STOPPED, &hctx->state);
 
        preempt_disable();
-       __blk_mq_run_hw_queue(hctx);
+       blk_mq_run_hw_queue(hctx, false);
        preempt_enable();
 }
 EXPORT_SYMBOL(blk_mq_start_hw_queue);