Skip to content

Commit 35038bf

Browse files
keithbuschaxboe
authored andcommitted
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 <[email protected]> Cc: Hannes Reinecke <[email protected]> Reviewed-by: Christoph Hellwig <[email protected]> Signed-off-by: Keith Busch <[email protected]> Signed-off-by: Jens Axboe <[email protected]>
1 parent 83c9c54 commit 35038bf

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

drivers/nvme/host/core.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ static blk_status_t nvme_error_status(u16 status)
222222
case NVME_SC_CAP_EXCEEDED:
223223
return BLK_STS_NOSPC;
224224
case NVME_SC_LBA_RANGE:
225+
case NVME_SC_CMD_INTERRUPTED:
226+
case NVME_SC_NS_NOT_READY:
225227
return BLK_STS_TARGET;
226228
case NVME_SC_BAD_ATTRIBUTES:
227229
case NVME_SC_ONCS_NOT_SUPPORTED:

0 commit comments

Comments
 (0)