If we get a FIO_Q_QUEUED back, we need to commit pending IO
before we wait for it. Otherwise we trigger this bug:
fio: ioengines.c:257: td_io_getevents: Assertion `td->io_u_in_flight >= r' failed.
Reported-by: Andrey Kuzmin <andrey.v.kuzmin@gmail.com>
Signed-off-by: Jens Axboe <axboe@fb.com>
put_io_u(td, io_u);
return true;
} else if (ret == FIO_Q_QUEUED) {
+ if (td_io_commit(td))
+ return true;
if (io_u_queued_complete(td, 1) < 0)
return true;
} else if (ret == FIO_Q_COMPLETED) {