nvme: re-fix error-handling for io_uring nvme-passthrough
PATCH 1/1 nvme: re-fix error-handling for io_uring nvme-passthrough
From: Keith Busch <[email protected]>
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.
--- drivers/nvme/host/ioctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/nvme/host/ioctl.c +5 -1
@@ -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);/*
Signature · 1 line
2.43.5
Jens Axboe
maintainerQuoted 9 lines · Keith Busch
From: Keith Busch <[email protected]>
This was previously fixed with commit
1147dd0503564fa0e0348("nvme: fix error-handling forio_uringnvme-passthrough"), but the change was mistakenly undone in a later commit.Fixes d6aacee9255e7f ("nvme: use bio_integrity_map_user"Reported-by Jens Axboe <[email protected]>Signed-off-by Keith Busch <[email protected]>
Looks good to me, but needs a:
to ensure it hits stable as well.
Signature · 1 line
Jens Axboe
Quoted 7 lines · Keith Busch
From: Keith Busch<[email protected]>
This was previously fixed with commit
1147dd0503564fa0e0348("nvme: fix error-handling forio_uringnvme-passthrough"), but the change was mistakenly undone in a later commit.Fixes d6aacee9255e7f ("nvme: use bio_integrity_map_user"
Looks good.
Quoted 34 lines · Keith Busch
From: Keith Busch <[email protected]>
This was previously fixed with commit
1147dd0503564fa0e0348("nvme: fix error-handling forio_uringnvme-passthrough"), but the change was mistakenly undone in a later commit.Fixes d6aacee9255e7f ("nvme: use bio_integrity_map_user"Reported-by Jens Axboe <[email protected]>Signed-off-by Keith Busch <[email protected]>--- drivers/nvme/host/ioctl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)drivers/nvme/host/ioctl.c +5
-1@@ -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);/* Signature · 1 line
2.43.5
Looks good:
Keith Busch
maintainerdrivers/nvme/host/ioctl.c static enum rq_end_io_ret nvme_uring_cmd_end_io(struct request *req, · line 425
Quoted 5 lines · Keith Busch
drivers/nvme/host/ioctl.c +1
-0@@ -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 ) {
There should have been a '-' sign in front of that first if statement. Fixed up and pushed to nvme-6.12.