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 <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>
1 parent 83c9c54 commit 35038bf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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)