From: keith.busch@intel.com (Keith Busch)
Subject: [PATCHv2 1/5] nvme: Add more command status translation
Date: Tue, 9 Jan 2018 12:04:14 -0700 [thread overview]
Message-ID: <20180109190418.7123-2-keith.busch@intel.com> (raw)
In-Reply-To: <20180109190418.7123-1-keith.busch@intel.com>
This adds more NVMe status code translations to blk_status_t values,
and captures all the current status codes NVMe multipath uses.
Acked-by: Mike Snitzer <snitzer at redhat.com>
Reviewed-by: Hannes Reinecke <hare at suse.com>
Signed-off-by: Keith Busch <keith.busch at intel.com>
---
drivers/nvme/host/core.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
index 2a69d735efbc..499f3141e365 100644
--- a/drivers/nvme/host/core.c
+++ b/drivers/nvme/host/core.c
@@ -157,13 +157,20 @@ static blk_status_t nvme_error_status(struct request *req)
return BLK_STS_OK;
case NVME_SC_CAP_EXCEEDED:
return BLK_STS_NOSPC;
+ case NVME_SC_LBA_RANGE:
+ return BLK_STS_TARGET;
+ case NVME_SC_BAD_ATTRIBUTES:
case NVME_SC_ONCS_NOT_SUPPORTED:
+ case NVME_SC_INVALID_OPCODE:
+ case NVME_SC_INVALID_FIELD:
+ case NVME_SC_INVALID_NS:
return BLK_STS_NOTSUPP;
case NVME_SC_WRITE_FAULT:
case NVME_SC_READ_ERROR:
case NVME_SC_UNWRITTEN_BLOCK:
case NVME_SC_ACCESS_DENIED:
case NVME_SC_READ_ONLY:
+ case NVME_SC_COMPARE_FAILED:
return BLK_STS_MEDIUM;
case NVME_SC_GUARD_CHECK:
case NVME_SC_APPTAG_CHECK:
--
2.13.6
next prev parent reply other threads:[~2018-01-09 19:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-09 19:04 [PATCHv2 0/5] nvme/dm failover unification Keith Busch
2018-01-09 19:04 ` Keith Busch [this message]
2018-01-10 7:58 ` [dm-devel] [PATCHv2 1/5] nvme: Add more command status translation Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 2/5] nvme/multipath: Consult blk_status_t for failover Keith Busch
2018-01-10 8:02 ` [dm-devel] " Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 3/5] block: Provide blk_status_t decoding for path errors Keith Busch
2018-01-10 8:06 ` [dm-devel] " Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 4/5] nvme/multipath: Use blk_path_error Keith Busch
2018-01-10 8:06 ` [dm-devel] " Johannes Thumshirn
2018-01-09 19:04 ` [PATCHv2 5/5] dm mpath: " Keith Busch
2018-01-10 8:07 ` [dm-devel] " Johannes Thumshirn
2018-01-10 8:28 ` [PATCHv2 0/5] nvme/dm failover unification Christoph Hellwig
2018-01-10 17:52 ` Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180109190418.7123-2-keith.busch@intel.com \
--to=keith.busch@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox