On Wed, 2019-04-03 at 14:47 -0700, Sagi Grimberg wrote: +AD4 +AD4 I have not been able to reproduce this issue. But you may want to try +AD4 +AD4 the following patch (applies on top of v5.1-rc3): +AD4 +AD4 +AD4 +AD4 +AD4 +AD4 Subject: +AFs-PATCH+AF0 block: Fix blk+AF8-mq+AF8-try+AF8-issue+AF8-directly() +AD4 +AD4 +AD4 +AD4 If blk+AF8-mq+AF8-try+AF8-issue+AF8-directly() returns BLK+AF8-STS+ACoAXw-RESOURCE that means that +AD4 +AD4 the request has not been queued and that the caller should retry to submit +AD4 +AD4 the request. Both blk+AF8-mq+AF8-request+AF8-bypass+AF8-insert() and +AD4 +AD4 blk+AF8-mq+AF8-sched+AF8-insert+AF8-request() guarantee that a request will be processed. +AD4 +AD4 Hence return BLK+AF8-STS+AF8-OK if one of these functions is called. This patch +AD4 +AD4 avoids that blk+AF8-mq+AF8-dispatch+AF8-rq+AF8-list() crashes when using dm-mpath. +AD4 +AD4 +AD4 +AD4 Reported-by: Laurence Oberman +ADw-loberman+AEA-redhat.com+AD4 +AD4 +AD4 Fixes: 7f556a44e61d (+ACI-blk-mq: refactor the code of issue request directly+ACI) +ACM v5.0. +AD4 +AD4 Signed-off-by: Bart Van Assche +ADw-bvanassche+AEA-acm.org+AD4 +AD4 +AD4 --- +AD4 +AD4 block/blk-mq.c +AHw 9 +-+-------- +AD4 +AD4 1 file changed, 2 insertions(+-), 7 deletions(-) +AD4 +AD4 +AD4 +AD4 diff --git a/block/blk-mq.c b/block/blk-mq.c +AD4 +AD4 index 652d0c6d5945..b2c20dce8a30 100644 +AD4 +AD4 --- a/block/blk-mq.c +AD4 +AD4 +-+-+- b/block/blk-mq.c +AD4 +AD4 +AEAAQA -1859,16 +-1859,11 +AEAAQA blk+AF8-status+AF8-t blk+AF8-mq+AF8-try+AF8-issue+AF8-directly(struct blk+AF8-mq+AF8-hw+AF8-ctx +ACo-hctx, +AD4 +AD4 case BLK+AF8-STS+AF8-RESOURCE: +AD4 +AD4 if (force) +AHs +AD4 +AD4 blk+AF8-mq+AF8-request+AF8-bypass+AF8-insert(rq, run+AF8-queue)+ADs +AD4 +AD4 - /+ACo +AD4 +AD4 - +ACo We have to return BLK+AF8-STS+AF8-OK for the DM +AD4 +AD4 - +ACo to avoid livelock. Otherwise, we return +AD4 +AD4 - +ACo the real result to indicate whether the +AD4 +AD4 - +ACo request is direct-issued successfully. +AD4 +AD4 - +ACo-/ +AD4 +AD4 - ret +AD0 bypass ? BLK+AF8-STS+AF8-OK : ret+ADs +AD4 +AD4 +- ret +AD0 BLK+AF8-STS+AF8-OK+ADs +AD4 +AD4 +AH0 else if (+ACE-bypass) +AHs +AD4 +AD4 blk+AF8-mq+AF8-sched+AF8-insert+AF8-request(rq, false, +AD4 +AD4 run+AF8-queue, false)+ADs +AD4 +AD4 +- ret +AD0 BLK+AF8-STS+AF8-OK+ADs +AD4 +AD4 +AH0 +AD4 +AD4 I would move the ret assignment here after the condition statement. How is that expected to work for the +ACE-force +ACYAJg bypass case? I don't want to alter +ACI-ret+ACI in that case. Thanks, Bart.