Commit 5eac5f33 authored by Chao Leng's avatar Chao Leng Committed by Jens Axboe

nvme: redirect commands on dying queue

If a command send through nvme-multipath failed on a dying queue, resend it
on another path.
Signed-off-by: default avatarChao Leng <lengchao@huawei.com>
[hch: rebased on top of the completion refactoring]
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarSagi Grimberg <sagi@grimberg.me>
Reviewed-by: default avatarMike Snitzer <snitzer@redhat.com>
Signed-off-by: default avatarSagi Grimberg <sagi@grimberg.me>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 1e41f3bd
...@@ -274,13 +274,14 @@ static inline enum nvme_disposition nvme_decide_disposition(struct request *req) ...@@ -274,13 +274,14 @@ static inline enum nvme_disposition nvme_decide_disposition(struct request *req)
return COMPLETE; return COMPLETE;
if (req->cmd_flags & REQ_NVME_MPATH) { if (req->cmd_flags & REQ_NVME_MPATH) {
if (nvme_is_path_error(nvme_req(req)->status)) if (nvme_is_path_error(nvme_req(req)->status) ||
blk_queue_dying(req->q))
return FAILOVER; return FAILOVER;
} else {
if (blk_queue_dying(req->q))
return COMPLETE;
} }
if (blk_queue_dying(req->q))
return COMPLETE;
return RETRY; return RETRY;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment