projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add a more verbose/immediate warning if we fail open with O_DIRECT
[fio.git]
/
filesetup.c
diff --git
a/filesetup.c
b/filesetup.c
index f3d38290179e80d9eacefb5f2a97ef4abd479720..b1f73f7131cb6dfe086bdd45f9cd269e7cf963f2 100644
(file)
--- a/
filesetup.c
+++ b/
filesetup.c
@@
-526,6
+526,11
@@
open_again:
snprintf(buf, sizeof(buf) - 1, "open(%s)", f->file_name);
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);
}
td_verror(td, __e, buf);
}
@@
-665,7
+670,7
@@
int setup_files(struct thread_data *td)
dprint(FD_FILE, "setup files\n");
if (td->o.read_iolog_file)
dprint(FD_FILE, "setup files\n");
if (td->o.read_iolog_file)
-
return 0
;
+
goto done
;
/*
* if ioengine defines a setup() method, it's responsible for
/*
* if ioengine defines a setup() method, it's responsible for
@@
-816,6
+821,11
@@
int setup_files(struct thread_data *td)
*/
if (!td->o.read_iolog_file)
td->total_io_size = td->o.size * td->o.loops;
*/
if (!td->o.read_iolog_file)
td->total_io_size = td->o.size * td->o.loops;
+
+done:
+ if (td->o.create_only)
+ td->done = 1;
+
return 0;
err_offset:
log_err("%s: you need to specify valid offset=\n", td->o.name);
return 0;
err_offset:
log_err("%s: you need to specify valid offset=\n", td->o.name);