Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH V3 0/4] nvme-cli: Introduce nvme-status mapping with errno
Date: Mon, 20 May 2019 03:39:09 +0900	[thread overview]
Message-ID: <20190519183913.3493-1-minwoo.im.dev@gmail.com> (raw)

Hi,

This patchset introduces nvme-status module to manage mapping
relationships between nvme error status and errno.  It cannot be
directly mapped in 1:1, but we can figure out what kind of errors
happended by the return value of nvme-cli.

NVMe status fields are 16bits to indicate, but UNIX return value from
main() will be parsed in 8bits so that we need to do something about
return value to indicate nvme error status.

Please review.
Thanks,

Changes to previous V2:
  - do not overwrite the err local variable, instead returning the
    converted errno mapped directly.
  - return ECOMM in case of linux internal err which indicates the
    negative values from in the middle of the subcommand.

Changes to previous V1:
  - make switch-case inline in nvme-status (Chaitanya)

Minwoo Im (4):
  nvme.h: Fix typos in status code values
  nvme-status: Introduce nvme status module to map errno
  nvme: Return errno mapped for nvme error status
  fabrics: Return errno mapped for fabrics error status

 Makefile      |   3 +-
 fabrics.c     |  18 ++++--
 linux/nvme.h  |  10 +++-
 nvme-print.c  |   4 +-
 nvme-status.c | 152 ++++++++++++++++++++++++++++++++++++++++++++++++++
 nvme-status.h |  14 +++++
 nvme.c        | 112 +++++++++++++++----------------------
 7 files changed, 236 insertions(+), 77 deletions(-)
 create mode 100644 nvme-status.c
 create mode 100644 nvme-status.h

-- 
2.21.0

             reply	other threads:[~2019-05-19 18:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-19 18:39 Minwoo Im [this message]
2019-05-19 18:39 ` [PATCH V3 1/4] nvme.h: Fix typos in status code values Minwoo Im
2019-05-20 15:30   ` Keith Busch
2019-05-19 18:39 ` [PATCH V3 2/4] nvme-status: Introduce nvme status module to map errno Minwoo Im
2019-05-20  5:14   ` Chaitanya Kulkarni
2019-05-20  5:44     ` Minwoo Im
2019-05-20  5:14   ` Chaitanya Kulkarni
2019-05-19 18:39 ` [PATCH V3 3/4] nvme: Return errno mapped for nvme error status Minwoo Im
2019-05-19 18:39 ` [PATCH V3 4/4] fabrics: Return errno mapped for fabrics " Minwoo Im

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=20190519183913.3493-1-minwoo.im.dev@gmail.com \
    --to=minwoo.im.dev@gmail.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