account for delayed jobs when reaping threads
reap_threads does not account for jobs that have been delayed
(e.g. via startdelay) which may lead to all threads being
terminated. The following job file demonstrates the problem:
[job1]
filename=job1file
size=16k
startdelay=1
Signed-off-by: Aaron Carroll <aaronc@gelato.unsw.edu.au>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fio.c b/fio.c
index 355d873..6e25c5f 100644
--- a/fio.c
+++ b/fio.c
@@ -1024,7 +1024,11 @@
else
realthreads++;
- if (!td->pid || td->runstate == TD_REAPED)
+ if (!td->pid) {
+ pending++;
+ continue;
+ }
+ if (td->runstate == TD_REAPED)
continue;
if (td->o.use_thread) {
if (td->runstate == TD_EXITED) {