Don't set FIO_FILE_extend when create_on_open= option is set
[fio.git] / filesetup.c
index fab9c5dec70b844aa40004ef98cc1794234927c3..f42f5d8f8bbc3ac1101689351bba3ffe39602dd5 100644 (file)
@@ -966,9 +966,9 @@ int setup_files(struct thread_data *td)
                        if (!o->create_on_open) {
                                need_extend++;
                                extend_size += (f->io_size + f->file_offset);
                        if (!o->create_on_open) {
                                need_extend++;
                                extend_size += (f->io_size + f->file_offset);
+                               fio_file_set_extend(f);
                        } else
                                f->real_file_size = f->io_size + f->file_offset;
                        } else
                                f->real_file_size = f->io_size + f->file_offset;
-                       fio_file_set_extend(f);
                }
        }
 
                }
        }