[PATCH] nvme: translate zns errors to blk_status_t

Keith Busch kbusch at kernel.org
Wed Sep 9 16:33:24 EDT 2020


EBUSY is the appropriate errno for commands that complete with zone
resource errors.

Signed-off-by: Keith Busch <kbusch at kernel.org>
---
 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 ea1fa41fbba8..aff556837115 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -249,6 +249,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_DEV_RESOURCE;
 	default:
 		return BLK_STS_IOERR;
 	}
-- 
2.24.1




More information about the Linux-nvme mailing list