Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@lst.de>
To: Sagi Grimberg <sagi@grimberg.me>
Cc: Keith Busch <kbusch@kernel.org>, Christoph Hellwig <hch@lst.de>,
	linux-nvme@lists.infradead.org, Chao Leng <lengchao@huawei.com>
Subject: Re: [PATCH 2/3] nvme: refactor command completion
Date: Sat, 15 Aug 2020 08:54:24 +0200	[thread overview]
Message-ID: <20200815065424.GA15518@lst.de> (raw)
In-Reply-To: <6e751fee-9e89-96c7-8246-c8af3ecfcdad@grimberg.me>

On Fri, Aug 14, 2020 at 11:37:14AM -0700, Sagi Grimberg wrote:

[fullquote deleted, sigh..]

> Would be better to reuse nvme_is_ana_error I think so we
> don't need to maintain ana status codes in both places:
>
> static inline bool nvme_is_path_error(u16 status)
> {
> 	if (nvme_is_ana_error(status))
> 		return true;
> 	switch (status & 0x7ff) {
> 	case NVME_SC_HOST_PATH_ERROR:
> 	case NVME_SC_HOST_ABORTED_CMD:
> 		return true;
> 	default:
> 		return false;
> 	}
> }

I initially had:

static inline bool nvme_is_path_error(u16 status)
{
	switch (status & 0x7ff) {
	case NVME_SC_HOST_PATH_ERROR:
	case NVME_SC_HOST_ABORTED_CMD:
		return true;
	default:
		return nvme_is_ana_error(status);
	}
}

but found that a little weird, but I can go back to it.

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

  reply	other threads:[~2020-08-15  6:54 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-14 15:15 nvme completion handling refactor and fix Christoph Hellwig
2020-08-14 15:15 ` [PATCH 1/3] nvme: rename and document nvme_end_request Christoph Hellwig
2020-08-14 18:31   ` Sagi Grimberg
2020-08-14 15:15 ` [PATCH 2/3] nvme: refactor command completion Christoph Hellwig
2020-08-14 18:37   ` Sagi Grimberg
2020-08-15  6:54     ` Christoph Hellwig [this message]
2020-08-17  7:45       ` Sagi Grimberg
2020-08-17  7:54         ` Christoph Hellwig
2020-08-17  3:30   ` Chao Leng
2020-08-14 15:15 ` [PATCH 3/3] nvme: redirect commands on dying queue Christoph Hellwig
2020-08-14 18:44   ` Sagi Grimberg
2020-08-15  6:55     ` Christoph Hellwig
2020-08-17  3:54       ` Chao Leng
2020-08-17  7:46         ` Sagi Grimberg
2020-08-17  3:41   ` Chao Leng
2020-08-17  5:49     ` Chao Leng
2020-08-17  8:13       ` Christoph Hellwig
2020-08-19  1:42         ` Chao Leng

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=20200815065424.GA15518@lst.de \
    --to=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=lengchao@huawei.com \
    --cc=linux-nvme@lists.infradead.org \
    --cc=sagi@grimberg.me \
    /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