projects
/
fio.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix race condition when using asynch verify
[fio.git]
/
fio.c
diff --git
a/fio.c
b/fio.c
index 7ad1b57219cb646926cbc65a49cf22143b721e4b..3a9a3badff0fddefbe9d4f0dca22768c52137c25 100644
(file)
--- a/
fio.c
+++ b/
fio.c
@@
-606,7
+606,8
@@
static void do_io(struct thread_data *td)
* Add verification end_io handler, if asked to verify
* a previously written file.
*/
* Add verification end_io handler, if asked to verify
* a previously written file.
*/
- if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ) {
+ if (td->o.verify != VERIFY_NONE && io_u->ddir == DDIR_READ &&
+ !td_rw(td)) {
if (td->o.verify_async)
io_u->end_io = verify_io_u_async;
else
if (td->o.verify_async)
io_u->end_io = verify_io_u_async;
else
@@
-1618,12
+1619,6
@@
int main(int argc, char *argv[])
if (!getenv("LC_NUMERIC"))
setlocale(LC_NUMERIC, "en_US");
if (!getenv("LC_NUMERIC"))
setlocale(LC_NUMERIC, "en_US");
- if (parse_options(argc, argv))
- return 1;
-
- if (!thread_number)
- return 0;
-
ps = sysconf(_SC_PAGESIZE);
if (ps < 0) {
log_err("Failed to get page size\n");
ps = sysconf(_SC_PAGESIZE);
if (ps < 0) {
log_err("Failed to get page size\n");
@@
-1633,6
+1628,14
@@
int main(int argc, char *argv[])
page_size = ps;
page_mask = ps - 1;
page_size = ps;
page_mask = ps - 1;
+ fio_keywords_init();
+
+ if (parse_options(argc, argv))
+ return 1;
+
+ if (!thread_number)
+ return 0;
+
if (write_bw_log) {
setup_log(&agg_io_log[DDIR_READ]);
setup_log(&agg_io_log[DDIR_WRITE]);
if (write_bw_log) {
setup_log(&agg_io_log[DDIR_READ]);
setup_log(&agg_io_log[DDIR_WRITE]);