Convert unit_base to posval[]
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index e474b48f9ca0c4ab5a26f49363f90e2a4bacc1d2..7941a6d739483edfc5e3b3e81403716133eee97a 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -531,10 +531,10 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir)
         * io's that have been actually submitted to an async engine,
         * and cur_depth is meaningless for sync engines.
         */
-       if (td->io_u_in_flight) {
+       while (td->io_u_in_flight) {
                int fio_unused ret;
 
-               ret = io_u_queued_complete(td, td->io_u_in_flight, NULL);
+               ret = io_u_queued_complete(td, 1, NULL);
        }
 
        fio_gettime(&t, NULL);