Make the ETA output buffer big enough to cope with the maximum possible
jobs when their states can't be compressed (i.e. when every job's state
is different to the state of the job that came before it).
Allows the following script to display the complete status line:
rw[0]='read'; rw[1]='write'; \
for i in {1..4096}; do \
echo -e "[job$i]\nrw=${rw[$((i % 2))]}\n" \
"runtime=15"; \
done | \
./fio --eta=always --group_reporting=1 --ioengine=null --size=1g \
--time_based --bs=1k --thread --rate_iops=1 -
Fixes: https://github.com/axboe/fio/issues/500 ("Large number of threads
result in Seg faults")
Signed-off-by: Sitsofe Wheeler <sitsofe@yahoo.com>
static int eta_new_line_init, eta_new_line_pending;
static int linelen_last;
static int eta_good;
- char output[REAL_MAX_JOBS + 512], *p = output;
+ char output[__THREAD_RUNSTR_SZ(REAL_MAX_JOBS) + 512], *p = output;
char eta_str[128];
double perc = 0.0;