From e6727cbdd34a6ec30b437311724a6aa60e6b06fd Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 25 Feb 2016 12:24:47 -0800 Subject: [PATCH] ioengines: account any queued IO on the engine side Currently we don't account if it's not a read/write/trim, but that can screw up with SYNC, for instance. Account any IO that the IO engine has returned a queued status for. Signed-off-by: Jens Axboe --- ioengines.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ioengines.c b/ioengines.c index decc9cbb..b89a121b 100644 --- a/ioengines.c +++ b/ioengines.c @@ -342,10 +342,10 @@ int td_io_queue(struct thread_data *td, struct io_u *io_u) } else if (ret == FIO_Q_QUEUED) { int r; - if (ddir_rw(io_u->ddir)) { - td->io_u_queued++; + td->io_u_queued++; + + if (ddir_rw(io_u->ddir)) td->ts.total_io_u[io_u->ddir]++; - } if (td->io_u_queued >= td->o.iodepth_batch) { r = td_io_commit(td); -- 2.25.1