'clear_io_state' is called twice and resets the nr_done_files.
'clear_io_state' resets the nr_done_files if loop>=1.
This API is called twice with in thread_main and the second call is
skipped if do_verify=0. We rely on the first call for setup management.
So, for the very last loop, we would have skipped reseting
'nr_done_files' because loops=0 resulting in an IO error
in do_io and we exit without performing any IOs. Fix will invoke
the second call to clear_io_state
Signed-off-by: Sowmya Ravi sowmyaravi.92@gmail.com
if (td->error || td->terminate)
break;
if (td->error || td->terminate)
break;
+ clear_io_state(td, 0);
+
if (!o->do_verify ||
o->verify == VERIFY_NONE ||
td_ioengine_flagged(td, FIO_UNIDIR))
continue;
if (!o->do_verify ||
o->verify == VERIFY_NONE ||
td_ioengine_flagged(td, FIO_UNIDIR))
continue;
- clear_io_state(td, 0);
-
fio_gettime(&td->start, NULL);
do_verify(td, verify_bytes);
fio_gettime(&td->start, NULL);
do_verify(td, verify_bytes);