If we run with an IO rate, and it happens to be low enough that
we never need to wait for the queue full condition, we will never
regrow the log and hence crash in stat.c on this line:
assert(iolog->pending->nr_samples < iolog->pending->max_samples);
Fix this by shuffling the code around a bit, so io_u_quiesce()
regrows the log, if needed, after having reaped completions.
Signed-off-by: Jens Axboe <axboe@fb.com>
int min_evts = 0;
int ret;
- if (td->flags & TD_F_REGROW_LOGS) {
- ret = io_u_quiesce(td);
- regrow_logs(td);
- return ret;
- }
+ if (td->flags & TD_F_REGROW_LOGS)
+ return io_u_quiesce(td);
/*
* if the queue is full, we MUST reap at least 1 event
completed += ret;
}
+ if (td->flags & TD_F_REGROW_LOGS)
+ regrow_logs(td);
+
return completed;
}