linux-nvme.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: "Meneghini, John" <John.Meneghini@netapp.com>
To: Keith Busch <kbusch@kernel.org>,
	"linux-nvme@lists.infradead.org" <linux-nvme@lists.infradead.org>,
	"hch@lst.de" <hch@lst.de>, "sagi@grimberg.me" <sagi@grimberg.me>
Cc: Hannes Reinecke <hare@suse.de>,
	"Meneghini, John" <John.Meneghini@netapp.com>
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: <93B95176-A634-4A62-A8BF-2C599E597979@netapp.com> (raw)
In-Reply-To: <20191205195730.5774-1-kbusch@kernel.org>

On 12/5/19, 2:58 PM, "Keith Busch" <kbusch@kernel.org> 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 <John.Meneghini@netapp.com>
    Cc: Hannes Reinecke <hare@suse.de>
    Signed-off-by: Keith Busch <kbusch@kernel.org>
    ---
     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:
    --
    2.21.0
    
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.

Thanks,

/John


_______________________________________________
linux-nvme mailing list
linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme

  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 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:
  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=93B95176-A634-4A62-A8BF-2C599E597979@netapp.com \
    --to=john.meneghini@netapp.com \
    --cc=hare@suse.de \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    --subject='Re: [PATCH] nvme: Translate more status codes to blk_status_t' \
    /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

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).