Revert "Fix for loop count issue when do_verify=0 (#1093)"
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 1 Oct 2021 10:32:56 +0000 (19:32 +0900)
committerJens Axboe <axboe@kernel.dk>
Fri, 1 Oct 2021 17:17:13 +0000 (11:17 -0600)
This reverts commit 499cded5f435a0a7c379b606eb3e903d7f43c360.

The commit enabled clear_io_state() call in the loop of thread_main()
after completion of IOs, regardless of verify option. This sets zero to
td->nr_done_files even when the IOs are sequential workload with holes.
Such IOs depend on td->nr_done_files to judge job completion in
__get_next_file(). With zero value in td->nr_done_files, the sequential
IOs do not complete as expected, and results in failure of a test case

Revert the commit to avoid the failure. Regarding the loop count issue
with do_verify=0 option, another fix patch follows.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20211001103257.4130231-2-shinichiro.kawasaki@wdc.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
backend.c

index 4c2607477c5404fbfc588b0e07d79b367017f997..86fa6d41f860649e0f83c3aaf740ca9720e6c930 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1920,13 +1920,13 @@ static void *thread_main(void *data)
                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;
 
+               clear_io_state(td, 0);
+
                fio_gettime(&td->start, NULL);
 
                do_verify(td, verify_bytes);