All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V4 0/3] nvme-cli: Introduce nvme-status mapping with errno
@ 2019-05-21 16:36 Minwoo Im
  2019-05-21 16:36 ` [PATCH V4 1/3] nvme-status: Introduce nvme status module to map errno Minwoo Im
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Minwoo Im @ 2019-05-21 16:36 UTC (permalink / 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 V3:
  - Fix to return 0 when given error is 0 which means success. (Chaitanya)

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 (3):
  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  |   6 ++
 nvme-status.c | 155 ++++++++++++++++++++++++++++++++++++++++++++++++++
 nvme-status.h |  14 +++++
 nvme.c        | 108 ++++++++++++++---------------------
 6 files changed, 233 insertions(+), 71 deletions(-)
 create mode 100644 nvme-status.c
 create mode 100644 nvme-status.h

-- 
2.21.0

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

end of thread, other threads:[~2019-05-23  4:25 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-21 16:36 [PATCH V4 0/3] nvme-cli: Introduce nvme-status mapping with errno Minwoo Im
2019-05-21 16:36 ` [PATCH V4 1/3] nvme-status: Introduce nvme status module to map errno Minwoo Im
2019-05-21 16:36 ` [PATCH V4 2/3] nvme: Return errno mapped for nvme error status Minwoo Im
2019-05-21 16:36 ` [PATCH V4 3/3] fabrics: Return errno mapped for fabrics " Minwoo Im
     [not found] ` <CGME20190521163721epcas4p4d6e9ae0a49fde40f38fa770406538335@epcms2p6>
2019-05-23  4:25   ` [PATCH V4 0/3] nvme-cli: Introduce nvme-status mapping with errno Minwoo Im

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.