summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2019-12-06 04:50:44 +0900
committerJens Axboe <axboe@kernel.dk>2020-01-10 08:55:50 -0700
commit35038bffa87da282010b91108cadd13238bb5bbd (patch)
tree577fdb3ccabc42b1c38e8ecbe93c710c7a91d335
parent83c9c547168e8b914ea6398430473a4de68c52cc (diff)
downloadblackbird-op-linux-35038bffa87da282010b91108cadd13238bb5bbd.tar.gz
blackbird-op-linux-35038bffa87da282010b91108cadd13238bb5bbd.zip
nvme: Translate more status codes to blk_status_t
Decode interrupted command and not ready namespace nvme status codes to BLK_STS_TARGET. These are not generic IO errors and should use a non-path specific error so that it can use the non-failover retry path. Reported-by: John Meneghini <John.Meneghini@netapp.com> Cc: Hannes Reinecke <hare@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r--drivers/nvme/host/core.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 667f18f465be..5dc32b72e7fa 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -222,6 +222,8 @@ static blk_status_t nvme_error_status(u16 status)
case NVME_SC_CAP_EXCEEDED:
return BLK_STS_NOSPC;
case NVME_SC_LBA_RANGE:
+ case NVME_SC_CMD_INTERRUPTED:
+ case NVME_SC_NS_NOT_READY:
return BLK_STS_TARGET;
case NVME_SC_BAD_ATTRIBUTES:
case NVME_SC_ONCS_NOT_SUPPORTED:
OpenPOWER on IntegriCloud