X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;ds=sidebyside;f=init.c;h=e7faca10ca1dd448e48867a1602c2d5e61710465;hb=129fb2d422557e493020a8eac00867749af284b4;hp=cdb98c57231066b5e71c7c7ce2636c7870215d15;hpb=3701636d7d8e8c60b27a54f32a94ede6e15b0380;p=fio.git diff --git a/init.c b/init.c index cdb98c57..e7faca10 100644 --- a/init.c +++ b/init.c @@ -465,7 +465,7 @@ static int __setup_rate(struct thread_data *td, enum fio_ddir ddir) if (td->o.rate[ddir]) td->rate_bps[ddir] = td->o.rate[ddir]; else - td->rate_bps[ddir] = td->o.rate_iops[ddir] * bs; + td->rate_bps[ddir] = (uint64_t) td->o.rate_iops[ddir] * bs; if (!td->rate_bps[ddir]) { log_err("rate lower than supported\n"); @@ -630,6 +630,13 @@ static int fixup_options(struct thread_data *td) if (o->iodepth_batch > o->iodepth || !o->iodepth_batch) o->iodepth_batch = o->iodepth; + /* + * If max batch complete number isn't set or set incorrectly, + * default to the same as iodepth_batch_complete_min + */ + if (o->iodepth_batch_complete_min > o->iodepth_batch_complete_max) + o->iodepth_batch_complete_max = o->iodepth_batch_complete_min; + if (o->nr_files > td->files_index) o->nr_files = td->files_index; @@ -1310,7 +1317,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, if (!o->name) o->name = strdup(jobname); - if (output_format == FIO_OUTPUT_NORMAL) { + if (output_format & FIO_OUTPUT_NORMAL) { if (!job_add_num) { if (is_backend && !recursed) fio_server_send_add_job(td); @@ -2525,7 +2532,7 @@ int parse_options(int argc, char *argv[]) return 0; } - if (output_format == FIO_OUTPUT_NORMAL) + if (output_format & FIO_OUTPUT_NORMAL) log_info("%s\n", fio_version_string); return 0;