Indicate 'V' verify state always
authorJens Axboe <jens.axboe@oracle.com>
Thu, 6 Mar 2008 09:25:17 +0000 (10:25 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Thu, 6 Mar 2008 09:25:17 +0000 (10:25 +0100)
We only print 'V' for a thread if it does a verify run after a write,
however fio can be invoked for a later verify using a different job file.
So check in do_io() as well and set verify state if appropriate.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index de6132c034a3daa04a64c0b4e60967ccbf99d331..6a72ce773820d0a19cad1497dd41e0a64ae31128 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -61,6 +61,9 @@ struct io_log *agg_io_log[2];
 
 static inline void td_set_runstate(struct thread_data *td, int runstate)
 {
 
 static inline void td_set_runstate(struct thread_data *td, int runstate)
 {
+       if (td->runstate == runstate)
+               return;
+
        dprint(FD_PROCESS, "pid=%d: runstate %d -> %d\n", td->pid, td->runstate,
                                                                runstate);
        td->runstate = runstate;
        dprint(FD_PROCESS, "pid=%d: runstate %d -> %d\n", td->pid, td->runstate,
                                                                runstate);
        td->runstate = runstate;
@@ -461,8 +464,11 @@ 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)
+               if (td->o.verify != VERIFY_NONE) {
                        io_u->end_io = verify_io_u;
                        io_u->end_io = verify_io_u;
+                       td_set_runstate(td, TD_VERIFYING);
+               } else
+                       td_set_runstate(td, TD_RUNNING);
 
                ret = td_io_queue(td, io_u);
                switch (ret) {
 
                ret = td_io_queue(td, io_u);
                switch (ret) {