This patchset adds a new I/O engine (io_uring_cmd), which enables support for io_uring passthrough commands. The new I/O engine will be built only if its support is present in the kernel. https://git.kernel.dk/cgit/linux-block/log/?h=for-next This engine will use most of the existing helpers from io_uring. The I/O preparation, completion, file open, file close and post init paths are going to differ and hence io_uring_cmd will have its own helper for them. The supported io_uring_cmd options are: * registerfiles * sqthread_poll * sqthread_poll_cpu * cmd_type (new) The current uring passthrough support is present only with nvme-ns character device (/dev/ngXnY). This includes both conventional as well as ZNS devices. cmd_type provides the flexibility to support different types of passthrough commands in future. O_DIRECT flag support is not present with nvme-ns charatcer devices, hence zbd will check for them only if fio filetype is a block device. To enable support for nvme passthrough commands, fio will use libnvme to use NVMe specification structures, enums and helper functions for sending commands. As nvme specific uring_cmd changes are not yet part of mainline kernel, they are not integrated with libnvme. Below is the PR for libnvme changes. https://github.com/linux-nvme/libnvme/pull/362 NOTE: The io_uring_cmd I/O engine changes are present in engines/io_uring.c These changes are guarded with config flags CONFIG_URING_CMD and CONFIG_LIBNVME which makes the code a bit messy. This can be neat if io_uring_cmd is decoupled from engines/io_uring.c Ankit Kumar (4): configure: check if uring_cmd support is present docs: document options for io_uring_cmd I/O engine zbd: Check for direct flag only if its block device engines/io_uring: Enable zone device support for io_uring_cmd I/O engine Anuj Gupta (3): io_uring.h: add IORING_SETUP_SQE128 and IORING_SETUP_CQE32 engines/io_uring: add new I/O engine for uring passthrough support examples: add 2 example job file for io_uring_cmd engine HOWTO.rst | 17 +- Makefile | 4 + configure | 45 +++ engines/io_uring.c | 686 ++++++++++++++++++++++++++++++++++- examples/uring-cmd-ng.fio | 35 ++ examples/uring-cmd-zoned.fio | 40 ++ file.h | 12 +- fio.1 | 19 +- os/linux/io_uring.h | 45 ++- zbd.c | 4 +- 10 files changed, 886 insertions(+), 21 deletions(-) create mode 100644 examples/uring-cmd-ng.fio create mode 100644 examples/uring-cmd-zoned.fio -- 2.17.1