trim: add support for multiple ranges
authorAnkit Kumar <ankit.kumar@samsung.com>
Thu, 15 Feb 2024 15:18:10 +0000 (20:48 +0530)
committerJens Axboe <axboe@kernel.dk>
Thu, 15 Feb 2024 15:38:39 +0000 (08:38 -0700)
commitb3251e31bae2c2ec7c8db0e7e7511eb03b8b0190
tree12add9a572dce38f2a4576ab47d4ca4fe3ce33a1
parent6067863c7016faa8033f4363ba8702fa15063900
trim: add support for multiple ranges

NVMe specification allow multiple ranges for the dataset management
commands. Currently the block ioctl only allows a single range for
trim, however multiple ranges can be specified using nvme character
device.

Add an option num_range to send multiple range per trim request, which
only works if the data direction is solely trim i.e. trim or randtrim.
Add FIO_MULTI_RANGE_TRIM as the ioengine flag, to restrict the usage of
this new option.
For multi range trim request this modifies the way IO buffers are used.
The buffer length will depend on number of trim ranges and the actual
buffer will contains start and length of each range entry.

This increases fio server version (FIO_SERVER_VER) to 103.

Signed-off-by: Ankit Kumar <ankit.kumar@samsung.com>
Link: https://lore.kernel.org/r/20240215151812.138370-2-ankit.kumar@samsung.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
12 files changed:
HOWTO.rst
backend.c
cconv.c
fio.1
fio.h
init.c
io_u.c
io_u.h
ioengines.h
options.c
server.h
thread_options.h