filesetup: keep OS_O_DIRECT flag when pre-allocating file
[fio.git] / init.c
diff --git a/init.c b/init.c
index 90cc0bcf770e21361b94ec6d15b29749aff0f3bb..42e710715a250e2eca8f2a6a8cd7c609e6571455 100644 (file)
--- a/init.c
+++ b/init.c
@@ -781,6 +781,11 @@ static int fixup_options(struct thread_data *td)
                        o->unit_base = 8;
        }
 
+#ifndef FIO_HAVE_ANY_FALLOCATE
+       /* Platform doesn't support any fallocate so force it to none */
+       o->fallocate_mode = FIO_FALLOCATE_NONE;
+#endif
+
 #ifndef CONFIG_FDATASYNC
        if (o->fdatasync_blocks) {
                log_info("fio: this platform does not support fdatasync()"