From dda3248e7fc306e0ce3612ae96bdd9a36e2ab04f Mon Sep 17 00:00:00 2001 From: Chao Leng Date: Thu, 4 Feb 2021 08:55:11 +0100 Subject: nvme: introduce a nvme_host_path_error helper When using nvme native multipathing, if a path related error occurs during ->queue_rq, the request needs to be completed with NVME_SC_HOST_PATH_ERROR so that the request can be failed over. Introduce a helper to complete the command from ->queue_rq in a wait that invokes nvme_complete_rq. Signed-off-by: Chao Leng [hch: renamed, added a return value to clean up the callers a bit] Signed-off-by: Christoph Hellwig --- drivers/nvme/host/nvme.h | 1 + 1 file changed, 1 insertion(+) (limited to 'drivers/nvme/host/nvme.h') diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h index a72f07181091..5819f0381041 100644 --- a/drivers/nvme/host/nvme.h +++ b/drivers/nvme/host/nvme.h @@ -575,6 +575,7 @@ static inline bool nvme_is_aen_req(u16 qid, __u16 command_id) } void nvme_complete_rq(struct request *req); +blk_status_t nvme_host_path_error(struct request *req); bool nvme_cancel_request(struct request *req, void *data, bool reserved); void nvme_cancel_tagset(struct nvme_ctrl *ctrl); void nvme_cancel_admin_tagset(struct nvme_ctrl *ctrl); -- cgit v1.2.3