fio: add FIO_RO_NEEDS_RW_OPEN ioengine flag
authorVincent Fu <vincent.fu@samsung.com>
Fri, 3 Feb 2023 14:54:50 +0000 (09:54 -0500)
committerVincent Fu <vincent.fu@samsung.com>
Fri, 3 Feb 2023 18:26:32 +0000 (13:26 -0500)
commitd72b10e3ca2f7e3b7ef4e54ea98e4e964a67192d
tree63179d9799b7a2d332a8149bca3a1179a8f687e9
parent3a6ae7b7c086964e9a0bb4d298be90f9494d6360
fio: add FIO_RO_NEEDS_RW_OPEN ioengine flag

Some oddball cases like sg/bsg require devices to be opened for writing
in order to do read commands. So fio has been opening character devices
in rw mode for read workloads. However, nvme generic character devices
do not need (and may refuse) a writeable open for read workloads. So
instead of always opening character devices in rw mode, open devices in
rw mode for read workloads only if the ioengine has the
FIO_RO_NEEDS_RW_OPEN flag.

Link: https://lore.kernel.org/fio/20230203123421.126720-1-joshi.k@samsung.com/
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
engines/sg.c
filesetup.c
ioengines.h