[dm-devel] blk-mq request allocation stalls
Keith Busch
keith.busch at intel.com
Mon Jan 12 18:35:59 UTC 2015
On Mon, 12 Jan 2015, Keith Busch wrote:
> Oh, let's look at "__blk_rq_prep_clone". dm calls that after
> blk_get_request() for the blk-mq based multipath types and overrides the
> destinations cmd_flags with the source's even though the source was not
> allocated from a blk-mq based queue, much less a shared tag.
Untested patch. This will also preserve the failfast cmd_flag dm-mpath
set after allocating.
---
diff --git a/block/blk-core.c b/block/blk-core.c
index 7e78931..6201090 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -2895,7 +2895,10 @@ EXPORT_SYMBOL_GPL(blk_rq_unprep_clone);
static void __blk_rq_prep_clone(struct request *dst, struct request *src)
{
dst->cpu = src->cpu;
- dst->cmd_flags = (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE;
+ if (dst->q->mq_ops)
+ dst->cmd_flags |= (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE;
+ else
+ dst->cmd_flags = (src->cmd_flags & REQ_CLONE_MASK) | REQ_NOMERGE;
dst->cmd_type = src->cmd_type;
dst->__sector = blk_rq_pos(src);
dst->__data_len = blk_rq_bytes(src);
--
More information about the dm-devel
mailing list