aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/nvme/host/nvme.h
diff options
context:
space:
mode:
authorKeith Busch <keith.busch@intel.com>2018-01-09 12:04:15 -0700
committerJens Axboe <axboe@kernel.dk>2018-01-10 10:52:14 -0700
commit908e45643d6450551bfbdbad3f088d4bd1f1c1fb (patch)
tree45a893345f37919db0d584202b724b6292a31d37 /drivers/nvme/host/nvme.h
parentnvme: Add more command status translation (diff)
downloadlinux-dev-908e45643d6450551bfbdbad3f088d4bd1f1c1fb.tar.xz
linux-dev-908e45643d6450551bfbdbad3f088d4bd1f1c1fb.zip
nvme/multipath: Consult blk_status_t for failover
This removes nvme multipath's specific status decoding to see if failover is needed, using the generic blk_status_t that was decoded earlier. This abstraction from the raw NVMe status means all status decoding exists in one place. Acked-by: Mike Snitzer <snitzer@redhat.com> Reviewed-by: Hannes Reinecke <hare@suse.com> Signed-off-by: Keith Busch <keith.busch@intel.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme/host/nvme.h')
-rw-r--r--drivers/nvme/host/nvme.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/nvme/host/nvme.h b/drivers/nvme/host/nvme.h
index eecf71ce6e75..4112fb6ce80d 100644
--- a/drivers/nvme/host/nvme.h
+++ b/drivers/nvme/host/nvme.h
@@ -402,7 +402,7 @@ extern const struct block_device_operations nvme_ns_head_ops;
#ifdef CONFIG_NVME_MULTIPATH
void nvme_failover_req(struct request *req);
-bool nvme_req_needs_failover(struct request *req);
+bool nvme_req_needs_failover(struct request *req, blk_status_t error);
void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl);
int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl,struct nvme_ns_head *head);
void nvme_mpath_add_disk(struct nvme_ns_head *head);
@@ -422,7 +422,8 @@ struct nvme_ns *nvme_find_path(struct nvme_ns_head *head);
static inline void nvme_failover_req(struct request *req)
{
}
-static inline bool nvme_req_needs_failover(struct request *req)
+static inline bool nvme_req_needs_failover(struct request *req,
+ blk_status_t error)
{
return false;
}