summaryrefslogtreecommitdiffstats
path: root/drivers/nvme
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2020-09-24 13:53:29 -0700
committerJens Axboe <axboe@kernel.dk>2020-10-13 15:05:05 -0600
commitafaf5c6c81d736d7a3376801f4af396b04292191 (patch)
tree60905307882372e821a9458fbbab7f350622ea18 /drivers/nvme
parent3b481d91356e5693d8358d4ef9c383bdb92c8da0 (diff)
downloadlinux-afaf5c6c81d736d7a3376801f4af396b04292191.tar.gz
linux-afaf5c6c81d736d7a3376801f4af396b04292191.tar.bz2
linux-afaf5c6c81d736d7a3376801f4af396b04292191.zip
nvme: translate zone resource errors
Translate zoned resource errors to the appropriate blk_status_t. Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Damien Le Moal <damien.lemoal@wdc.com> Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'drivers/nvme')
-rw-r--r--drivers/nvme/host/core.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 56e2a22e8a02..95ef4943d8bd 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -248,6 +248,10 @@ static blk_status_t nvme_error_status(u16 status)
return BLK_STS_NEXUS;
case NVME_SC_HOST_PATH_ERROR:
return BLK_STS_TRANSPORT;
+ case NVME_SC_ZONE_TOO_MANY_ACTIVE:
+ return BLK_STS_ZONE_ACTIVE_RESOURCE;
+ case NVME_SC_ZONE_TOO_MANY_OPEN:
+ return BLK_STS_ZONE_OPEN_RESOURCE;
default:
return BLK_STS_IOERR;
}