[PATCH 26/39] HACK: support blk_delay_queue for blk-mq

Christoph Hellwig
2014-03-17T13:27:59Z

[-- Attachment #1: 0026-HACK-support-blk_delay_queue-for-blk-mq.patch --]
[-- Type: text/plain, Size: 713 bytes --]

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
block/blk-core.c | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/block/blk-core.c b/block/blk-core.c
index 4cd5ffc..47af781 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -163,9 +163,14 @@ static void blk_delay_work(struct work_struct *work)
struct request_queue *q;

q = container_of(work, struct request_queue, delay_work.work);
- spin_lock_irq(q->queue_lock);
- __blk_run_queue(q);
- spin_unlock_irq(q->queue_lock);
+
+ if (q->mq_ops) {
+ blk_mq_start_stopped_hw_queues(q, false);
+ } else {
+ spin_lock_irq(q->queue_lock);
+ __blk_run_queue(q);
+ spin_unlock_irq(q->queue_lock);
+ }
}

/**
--
1.7.10.4