[PATCHv2 2/2] nvme: translate zone resource errors
Keith Busch
kbusch at kernel.org
Tue Sep 15 14:12:30 EDT 2020
Translate zoned resource errors to the appropriate blk_status_t.
Signed-off-by: Keith Busch <kbusch at kernel.org>
---
v1->v2:
Use BLK_STS_ZONE_RESOURCE instead of BLK_STS_DEV_RESOURCE
drivers/nvme/host/core.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index f3a61a24d45f..6d5c95a3e03c 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -236,6 +236,9 @@ 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:
+ case NVME_SC_ZONE_TOO_MANY_OPEN:
+ return BLK_STS_ZONE_RESOURCE;
default:
return BLK_STS_IOERR;
}
--
2.24.1
More information about the Linux-nvme
mailing list