ioengines: account any queued IO on the engine side
authorJens Axboe <axboe@fb.com>
Thu, 25 Feb 2016 20:24:47 +0000 (12:24 -0800)
committerJens Axboe <axboe@fb.com>
Thu, 25 Feb 2016 20:24:47 +0000 (12:24 -0800)
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 <axboe@fb.com>
ioengines.c

index decc9cbb459ec953712f78fb1ac2aa6a4e3b7fac..b89a121b4526706cff19017b80ad2328a8687581 100644 (file)
@@ -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);