From: Jens Axboe Date: Thu, 25 Feb 2016 16:04:06 +0000 (-0700) Subject: backend: ensure that fio_io_sync() commits IN on queued status X-Git-Tag: fio-2.7~17 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=42ff945ce285e9864cdafe32e27e8ef421ea5aab;ds=sidebyside backend: ensure that fio_io_sync() commits IN on queued status 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 Signed-off-by: Jens Axboe --- diff --git a/backend.c b/backend.c index fd818491..6083a51e 100644 --- a/backend.c +++ b/backend.c @@ -309,6 +309,8 @@ requeue: 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) {