Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
log_err("fio: unknown fallocate mode: %d\n", td->o.fallocate_mode);
assert(0);
}
-
}
/*
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 */
+#ifndef FIO_HAVE_ANY_FALLOCATE
+ /* Platform doesn't support any fallocate so force it to none */
o->fallocate_mode = FIO_FALLOCATE_NONE;
#endif
.parent = "nrfiles",
.hide = 1,
},
-#if defined(CONFIG_POSIX_FALLOCATE) || defined(FIO_HAVE_NATIVE_FALLOCATE)
+#ifdef FIO_HAVE_ANY_FALLOCATE
{
.name = "fallocate",
.lname = "Fallocate",
#endif
},
},
-#else /* CONFIG_POSIX_FALLOCATE */
+#else /* FIO_HAVE_ANY_FALLOCATE */
{
.name = "fallocate",
.lname = "Fallocate",
.type = FIO_OPT_UNSUPPORTED,
.help = "Your platform does not support fallocate",
},
-#endif /* CONFIG_POSIX_FALLOCATE || FIO_HAVE_NATIVE_FALLOCATE */
+#endif /* FIO_HAVE_ANY_FALLOCATE */
{
.name = "fadvise_hint",
.lname = "Fadvise hint",
}
#endif
+#if defined(CONFIG_POSIX_FALLOCATE) || defined(FIO_HAVE_NATIVE_FALLOCATE)
+# define FIO_HAVE_ANY_FALLOCATE
+#endif
+
#endif