Replace redundant TD_F_NOIO flag with td->io_ops_init
authorTomohiro Kusumi <tkusumi@tuxera.com>
Mon, 20 Mar 2017 21:28:41 +0000 (23:28 +0200)
committerJens Axboe <axboe@fb.com>
Tue, 21 Mar 2017 13:16:11 +0000 (07:16 -0600)
commit356ef1a19ee4487ece7b4295347b37491d2bf727
tree0a30b436de2043d551f2802ed609cf6d64f4f60f
parentcee3ddfee4d39ec9ba31b7329a343053af057914
Replace redundant TD_F_NOIO flag with td->io_ops_init

The only reason TD_F_NOIO exists in addition to FIO_NOIO is because
fio_running_or_pending_io_threads() needs to know whether td has
successfully initialized ioengine, whereas FIO_NOIO is statically
set regardless of ioengines's ->init() result.

This commit adds a new td field ->io_ops_init to inidicate ->init()
result, so that td needs no extra bit field for each ioengine like
TD_F_NOIO. It was rather odd that td was unable to tell ->init()
result afterward when ->init() failure (returning non zero) doesn't
mean aborting fio itself. This commit also changes TD_F_NOIO to
TD_F_RESERVED as it's no longer used.

Signed-off-by: Tomohiro Kusumi <tkusumi@tuxera.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
fio.h
init.c
ioengines.c
libfio.c