From: Keith Busch <kbusch@kernel.org>
To: Kanchan Joshi <joshiiitr@gmail.com>
Cc: Christoph Hellwig <hch@lst.de>,
Kanchan Joshi <joshi.k@samsung.com>,
axboe@kernel.dk, sagi@grimberg.me,
linux-nvme@lists.infradead.org, Anuj Gupta <anuj20.g@samsung.com>
Subject: Re: [PATCH] nvme: fix error-handling for io_uring nvme-passthrough
Date: Wed, 18 Oct 2023 10:59:33 -0600 [thread overview]
Message-ID: <ZTAO9ZVhs_73oP0d@kbusch-mbp> (raw)
In-Reply-To: <CA+1E3rLS0y9nZ0Kg1OKf6SX-nLpSps8S9ZHSRSFbPV6STM841g@mail.gmail.com>
On Wed, Oct 18, 2023 at 10:20:10PM +0530, Kanchan Joshi wrote:
> On Wed, Oct 18, 2023 at 9:20 PM Christoph Hellwig <hch@lst.de> wrote:
> >
> > On Wed, Oct 18, 2023 at 07:27:18PM +0530, Kanchan Joshi wrote:
> > > @@ -508,8 +508,11 @@ static enum rq_end_io_ret nvme_uring_cmd_end_io(struct request *req,
> > > req->bio = pdu->bio;
> > > if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
> > > pdu->nvme_status = -EINTR;
> > > - else
> > > + else {
> > > pdu->nvme_status = nvme_req(req)->status;
> > > + if (!pdu->nvme_status)
> > > + pdu->nvme_status = blk_status_to_errno(err);
> > > + }
> >
> > Hmm, shoudn't err take precedence over the nvme status?
>
> Since this is for passthrough interface, nvme status should get the
> precedence since that is what we want the users to see.
> Same happens for sync passthrough too (in nvme_execute_rq).
Right, blk_sts_t 'err' will be non-zero on any nvme error status, but we
want to report nvme error status if we have one.
next prev parent reply other threads:[~2023-10-18 16:59 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CGME20231018140334epcas5p128c55c56fb9203a19479cbf86175a1d6@epcas5p1.samsung.com>
2023-10-18 13:57 ` [PATCH] nvme: fix error-handling for io_uring nvme-passthrough Kanchan Joshi
2023-10-18 15:50 ` Christoph Hellwig
2023-10-18 16:50 ` Kanchan Joshi
2023-10-18 16:59 ` Keith Busch [this message]
2023-10-18 18:05 ` Niklas Cassel
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=ZTAO9ZVhs_73oP0d@kbusch-mbp \
--to=kbusch@kernel.org \
--cc=anuj20.g@samsung.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=joshi.k@samsung.com \
--cc=joshiiitr@gmail.com \
--cc=linux-nvme@lists.infradead.org \
--cc=sagi@grimberg.me \
/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