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: Chao Leng <lengchao@huawei.com> [hch: rebased on top of the completion refactoring] Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Sagi Grimberg <sagi@grimberg.me> Reviewed-by: Mike Snitzer <snitzer@redhat.com> Signed-off-by: Sagi Grimberg <sagi@grimberg.me> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
Родитель
1e41f3bd26
Коммит
5eac5f3342
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче