{
.name = "write_iolog",
.type = FIO_OPT_STR_STORE,
- .off1 = td_var_offset(write_iolog),
+ .off1 = td_var_offset(write_iolog_file),
},
{
- .name = "iolog",
+ .name = "read_iolog",
.type = FIO_OPT_STR_STORE,
- .off1 = td_var_offset(iolog),
+ .off1 = td_var_offset(read_iolog_file),
},
{
.name = "exec_prerun",
thread_number--;
}
+/*
+ * Lazy way of fixing up options that depend on each other. We could also
+ * define option callback handlers, but this is easier.
+ */
static void fixup_options(struct thread_data *td)
{
if (!td->min_bs)
if (!td->rwmixread && td->rwmixwrite)
td->rwmixread = 100 - td->rwmixwrite;
+
+ if (td->write_iolog_file && td->read_iolog_file) {
+ log_err("fio: read iolog overrides write_iolog\n");
+ free(td->write_iolog_file);
+ td->write_iolog_file = NULL;
+ }
}
/*
int fd, num_maps, blocks, i;
struct fio_file *f;
+ if (td->io_ops->flags & FIO_CPUIO)
+ return 0;
+
fd = open("/dev/urandom", O_RDONLY);
if (fd == -1) {
td_verror(td, errno);