Merge branch 'master' of ssh://brick.kernel.dk/data/git/fio
diff --git a/HOWTO b/HOWTO
index aa5a6f0..025443b 100644
--- a/HOWTO
+++ b/HOWTO
@@ -893,6 +893,11 @@
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
diff --git a/filesetup.c b/filesetup.c
index f3d3829..a1ad026 100644
--- a/filesetup.c
+++ b/filesetup.c
@@ -665,7 +665,7 @@
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
@@ -816,6 +816,11 @@
*/
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);
diff --git a/fio.1 b/fio.1
index 352c2ca..7997526 100644
--- a/fio.1
+++ b/fio.1
@@ -555,10 +555,6 @@
If true, sync file contents on close. This differs from \fBend_fsync\fR in that
it will happen on every close, not just at the end of the job. Default: false.
.TP
-.BI rwmixcycle \fR=\fPint
-How many milliseconds before switching between reads and writes for a mixed
-workload. Default: 500ms.
-.TP
.BI rwmixread \fR=\fPint
Percentage of a mixed workload that should be reads. Default: 50.
.TP
@@ -725,6 +721,11 @@
.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
diff --git a/fio.h b/fio.h
index 6da22f0..f2a5a1f 100644
--- a/fio.h
+++ b/fio.h
@@ -125,6 +125,7 @@
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;
diff --git a/options.c b/options.c
index f8927ee..28a228c 100644
--- a/options.c
+++ b/options.c
@@ -1885,6 +1885,13 @@
.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,
.off1 = td_var_offset(pre_read),