io_uring: Add 'write_mode' option for optional cmds
authorMinwoo Im <minwoo.im@samsung.com>
Tue, 28 May 2024 08:02:22 +0000 (17:02 +0900)
committerMinwoo Im <minwoo.im@samsung.com>
Fri, 31 May 2024 21:02:42 +0000 (06:02 +0900)
commit87a4903f6cf07d3c16f292aea74c1cb42b924439
tree972b403e63becbcda52bb4fa10984b14997cf478
parentd5fbe84b83999d862838f36ea0d4a499e31f0653
io_uring: Add 'write_mode' option for optional cmds

Add a new option 'write_mode' to support additional optional Write
command family such as Write Uncorrectable and Write Zeroes in NVMe.
Since we have io_uring_cmd ioengine where we can define the actual
opcode of the command, this option will be used to test NVMe device with
various combination of Write command types.

'write_mode' option can be given either 'write', 'uncor', 'zeroes' or
'verify'.  'write' is for normal Write command which is by default,
'uncor' is for Write Uncorrectable, 'zeroes' for Write Zeroes and 'verify'
for Verify command  This should be used with DDIR_WRITE ddir.

This patch updates command's opcode in fio_ioring_init() to avoid
branches in the I/O hottest path giving opcode value to the
fio_nvme_uring_cmd_prep() as an argument.

Signed-off-by: Minwoo Im <minwoo.im@samsung.com>
HOWTO.rst
engines/io_uring.c
engines/nvme.c
engines/nvme.h
fio.1