Commit e1f425e7 authored by Keith Busch's avatar Keith Busch Committed by Jens Axboe

nvme/multipath: Use blk_path_error

Uses common code for determining if an error should be retried on
alternate path.
Acked-by: default avatarMike Snitzer <snitzer@redhat.com>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarKeith Busch <keith.busch@intel.com>
Reviewed-by: default avatarJohannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 9111e568
...@@ -37,19 +37,7 @@ bool nvme_req_needs_failover(struct request *req, blk_status_t error) ...@@ -37,19 +37,7 @@ bool nvme_req_needs_failover(struct request *req, blk_status_t error)
{ {
if (!(req->cmd_flags & REQ_NVME_MPATH)) if (!(req->cmd_flags & REQ_NVME_MPATH))
return false; return false;
return blk_path_error(error);
switch (error) {
case BLK_STS_NOTSUPP:
case BLK_STS_NOSPC:
case BLK_STS_TARGET:
case BLK_STS_NEXUS:
case BLK_STS_MEDIUM:
case BLK_STS_PROTECTION:
return false;
}
/* Everything else could be a path failure, so should be retried */
return true;
} }
void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl) void nvme_kick_requeue_lists(struct nvme_ctrl *ctrl)
......
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