X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=backend.c;h=2f46329376451f18a49c94696e84687dda4390d8;hp=12f1b2b909b95cd0df148a86b1a62a706d479c99;hb=da92f848c5e0d29db6dda12c4c97bf1338a01128;hpb=d28174f0189cd862bc7480e5dc8314fd8257ffd2 diff --git a/backend.c b/backend.c index 12f1b2b9..2f463293 100644 --- a/backend.c +++ b/backend.c @@ -1542,7 +1542,7 @@ static void *thread_main(void *data) struct sk_out *sk_out = fd->sk_out; uint64_t bytes_done[DDIR_RWDIR_CNT]; int deadlock_loop_cnt; - bool clear_state, did_some_io; + bool clear_state; int ret; sk_out_assign(sk_out); @@ -1698,9 +1698,15 @@ static void *thread_main(void *data) if (!init_iolog(td)) goto err; + if (td_io_init(td)) + goto err; + if (init_io_u(td)) goto err; + if (td->io_ops->post_init && td->io_ops->post_init(td)) + goto err; + if (o->verify_async && verify_async_init(td)) goto err; @@ -1728,9 +1734,6 @@ static void *thread_main(void *data) if (!o->create_serialize && setup_files(td)) goto err; - if (td_io_init(td)) - goto err; - if (!init_random_map(td)) goto err; @@ -1763,7 +1766,6 @@ static void *thread_main(void *data) memset(bytes_done, 0, sizeof(bytes_done)); clear_state = false; - did_some_io = false; while (keep_running(td)) { uint64_t verify_bytes; @@ -1841,9 +1843,6 @@ static void *thread_main(void *data) td_ioengine_flagged(td, FIO_UNIDIR)) continue; - if (ddir_rw_sum(bytes_done)) - did_some_io = true; - clear_io_state(td, 0); fio_gettime(&td->start, NULL); @@ -1864,19 +1863,6 @@ static void *thread_main(void *data) break; } - /* - * If td ended up with no I/O when it should have had, - * then something went wrong unless FIO_NOIO or FIO_DISKLESSIO. - * (Are we not missing other flags that can be ignored ?) - */ - if ((td->o.size || td->o.io_size) && !ddir_rw_sum(bytes_done) && - !did_some_io && !td->o.create_only && - !(td_ioengine_flagged(td, FIO_NOIO) || - td_ioengine_flagged(td, FIO_DISKLESSIO))) - log_err("%s: No I/O performed by %s, " - "perhaps try --debug=io option for details?\n", - td->o.name, td->io_ops->name); - /* * Acquire this lock if we were doing overlap checking in * offload mode so that we don't clean up this job while