Add 'f' (Finishing) flag to status output
authorJens Axboe <axboe@fb.com>
Wed, 2 Apr 2014 21:46:22 +0000 (15:46 -0600)
committerJens Axboe <axboe@fb.com>
Wed, 2 Apr 2014 21:46:22 +0000 (15:46 -0600)
Use this for finalizing logs when a thread is done, since
that can take a long time.

Signed-off-by: Jens Axboe <axboe@fb.com>
HOWTO
eta.c
fio.h

diff --git a/HOWTO b/HOWTO
index 47eff96..7db7b89 100644 (file)
--- a/HOWTO
+++ b/HOWTO
@@ -1590,6 +1590,7 @@ I         Thread initialized, waiting or generating necessary data.
        M       Running, doing mixed sequential reads/writes.
        m       Running, doing mixed random reads/writes.
        F       Running, currently waiting for fsync()
+       f       Running, finishing up (writing IO logs, etc)
        V       Running, doing verification of written data.
 E              Thread exited, not reaped by main thread yet.
 _              Thread reaped, or
diff --git a/eta.c b/eta.c
index b050102..42066e0 100644 (file)
--- a/eta.c
+++ b/eta.c
@@ -74,6 +74,9 @@ static void check_str_update(struct thread_data *td)
        case TD_FSYNCING:
                c = 'F';
                break;
+       case TD_FINISHING:
+               c = 'f';
+               break;
        case TD_CREATED:
                c = 'C';
                break;
@@ -331,7 +334,8 @@ int calc_thread_status(struct jobs_eta *je, int force)
                        bw_avg_time = td->o.bw_avg_time;
                if (td->runstate == TD_RUNNING || td->runstate == TD_VERIFYING
                    || td->runstate == TD_FSYNCING
-                   || td->runstate == TD_PRE_READING) {
+                   || td->runstate == TD_PRE_READING
+                   || td->runstate == TD_FINISHING) {
                        je->nr_running++;
                        if (td_read(td)) {
                                je->t_rate[0] += td->o.rate[DDIR_READ];
diff --git a/fio.h b/fio.h
index befdce3..a539f21 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -471,6 +471,7 @@ enum {
        TD_PRE_READING,
        TD_VERIFYING,
        TD_FSYNCING,
+       TD_FINISHING,
        TD_EXITED,
        TD_REAPED,
 };