options: make parsing functions available to ioengines
authorDamien Le Moal <damien.lemoal@wdc.com>
Fri, 3 Sep 2021 15:20:23 +0000 (15:20 +0000)
committerJens Axboe <axboe@kernel.dk>
Fri, 3 Sep 2021 16:12:14 +0000 (10:12 -0600)
commitf311f5f3a8daa54d8c5750c3e867c32f308743cd
tree52917ce2cd567765501ff5bc56d6d64f9003f272
parent8d6e8d99c8e080a20c025cf16f98097b630c072e
options: make parsing functions available to ioengines

Move the declaration of split_parse_ddir(), str_split_parse() and
the split_parse_fn typedef to thread_options.h so that IO engines
can use these functions to parse options. The definition of struct
split is also moved to thread_options.h from options.c.

The type of the split_parse_fn callback function is changed to add a
void * argument that can be used for an option parsing callback to pass
a private data pointer to the split_parse_fn function. This can be used
by an IO engine to pass a pointer to its engine specific option
structure as td->eo is not yet set when options are being parsed.

Signed-off-by: Damien Le Moal <damien.lemoal@wdc.com>
Signed-off-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
options.c
thread_options.h