Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: minwoo.im.dev@gmail.com (Minwoo Im)
Subject: [PATCH V2 2/4] nvme-status: Introduce nvme status module to map errno
Date: Mon, 20 May 2019 02:56:03 +0900	[thread overview]
Message-ID: <20190519175602.GB10876@minwooim-desktop> (raw)
In-Reply-To: <BYAPR04MB5749007DAA9F804D6385FF8F86050@BYAPR04MB5749.namprd04.prod.outlook.com>

On 19-05-19 17:42:19, Chaitanya Kulkarni wrote:
> On 05/13/2019 10:04 AM, Minwoo Im wrote:
> > Background:
> >    It's not enough to return the nvme status value in main() because it's
> > allowed to be in 8bits, but nvme status is indicated in 16bits.  So we
> > has not been able to figure out what kind of nvme status has been
> > returned by return value.
> >
> >    This patch introduces nvme-status module that manages mapping between
> > nvme status and errno.  It's not possible to make 1:1 mapping relations,
> > but we can map it as a groups.
> >
> > All the internal errors which has been returned in a negative value will
> > be returned with ECOMM that indicates communication errors.  In this
> > case, we can see what happened via stderr.
> 
> I didn't understand this as I don't see ECOMM in this patch, also when 
> you mentioned internal errors are you referring to the  NVME_SC_INTERNAL 
> ? in that case in this patch NVME_SC_INTERNAL is mapped to the EIO. Can 
> you please explain ?

Nice catch, Thanks, really.  I didn't make ECOMM errno included to this
patchset.  NVME_SC_INTERNAL will be mapped to EIO to make it
distinguished from ECOMM which indicates the internal linux errno.  All
the error status from nvme except cases defined in the following
switch-case will be mapped to EIO.

Will make this patch return ECOMM in case of internal linux error which
will be given in a negative value with the previos commit.

Thanks,

  reply	other threads:[~2019-05-19 17:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-13 17:03 [PATCH V2 0/4] nvme-cli: Introduce nvme-status mapping with errno Minwoo Im
2019-05-13 17:03 ` [PATCH V2 1/4] nvme.h: Fix typos in status code values Minwoo Im
2019-05-19 16:48   ` Chaitanya Kulkarni
2019-05-13 17:03 ` [PATCH V2 2/4] nvme-status: Introduce nvme status module to map errno Minwoo Im
2019-05-19 17:42   ` Chaitanya Kulkarni
2019-05-19 17:56     ` Minwoo Im [this message]
2019-05-13 17:03 ` [PATCH V2 3/4] nvme: Return errno mapped for nvme error status Minwoo Im
2019-05-19 17:41   ` Chaitanya Kulkarni
2019-05-19 17:53     ` Minwoo Im
2019-05-19 18:00       ` Chaitanya Kulkarni
2019-05-19 19:03         ` Minwoo Im
2019-05-13 17:03 ` [PATCH V2 4/4] fabrics: Return errno mapped for fabrics " Minwoo Im
2019-05-18  2:11 ` [PATCH V2 0/4] nvme-cli: Introduce nvme-status mapping with errno 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=20190519175602.GB10876@minwooim-desktop \
    --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