From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: "Kevin Wolf" <kwolf@redhat.com>,
qemu-block@nongnu.org, "Klaus Jensen" <k.jensen@samsung.com>,
qemu-devel@nongnu.org, "Max Reitz" <mreitz@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@redhat.com>
Subject: Re: [PATCH v8 2/5] hw/block/nvme: pull aio error handling
Date: Mon, 16 Nov 2020 19:18:01 +0100 [thread overview]
Message-ID: <20201116181801.GD982821@apples.localdomain> (raw)
In-Reply-To: <20201116175713.GA2715864@dhcp-10-100-145-180.wdc.com>
[-- Attachment #1: Type: text/plain, Size: 1062 bytes --]
On Nov 16 09:57, Keith Busch wrote:
> On Thu, Nov 12, 2020 at 08:59:42PM +0100, Klaus Jensen wrote:
> > +static void nvme_aio_err(NvmeRequest *req, int ret)
> > +{
> > + uint16_t status = NVME_SUCCESS;
> > + Error *local_err = NULL;
> > +
> > + switch (req->cmd.opcode) {
> > + case NVME_CMD_READ:
> > + status = NVME_UNRECOVERED_READ;
> > + break;
> > + case NVME_CMD_FLUSH:
> > + case NVME_CMD_WRITE:
> > + case NVME_CMD_WRITE_ZEROES:
> > + status = NVME_WRITE_FAULT;
> > + break;
> > + default:
> > + status = NVME_INTERNAL_DEV_ERROR;
> > + break;
> > + }
>
> Just curious, is there potentially a more appropriate way to set an nvme
> status based on the value of 'ret'? What is 'ret' representing anyway?
> Are these errno values?
>
Yes, it's errno values from down below.
But looking at this more closely, it actually looks like this is where
we should behave as dictated by the rerror and werror drive options.
I'll do a follow up patch to fix that.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2020-11-16 18:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-12 19:59 [PATCH v8 0/5] hw/block/nvme: dulbe and dsm support Klaus Jensen
2020-11-12 19:59 ` [PATCH v8 1/5] hw/block/nvme: remove superfluous NvmeCtrl parameter Klaus Jensen
2020-11-16 11:29 ` Minwoo Im
2020-11-12 19:59 ` [PATCH v8 2/5] hw/block/nvme: pull aio error handling Klaus Jensen
2020-11-16 11:36 ` Minwoo Im
2020-11-16 11:52 ` Klaus Jensen
2020-11-16 17:57 ` Keith Busch
2020-11-16 18:18 ` Klaus Jensen [this message]
2020-11-17 7:16 ` Klaus Jensen
2020-11-12 19:59 ` [PATCH v8 3/5] hw/block/nvme: add dulbe support Klaus Jensen
2020-11-16 11:43 ` Minwoo Im
2020-11-16 11:57 ` Klaus Jensen
2020-11-16 18:00 ` Keith Busch
2020-11-12 19:59 ` [PATCH v8 4/5] nvme: add namespace I/O optimization fields to shared header Klaus Jensen
2020-11-16 11:47 ` Minwoo Im
2020-11-12 19:59 ` [PATCH v8 5/5] hw/block/nvme: add the dataset management command Klaus Jensen
2020-11-16 18:01 ` Keith Busch
2020-11-23 20:45 ` [PATCH v8 0/5] hw/block/nvme: dulbe and dsm support Klaus Jensen
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=20201116181801.GD982821@apples.localdomain \
--to=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/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;
as well as URLs for NNTP newsgroup(s).