Linux-NVME Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Anuj Gupta <anuj20.g@samsung.com>
To: Keith Busch <kbusch@meta.com>
Cc: linux-nvme@lists.infradead.org, hch@lst.de,
	Keith Busch <kbusch@kernel.org>, Jens Axboe <axboe@kernel.dk>
Subject: Re: [PATCH] nvme: re-fix error-handling for io_uring nvme-passthrough
Date: Tue, 29 Oct 2024 10:12:11 +0530	[thread overview]
Message-ID: <20241029044211.GA3140@green245> (raw)
In-Reply-To: <20241028205253.2054407-1-kbusch@meta.com>

[-- Attachment #1: Type: text/plain, Size: 1285 bytes --]

On Mon, Oct 28, 2024 at 01:52:53PM -0700, Keith Busch wrote:
> From: Keith Busch <kbusch@kernel.org>
> 
> This was previously fixed with commit 1147dd0503564fa0e0348
> ("nvme: fix error-handling for io_uring nvme-passthrough"), but the
> change was mistakenly undone in a later commit.
> 
> Fixes: d6aacee9255e7f ("nvme: use bio_integrity_map_user"
> Reported-by: Jens Axboe <axboe@kernel.dk>
> Signed-off-by: Keith Busch <kbusch@kernel.org>
> ---
>  drivers/nvme/host/ioctl.c | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/nvme/host/ioctl.c b/drivers/nvme/host/ioctl.c
> index b9b79ccfabf8a..6c531088043b7 100644
> --- a/drivers/nvme/host/ioctl.c
> +++ b/drivers/nvme/host/ioctl.c
> @@ -422,9 +422,13 @@ static enum rq_end_io_ret nvme_uring_cmd_end_io(struct request *req,
>  	struct nvme_uring_cmd_pdu *pdu = nvme_uring_cmd_pdu(ioucmd);
>  
>  	if (nvme_req(req)->flags & NVME_REQ_CANCELLED)
> +	if (nvme_req(req)->flags & NVME_REQ_CANCELLED) {
>  		pdu->status = -EINTR;
> -	else
> +	} else {
>  		pdu->status = nvme_req(req)->status;
> +		if (!pdu->status)
> +			pdu->status = blk_status_to_errno(err);
> +	}
>  	pdu->result = le64_to_cpu(nvme_req(req)->result.u64);
>  
>  	/*
> -- 
> 2.43.5

Reviewed-by: Anuj Gupta <anuj20.g@samsung.com>

[-- Attachment #2: Type: text/plain, Size: 0 bytes --]



  parent reply	other threads:[~2024-10-29  4:55 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20241028211654epcas5p19ea63d394a4faea81e54514ac6252271@epcas5p1.samsung.com>
2024-10-28 20:52 ` [PATCH] nvme: re-fix error-handling for io_uring nvme-passthrough Keith Busch
2024-10-28 20:54   ` Jens Axboe
2024-10-29  4:25   ` Kanchan Joshi
2024-10-29  4:42   ` Anuj Gupta [this message]
2024-10-29  7:39   ` Christoph Hellwig
2024-10-29 13:46   ` Keith Busch

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=20241029044211.GA3140@green245 \
    --to=anuj20.g@samsung.com \
    --cc=axboe@kernel.dk \
    --cc=hch@lst.de \
    --cc=kbusch@kernel.org \
    --cc=kbusch@meta.com \
    --cc=linux-nvme@lists.infradead.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