if (r < 0)
goto out;
}
+ if (max > td->cur_depth)
+ max = td->cur_depth;
+ if (min > max)
+ max = min;
r = 0;
- if (td->io_ops->getevents)
+ if (max && td->io_ops->getevents)
r = td->io_ops->getevents(td, min, max, t);
out:
if (r >= 0)
if (f->file_map)
memset(f->file_map, 0, f->num_maps * sizeof(int));
+#ifdef FIO_OS_DIRECTIO
+ /*
+ * Some OS's have a distinct call to mark the file non-buffered,
+ * instead of using O_DIRECT (Solaris)
+ */
+ if (td->o.odirect) {
+ int ret = fio_set_odirect(f->fd);
+
+ if (ret) {
+ td_verror(td, ret, "fio_set_odirect");
+ goto err;
+ }
+ }
+#endif
+
done:
log_file(td, f, FIO_LOG_OPEN_FILE);
return 0;