Add a more verbose/immediate warning if we fail open with O_DIRECT
If we get EINVAL with O_DIRECT open of the file, then that means
that the file system does not support direct IO. Warn as such
from fio.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/filesetup.c b/filesetup.c
index a1ad026..b1f73f7 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -526,6 +526,11 @@
snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);
+ if (__e == EINVAL && (flags & OS_O_DIRECT)) {
+ log_err("fio: looks like your file system does not " \
+ "support direct=1/buffered=0\n");
+ }
+
td_verror(td, __e, buf);
}