We only really need this for multiple jobs, and we only check it
if we are in job > 1. But we always mark the file as allocated.
For jobs with lots of files (millions), this takes a long time
to do at setup time.
Running this sample job:
./fio --alloc-size=131072 --name=filecreate --ioengine=filecreate --size=1g --nr_files=1m --openfiles=256
takes ~16s before, and about ~7s afterwards.
Signed-off-by: Jens Axboe <axboe@kernel.dk>
if (f->filetype == FIO_TYPE_FILE)
td->nr_normal_files++;
- set_already_allocated(file_name);
+ if (td->o.numjobs > 1)
+ set_already_allocated(file_name);
if (inc)
td->o.nr_files++;