Introduce new option: iodepth_batch_complete_max
[fio.git] / io_u.c
diff --git a/io_u.c b/io_u.c
index ac55b2fd6805125791e7df1ab65ba5eee789ca52..6dda5790a7f1d494fd46758ecc9b3b6406e4a11a 100644 (file)
--- a/io_u.c
+++ b/io_u.c
@@ -1836,7 +1836,9 @@ int io_u_queued_complete(struct thread_data *td, int min_evts)
        else if (min_evts > td->cur_depth)
                min_evts = td->cur_depth;
 
-       ret = td_io_getevents(td, min_evts, td->o.iodepth_batch_complete, tvp);
+       /* No worries, td_io_getevents fixes min and max if they are
+        * set incorrectly */
+       ret = td_io_getevents(td, min_evts, td->o.iodepth_batch_complete_max, tvp);
        if (ret < 0) {
                td_verror(td, -ret, "td_io_getevents");
                return ret;