Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] clarify NVMe status symbol names
@ 2024-06-03 12:56 Weiwen Hu
  2024-06-03 12:56 ` [PATCH v2 1/4] nvme: rename nvme_sc_to_pr_err to nvme_status_to_pr_err Weiwen Hu
                   ` (4 more replies)
  0 siblings, 5 replies; 12+ messages in thread
From: Weiwen Hu @ 2024-06-03 12:56 UTC (permalink / raw)
  To: linux-nvme, Chaitanya Kulkarni, Keith Busch
  Cc: Mike Christie, Christoph Hellwig, Weiwen Hu

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



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-06-05  8:56 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-03 12:56 [PATCH v2 0/4] clarify NVMe status symbol names Weiwen Hu
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox