[dm-devel] [PATCHv2 4/4] block: blk-mq support for cloned requests
Keith Busch
keith.busch at intel.com
Fri Oct 17 23:46:38 UTC 2014
Use blk-mq to insert cloned requests if it was allocated from a
multi-queue block driver.
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
block/blk-core.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/block/blk-core.c b/block/blk-core.c
index 3abbc04..4c5952b 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2031,6 +2031,11 @@ int blk_insert_cloned_request(struct request_queue *q, struct request *rq)
should_fail_request(&rq->rq_disk->part0, blk_rq_bytes(rq)))
return -EIO;
+ if (q->mq_ops) {
+ blk_mq_insert_request(rq, false, true, true);
+ return 0;
+ }
+
spin_lock_irqsave(q->queue_lock, flags);
if (unlikely(blk_queue_dying(q))) {
spin_unlock_irqrestore(q->queue_lock, flags);
--
1.7.10.4
More information about the dm-devel
mailing list