ret = 1;
}
+ /*
+ * O_ATOMIC implies O_DIRECT
+ */
+ if (td->o.oatomic)
+ td->o.odirect = 1;
+
+ /*
+ * If randseed is set, that overrides randrepeat
+ */
+ if (td->o.rand_seed)
+ td->o.rand_repeatable = 0;
+
return ret;
}
unsigned long seed;
unsigned int i;
- if (!td->o.rand_repeatable)
+ if (!td->o.rand_repeatable && !td->o.rand_seed)
return init_random_state(td, td->rand_seeds, sizeof(td->rand_seeds));
- for (seed = 0x89, i = 0; i < 4; i++)
+ if (!td->o.rand_seed)
+ seed = 0x89;
+ else
+ seed = td->o.rand_seed;
+
+ for (i = 0; i < 4; i++)
seed *= 0x9e370001UL;
for (i = 0; i < FIO_RAND_NR_OFFS; i++) {
return buf;
}
+
+int parse_dryrun(void)
+{
+ return dump_cmdline || parse_only;
+}
+
/*
* Adds a job to the list of things todo. Sanitizes the various options
* to make sure we don't have conflicts, and initializes various
/*
* if we are just dumping the output command line, don't add the job
*/
- if (dump_cmdline || parse_only) {
+ if (parse_dryrun()) {
put_job(td);
return 0;
}
td = get_new_job(0, td_parent, 0);
}
if (in_global)
- fio_options_parse(td_parent, (char **) &o[i], 1);
+ fio_options_parse(td_parent, (char **) &o[i], 1, 0);
else
- fio_options_parse(td, (char **) &o[i], 1);
+ fio_options_parse(td, (char **) &o[i], 1, 0);
i++;
}
}
/*
- * Seperate multiple job files by a stonewall
+ * Separate multiple job files by a stonewall
*/
if (!global && stonewall) {
td->o.stonewall = stonewall;
num_opts++;
}
- ret = fio_options_parse(td, opts, num_opts);
- if (!ret) {
- if (dump_cmdline)
- for (i = 0; i < num_opts; i++)
- log_info("--%s ", opts[i]);
-
+ ret = fio_options_parse(td, opts, num_opts, dump_cmdline);
+ if (!ret)
ret = add_job(td, name, 0, 0, type);
- } else {
+ else {
log_err("fio: job %s dropped\n", name);
put_job(td);
}
printf("%s [options] [job options] <job file(s)>\n", name);
printf(" --debug=options\tEnable debug logging. May be one/more of:\n"
"\t\t\tprocess,file,io,mem,blktrace,verify,random,parse,\n"
- "\t\t\tdiskutil,job,mutex,profile,time,net\n");
+ "\t\t\tdiskutil,job,mutex,profile,time,net,rate\n");
printf(" --parse-only\t\tParse options only, don't start any IO\n");
printf(" --output\t\tWrite output to file\n");
printf(" --runtime\t\tRuntime in seconds\n");
.help = "Network logging",
.shift = FD_NET,
},
+ { .name = "rate",
+ .help = "Rate logging",
+ .shift = FD_RATE,
+ },
{ .name = NULL, },
};
fio_options_free(&def_thread);
if (!thread_number) {
- if (dump_cmdline || parse_only)
+ if (parse_dryrun())
return 0;
if (exec_profile)
return 0;