No need to do fadvise() on O_DIRECT/raw IO
[fio.git] / ioengines.c
index 0b3ec16485124df5eb3e3e7396e0208a4cd4ac27..727981f12415ab52bace3c2788d589fbc9cc2e99 100644 (file)
@@ -182,6 +182,12 @@ int td_io_prep(struct thread_data *td, struct io_u *io_u)
 int td_io_getevents(struct thread_data *td, int min, int max,
                    struct timespec *t)
 {
+       if (min > 0 && td->io_ops->commit) {
+               int r = td->io_ops->commit(td);
+
+               if (r < 0)
+                       return r;
+       }
        if (td->io_ops->getevents)
                return td->io_ops->getevents(td, min, max, t);