archive mirror
 help / color / mirror / Atom feed
From: "Meneghini, John" <>
To: Keith Busch <>,
	"" <>,
	"" <>, "" <>
Cc: Hannes Reinecke <>,
	"Meneghini, John" <>
Subject: Re: [PATCH] nvme: Translate more status codes to blk_status_t
Date: Thu, 12 Dec 2019 19:41:50 +0000	[thread overview]
Message-ID: <> (raw)
In-Reply-To: <>

On 12/5/19, 2:58 PM, "Keith Busch" <> wrote:
    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 <>
    Cc: Hannes Reinecke <>
    Signed-off-by: Keith Busch <>
     drivers/nvme/host/core.c | 2 ++
     1 file changed, 2 insertions(+)
    diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
    index 2a84e1402244..f1731d847e38 100644
    --- a/drivers/nvme/host/core.c
    +++ b/drivers/nvme/host/core.c
    @@ -222,6 +222,8 @@ static blk_status_t nvme_error_status(u16 status)
            case NVME_SC_CAP_EXCEEDED:
                    return BLK_STS_NOSPC;
            case NVME_SC_LBA_RANGE:
    +       case NVME_SC_CMD_INTERRUPTED:
    +       case NVME_SC_NS_NOT_READY:
                    return BLK_STS_TARGET;
            case NVME_SC_BAD_ATTRIBUTES:
            case NVME_SC_ONCS_NOT_SUPPORTED:
So... I think this will address the problem I reported in [PATCH V2] nvme: Add support for ACRE Command Interrupted status

I guess we're not concerned about overloading  BLK_STS_TARGET...  I still think using BLK_STS_DEV_RESOURCE
to handle NVME_SC_CMD_INTERRUPTED is a better idea.

[BLK_STS_TARGET]        = { -EREMOTEIO, "critical target" },
[BLK_STS_DEV_RESOURCE]  = { -EBUSY,     "device resource" },

Let me test this out and I’ll see what happens.



linux-nvme mailing list

  parent reply	other threads:[~2019-12-12 19:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-05 19:57 [PATCH] nvme: Translate more status codes to blk_status_t Keith Busch
2019-12-12  9:20 ` Christoph Hellwig
2019-12-12 19:41 ` Meneghini, John [this message]
2019-12-13  7:32   ` Meneghini, John
2019-12-13 21:02     ` Sagi Grimberg
2019-12-16  8:02       ` Hannes Reinecke
2019-12-16 15:30         ` Keith Busch

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \ \ \ \ \

* 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;
as well as URLs for NNTP newsgroup(s).