filesetup: add direct=1 failure warning to layout
authorSitsofe Wheeler <sitsofe@yahoo.com>
Mon, 21 Aug 2017 21:15:00 +0000 (22:15 +0100)
committerSitsofe Wheeler <sitsofe@yahoo.com>
Mon, 28 Aug 2017 15:11:35 +0000 (16:11 +0100)
Add warning about the filesystem not liking direct=1/buffered=0 to
initial layout code.

v2:
- Update warning to include /buffered=0 so it matches other EINVAL
  warnings
- Minor commit message update

Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
filesetup.c

index b9d68c458650f299f25f9eb934a1aac6722e7e65..a6a94ee16f64f34467563dcccdef6a640a75792d 100644 (file)
@@ -162,8 +162,14 @@ static int extend_file(struct thread_data *td, struct fio_file *f)
                if (err == ENOENT && !td->o.allow_create)
                        log_err("fio: file creation disallowed by "
                                        "allow_file_create=0\n");
-               else
+               else {
+                       if (err == EINVAL && (flags & OS_O_DIRECT))
+                               log_err("fio: looks like your filesystem "
+                                       "does not support "
+                                       "direct=1/buffered=0\n");
+
                        td_verror(td, err, "open");
+               }
                return 1;
        }