NVMe specification allow multiple ranges for the dataset management command. The block ioctl only accepts a single entry for trim, but with nvme character device we can send multiple ranges. The first patch in this series adds an option num_range to send multiple range per trim request. This will only work if the data direction is solely trim i.e. trim or randtrim. The next two patches in this series updates io_uring_cmd ioengine with the required changes. Note: The first patch which changes the io_u request for multiple ranges can be used in future for NVMe copy command which copies multiple source range entries to single destination. Ankit Kumar (3): trim: add support for multiple ranges engines/nvme: pass offset and len instead of io_u engines/io_uring: add multi range dsm support HOWTO.rst | 7 ++ backend.c | 20 +++++- cconv.c | 2 + engines/io_uring.c | 34 ++++++++-- engines/nvme.c | 68 ++++++++++++-------- engines/nvme.h | 7 +- examples/uring-cmd-trim-multi-range.fio | 21 ++++++ examples/uring-cmd-trim-multi-range.png | Bin 0 -> 61922 bytes fio.1 | 6 ++ fio.h | 18 ++++++ init.c | 13 ++++ io_u.c | 81 +++++++++++++++++++----- io_u.h | 4 ++ ioengines.h | 2 + options.c | 11 ++++ thread_options.h | 3 + 16 files changed, 244 insertions(+), 53 deletions(-) create mode 100644 examples/uring-cmd-trim-multi-range.fio create mode 100644 examples/uring-cmd-trim-multi-range.png -- 2.25.1