For engines/users that add files with add_file() after the
job has been initialized, ensure that we bump the allowed
number of open files if it wasn't explicitly given as
an option.
This unbreaks the net engine after commit
002fe73409d1e made
fio more strict wrt open files.
Signed-off-by: Jens Axboe <axboe@fb.com>
set_already_allocated(file_name);
+ /*
+ * For adding files after the fact - if openfiles= isn't
+ * given as an option, ensure we allow at least one file open
+ */
+ if (!td->o.open_files)
+ td->o.open_files = 1;
+
dprint(FD_FILE, "file %p \"%s\" added at %d\n", f, f->file_name,
cur_files);