Revert "Fixup ->open_files if not given"
[fio.git] / filesetup.c
index fa09219f62a2e2b93f0e001b2e7254da72e04e99..abea1e60b726a8d82f503b054c83d76a66470210 100644 (file)
@@ -806,7 +806,7 @@ int setup_files(struct thread_data *td)
         * Calculate per-file size and potential extra size for the
         * first files, if needed.
         */
-       if (!o->file_size_low) {
+       if (!o->file_size_low && o->nr_files) {
                uint64_t all_fs;
 
                fs = o->size / o->nr_files;
@@ -1279,13 +1279,6 @@ int add_file(struct thread_data *td, const char *fname, int numjob, int inc)
 
        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;
-
        if (inc)
                td->o.nr_files++;