[PATCH] nvme: fix error-handling for io_uring nvme-passthrough
Christoph Hellwig
hch at lst.de
Wed Oct 18 08:50:20 PDT 2023
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?
More information about the Linux-nvme
mailing list