init: force fallocate_mode to none when fallocate is unsupported
[fio.git] / init.c
diff --git a/init.c b/init.c
index 90cc0bcf770e21361b94ec6d15b29749aff0f3bb..52560ed34ab59a28ad6a1825068f58e75496bea0 100644 (file)
--- a/init.c
+++ b/init.c
@@ -781,6 +781,11 @@ static int fixup_options(struct thread_data *td)
                        o->unit_base = 8;
        }
 
+#if !defined(CONFIG_POSIX_FALLOCATE) && !defined(FIO_HAVE_NATIVE_FALLOCATE)
+       /* Platform doesn't support fallocate so force set 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()"