backend: mark the thread as finishing, when we are out of the IO loop
authorJens Axboe <axboe@fb.com>
Thu, 19 May 2016 15:19:03 +0000 (09:19 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 19 May 2016 15:19:03 +0000 (09:19 -0600)
Signed-off-by: Jens Axboe <axboe@fb.com>
backend.c

index efedb5329d65a9bc224047ffe43027ca21f290f1..56909f424783cca3e7800515be1f396f205e6a76 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -1705,6 +1705,8 @@ static void *thread_main(void *data)
                        break;
        }
 
                        break;
        }
 
+       td_set_runstate(td, TD_FINISHING);
+
        update_rusage_stat(td);
        td->ts.total_run_time = mtime_since_now(&td->epoch);
        td->ts.io_bytes[DDIR_READ] = td->io_bytes[DDIR_READ];
        update_rusage_stat(td);
        td->ts.total_run_time = mtime_since_now(&td->epoch);
        td->ts.io_bytes[DDIR_READ] = td->io_bytes[DDIR_READ];