[PATCH v2 0/2] io_uring passthru: set result on blk-mq request completion
From: Caleb Sander Mateos
Date: Wed Sep 02 2026 - 19:05:10 EST
io_uring NVMe passthru currently receives the NVMe status and result in
the blk-mq request completion callback nvme_uring_cmd_end_io() but
doesn't post the io_uring CQE until the io_uring task work callback
nvme_uring_task_cb(). The status and result must be plumbed through
struct nvme_uring_cmd_pdu, taking up 16 bytes of the 32 available.
Store the status and result on the io_uring request in
nvme_uring_cmd_end_io() instead of nvme_uring_task_cb() so it doesn't
need to be passed through struct nvme_uring_cmd_pdu.
v2:
- Keep io_uring_cmd_done{,32}() wrappers to reduce changes in uring_cmd
implementations (Joanne)
v1: https://lore.kernel.org/io-uring/20260827185722.3234622-1-csander@xxxxxxxxxxxxxxx/
Caleb Sander Mateos (2):
io_uring/cmd: split io_uring_cmd_set_res() from io_uring_cmd_done()
nvme/ioctl: call io_uring_cmd_set_res32() in ->end_io()
drivers/nvme/host/ioctl.c | 19 +++++++++----------
include/linux/io_uring/cmd.h | 23 +++++++++++++++++------
io_uring/uring_cmd.c | 33 ++++++++++++++++++---------------
3 files changed, 44 insertions(+), 31 deletions(-)
--
2.55.0