projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[PATCH] Warn on conflicting read/write iolog
[fio.git]
/
init.c
diff --git
a/init.c
b/init.c
index 037dd3167f2b47e58e3fae7d6bc6644975eaf3ff..3b1f88288b289e31f7669389c21ee8b554254e89 100644
(file)
--- a/
init.c
+++ b/
init.c
@@
-871,11
+871,13
@@
int parse_jobs_ini(char *file)
continue;
}
if (!check_strstore(p, "iolog", tmpbuf)) {
continue;
}
if (!check_strstore(p, "iolog", tmpbuf)) {
- if (td->iolog_file)
+ if (td->write_iolog) {
+ fprintf(stderr, "fio: read iolog overrides given write_iolog\n");
free(td->iolog_file);
free(td->iolog_file);
+ td->write_iolog = 0;
+ }
td->iolog_file = strdup(tmpbuf);
td->read_iolog = 1;
td->iolog_file = strdup(tmpbuf);
td->read_iolog = 1;
- td->write_iolog = 0;
fgetpos(f, &off);
continue;
}
fgetpos(f, &off);
continue;
}
@@
-883,7
+885,8
@@
int parse_jobs_ini(char *file)
if (!td->read_iolog) {
td->iolog_file = strdup(tmpbuf);
td->write_iolog = 1;
if (!td->read_iolog) {
td->iolog_file = strdup(tmpbuf);
td->write_iolog = 1;
- }
+ } else
+ fprintf(stderr, "fio: read iolog overrides given write_iolog\n");
fgetpos(f, &off);
continue;
}
fgetpos(f, &off);
continue;
}