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 47eff96a9158989f0b178ae168ec25faf7fd2f98..7db7b8929a21a46b971bb9a45f5a774e721f96a1 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 b0501029c2b29c2e0ea6925be1d39b66e6cd17d5..42066e0d95c044136e96c381caa04e614b48c68d 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 befdce31ee20fb04202ffe2704eef0b946a45029..a539f21bee39961a53f297185f3e01fe2df2ee5c 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,
 };