From: Klaus Jensen <its@irrelevant.dk>
To: Keith Busch <kbusch@kernel.org>
Cc: Kevin Wolf <kwolf@redhat.com>,
Klaus Jensen <k.jensen@samsung.com>,
qemu-devel@nongnu.org, qemu-block@nongnu.org,
Max Reitz <mreitz@redhat.com>
Subject: Re: [PATCH v4 2/2] hw/block/nvme: add the dataset management command
Date: Thu, 22 Oct 2020 20:43:28 +0200 [thread overview]
Message-ID: <20201022184328.GC209677@apples.localdomain> (raw)
In-Reply-To: <20201022175023.GA1694294@dhcp-10-100-145-180.wdc.com>
[-- Attachment #1: Type: text/plain, Size: 1246 bytes --]
On Oct 22 10:50, Keith Busch wrote:
> On Thu, Oct 22, 2020 at 07:43:33PM +0200, Klaus Jensen wrote:
> > On Oct 22 08:01, Keith Busch wrote:
> > > On Thu, Oct 22, 2020 at 09:33:13AM +0200, Klaus Jensen wrote:
> > > > + if (--(*discards)) {
> > > > + status = NVME_NO_COMPLETE;
> > > > + } else {
> > > > + g_free(discards);
> > > > + req->opaque = NULL;
> > >
> > > This case needs a
> > >
> > > status = req->status;
> > >
> > > So that we get the error set in the callback.
> > >
> >
> > There are no cases that result in a non-zero status code here.
>
> Your callback has a case that sets NVME_INTERNAL_DEV_ERROR status. That
> would get ignored if the final discard reference is dropped from the
> submission side.
>
Oh. Crap. You are right. Nice catch!
> +static void nvme_aio_discard_cb(void *opaque, int ret)
> +{
> + NvmeRequest *req = opaque;
> + int *discards = req->opaque;
> +
> + trace_pci_nvme_aio_discard_cb(nvme_cid(req));
> +
> + if (ret) {
> + req->status = NVME_INTERNAL_DEV_ERROR;
> + trace_pci_nvme_err_aio(nvme_cid(req), strerror(ret),
> + req->status);
> + }
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
prev parent reply other threads:[~2020-10-22 18:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-22 7:33 [PATCH v4 0/2] hw/block/nvme: dulbe and dsm support Klaus Jensen
2020-10-22 7:33 ` [PATCH v4 1/2] hw/block/nvme: add dulbe support Klaus Jensen
2020-10-22 7:33 ` [PATCH v4 2/2] hw/block/nvme: add the dataset management command Klaus Jensen
2020-10-22 15:01 ` Keith Busch
2020-10-22 17:43 ` Klaus Jensen
2020-10-22 17:50 ` Keith Busch
2020-10-22 18:43 ` Klaus Jensen [this message]
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=20201022184328.GC209677@apples.localdomain \
--to=its@irrelevant.dk \
--cc=k.jensen@samsung.com \
--cc=kbusch@kernel.org \
--cc=kwolf@redhat.com \
--cc=mreitz@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).