X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=init.c;h=84325f1e86fc800cdef58140d677004b4eacf9f1;hb=refs%2Fheads%2Fmaster;hp=105339fa28e0b855af65da9cb6a3c30529156e8d;hpb=04361e9a23d6e0448fd6fbbd4e14ecdfff60e314;p=fio.git diff --git a/init.c b/init.c index 105339fa..96a03d98 100644 --- a/init.c +++ b/init.c @@ -618,6 +618,19 @@ static int fixup_options(struct thread_data *td) ret |= 1; } + if (td_trimwrite(td) && o->num_range > 1) { + log_err("fio: trimwrite cannot be used with multiple" + " ranges.\n"); + ret |= 1; + } + + if (td_trim(td) && o->num_range > 1 && + !td_ioengine_flagged(td, FIO_MULTI_RANGE_TRIM)) { + log_err("fio: can't use multiple ranges with IO engine %s\n", + td->io_ops->name); + ret |= 1; + } + #ifndef CONFIG_PSHARED if (!o->use_thread) { log_info("fio: this platform does not support process shared" @@ -840,6 +853,20 @@ static int fixup_options(struct thread_data *td) (o->max_bs[DDIR_WRITE] % o->verify_interval)) o->verify_interval = gcd(o->min_bs[DDIR_WRITE], o->max_bs[DDIR_WRITE]); + + if (td->o.verify_only) + o->verify_write_sequence = 0; + } + + if (td->o.oatomic) { + if (!td_ioengine_flagged(td, FIO_ATOMICWRITES)) { + log_err("fio: engine does not support atomic writes\n"); + td->o.oatomic = 0; + ret |= 1; + } + + if (!td_write(td)) + td->o.oatomic = 0; } if (o->pre_read) { @@ -1002,7 +1029,15 @@ static int fixup_options(struct thread_data *td) ret |= 1; } - + if (td->o.fdp) { + if (fio_option_is_set(&td->o, dp_type) && + (td->o.dp_type == FIO_DP_STREAMS || td->o.dp_type == FIO_DP_NONE)) { + log_err("fio: fdp=1 is not compatible with dataplacement={streams, none}\n"); + ret |= 1; + } else { + td->o.dp_type = FIO_DP_FDP; + } + } return ret; } @@ -1600,12 +1635,18 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, .log_type = IO_LOG_TYPE_LAT, .log_offset = o->log_offset, .log_prio = o->log_prio, + .log_issue_time = o->log_issue_time, .log_gz = o->log_gz, .log_gz_store = o->log_gz_store, }; const char *pre = make_log_name(o->lat_log_file, o->name); const char *suf; + if (o->log_issue_time && !o->log_offset) { + log_err("fio: log_issue_time option requires write_lat_log and log_offset options\n"); + goto err; + } + if (p.log_gz_store) suf = "log.fz"; else @@ -1629,6 +1670,9 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, setup_log(&td->clat_log, &p, logname); } + } else if (o->log_issue_time) { + log_err("fio: log_issue_time option requires write_lat_log and log_offset options\n"); + goto err; } if (o->write_hist_log) { @@ -1640,6 +1684,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, .log_type = IO_LOG_TYPE_HIST, .log_offset = o->log_offset, .log_prio = o->log_prio, + .log_issue_time = o->log_issue_time, .log_gz = o->log_gz, .log_gz_store = o->log_gz_store, }; @@ -1672,6 +1717,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, .log_type = IO_LOG_TYPE_BW, .log_offset = o->log_offset, .log_prio = o->log_prio, + .log_issue_time = o->log_issue_time, .log_gz = o->log_gz, .log_gz_store = o->log_gz_store, }; @@ -1704,6 +1750,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num, .log_type = IO_LOG_TYPE_IOPS, .log_offset = o->log_offset, .log_prio = o->log_prio, + .log_issue_time = o->log_issue_time, .log_gz = o->log_gz, .log_gz_store = o->log_gz_store, };