From: Tomohiro Kusumi Date: Tue, 7 Mar 2017 20:13:03 +0000 (+0200) Subject: Don't set FIO_FILE_extend when create_on_open= option is set X-Git-Tag: fio-2.19~46 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=435584068dad5d4d2464017c3c258673b0ddd74a;hp=12bb8569a2cff7c3905e5a3a132069f47a861d12 Don't set FIO_FILE_extend when create_on_open= option is set FIO_FILE_extend gets set and later cleared only when create_on_open= is disabled (which is default). If create_on_open=1 is set this flag could be set for the entire runtime, but this flag is basically designed to be enabled only during setup time. (If there's no "Layint out IO file..." message, both FIO_FILE_extend and need_extend probably aren't even needed, as files can be extended at the moment when these flag/variable are set) Signed-off-by: Tomohiro Kusumi Signed-off-by: Jens Axboe --- diff --git a/filesetup.c b/filesetup.c index fab9c5de..f42f5d8f 100644 --- a/filesetup.c +++ b/filesetup.c @@ -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); + fio_file_set_extend(f); } else f->real_file_size = f->io_size + f->file_offset; - fio_file_set_extend(f); } }