create_on_open=bool Don't pre-setup the files for IO, just create open()
when it's time to do IO to that file.
+create_only=bool If true, fio will only run the setup phase of the job.
+ If files need to be laid out or updated on disk, only
+ that will be done. The actual job contents are not
+ executed.
+
pre_read=bool If this is given, files will be pre-read into memory before
starting the given IO operation. This will also clear
the 'invalidate' flag, since it is pointless to pre-read
dprint(FD_FILE, "setup files\n");
if (td->o.read_iolog_file)
- return 0;
+ goto done;
/*
* if ioengine defines a setup() method, it's responsible for
*/
if (!td->o.read_iolog_file)
td->total_io_size = td->o.size * td->o.loops;
+
+done:
+ if (td->o.create_only)
+ td->done = 1;
+
return 0;
err_offset:
log_err("%s: you need to specify valid offset=\n", td->o.name);
.BI create_on_open \fR=\fPbool
If true, the files are not created until they are opened for IO by the job.
.TP
+.BI create_only \fR=\fPbool
+If true, fio will only run the setup phase of the job. If files need to be
+laid out or updated on disk, only that will be done. The actual job contents
+are not executed.
+.TP
.BI pre_read \fR=\fPbool
If this is given, files will be pre-read into memory before starting the given
IO operation. This will also clear the \fR \fBinvalidate\fR flag, since it is
unsigned int create_serialize;
unsigned int create_fsync;
unsigned int create_on_open;
+ unsigned int create_only;
unsigned int end_fsync;
unsigned int pre_read;
unsigned int sync_io;
.help = "Create files when they are opened for IO",
.def = "0",
},
+ {
+ .name = "create_only",
+ .type = FIO_OPT_BOOL,
+ .off1 = td_var_offset(create_only),
+ .help = "Only perform file creation phase",
+ .def = "0",
+ },
{
.name = "pre_read",
.type = FIO_OPT_BOOL,