diff --git a/io_u.c b/io_u.c index ba192a32a985..be2f242a6e2b 100644 --- a/io_u.c +++ b/io_u.c @@ -1792,6 +1792,8 @@ int io_u_queued_complete(struct thread_data *td, int min_evts, if (!min_evts) tvp = &ts; + 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); if (ret < 0) {