cmdprio: Introduce generic option definitions
authorDamien Le Moal <dlemoal@kernel.org>
Fri, 21 Jul 2023 11:05:06 +0000 (20:05 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 21 Jul 2023 20:07:28 +0000 (14:07 -0600)
commit2838f77aa80605c13cd18ce5e941005a42cec4a4
tree4e6cf969d2b83e3578780d2a33709280b94032f1
parentd4d503a557d4a664ff3fd7a811966df038d06634
cmdprio: Introduce generic option definitions

The definition of the per-I/O priority options for the io_uring and
libaio I/O engines are almost identical, differing only by the option
group and option data structure used.

Introduce the CMDPRIO_OPTIONS macro in engines/cmdprio.h to generically
define these options in the io_uring and libaio engines to simplify the
code.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Link: https://lore.kernel.org/r/20230721110510.44772-3-dlemoal@kernel.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
engines/cmdprio.h
engines/io_uring.c
engines/libaio.c