Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Weiwen Hu <huweiwen@linux.alibaba.com>
To: linux-nvme@lists.infradead.org,
	Chaitanya Kulkarni <chaitanyak@nvidia.com>,
	Keith Busch <kbusch@kernel.org>
Cc: Mike Christie <michael.christie@oracle.com>,
	Christoph Hellwig <hch@lst.de>,
	Weiwen Hu <huweiwen@linux.alibaba.com>
Subject: [PATCH v2 0/4] clarify NVMe status symbol names
Date: Mon,  3 Jun 2024 20:56:58 +0800	[thread overview]
Message-ID: <20240603125702.97368-1-huweiwen@linux.alibaba.com> (raw)

This patchset clarifies the NVMe status related symbol names.
- status: the u16 field in the struct nvme_request.
- SC:     status code,      status & 0x00FF
- SCT:    status code type, status & 0x0700
This should match the NVMe spec and most of the existing code.
The exceptions are unified in this patchset.

It may be a little bit strange that we should use NVME_SCT_SC_MASK when
matching the NVME_SC_* codes. But changing all the codes to NVME_SCT_SC_*
requires too much changes, and making the names too long.
So I choose to keep them.

The previous version is:
https://lore.kernel.org/linux-nvme/20240529122300.92377-1-huweiwen@linux.alibaba.com/T

Changes in v2:
- Add a mailmap entry for myself.
- Rebased on nvme-6.10, dropped the patch that is already applied.
- The parameter of nvme_status_to_pr_err is renamed to "status", to make it
  shorter and matching the existing code.

Weiwen Hu (4):
  nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err
  nvme: fix status magic numbers
  nvme: rename CDR/MORE/DNR to NVME_STATUS_*
  mailmap: add entry for Weiwen Hu

 .mailmap                               |  1 +
 drivers/nvme/host/constants.c          |  2 +-
 drivers/nvme/host/core.c               | 40 +++++++++++-----------
 drivers/nvme/host/fabrics.c            | 10 +++---
 drivers/nvme/host/fault_inject.c       |  2 +-
 drivers/nvme/host/fc.c                 |  6 ++--
 drivers/nvme/host/multipath.c          |  2 +-
 drivers/nvme/host/nvme.h               |  6 ++--
 drivers/nvme/host/pr.c                 | 10 +++---
 drivers/nvme/target/admin-cmd.c        | 24 +++++++-------
 drivers/nvme/target/core.c             | 46 +++++++++++++-------------
 drivers/nvme/target/discovery.c        | 14 ++++----
 drivers/nvme/target/fabrics-cmd-auth.c | 16 ++++-----
 drivers/nvme/target/fabrics-cmd.c      | 36 ++++++++++----------
 drivers/nvme/target/io-cmd-bdev.c      | 12 +++----
 drivers/nvme/target/passthru.c         | 10 +++---
 drivers/nvme/target/rdma.c             | 10 +++---
 drivers/nvme/target/tcp.c              |  4 +--
 drivers/nvme/target/zns.c              | 30 ++++++++---------
 include/linux/nvme.h                   | 16 +++++++--
 20 files changed, 154 insertions(+), 143 deletions(-)

-- 
2.45.1



             reply	other threads:[~2024-06-03 12:58 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-03 12:56 Weiwen Hu [this message]
2024-06-03 12:56 ` [PATCH v2 1/4] nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err Weiwen Hu
2024-06-04 23:57   ` Chaitanya Kulkarni
2024-06-05  8:54   ` Sagi Grimberg
2024-06-03 12:57 ` [PATCH v2 2/4] nvme: fix status magic numbers Weiwen Hu
2024-06-05  0:02   ` Chaitanya Kulkarni
2024-06-05  8:55   ` Sagi Grimberg
2024-06-03 12:57 ` [PATCH v2 3/4] nvme: rename CDR/MORE/DNR to NVME_STATUS_* Weiwen Hu
2024-06-05  0:03   ` Chaitanya Kulkarni
2024-06-05  8:55   ` Sagi Grimberg
2024-06-03 12:57 ` [PATCH v2 4/4] mailmap: add entry for Weiwen Hu Weiwen Hu
2024-06-04  4:25 ` [PATCH v2 0/4] clarify NVMe status symbol names Christoph Hellwig

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=20240603125702.97368-1-huweiwen@linux.alibaba.com \
    --to=huweiwen@linux.alibaba.com \
    --cc=chaitanyak@nvidia.com \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=linux-nvme@lists.infradead.org \
    --cc=michael.christie@oracle.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