summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamian Yurzola <damian.yurzola@purestorage.com>2018-02-08 17:29:38 -0800
committerDamian Yurzola <damian.yurzola@purestorage.com>2018-02-10 13:34:19 -0800
commitc82acb8d72cc6b027d404aab9774fec72a6334e1 (patch)
treee31ce9bf7faee17d0cf4a5c9cafbabc50c18430e
parent0cf542af81751d7b318afe4429001c1aab6baee5 (diff)
downloadfio-c82acb8d72cc6b027d404aab9774fec72a6334e1.tar.gz
fio-c82acb8d72cc6b027d404aab9774fec72a6334e1.tar.bz2
init: fix broken verify_interval
The operands seems to have been inverted which in turn created the situation whereby the interval was always changed to match the min_bs Fixes: https://github.com/axboe/fio/issues/522 Signed-off-by: Damian Yurzola <damian@yurzola.net>
-rw-r--r--init.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/init.c b/init.c
index ae3c4f74..8861c994 100644
--- a/init.c
+++ b/init.c
@@ -802,13 +802,14 @@ static int fixup_options(struct thread_data *td)
o->verify_interval = o->min_bs[DDIR_READ];
/*
- * Verify interval must be a factor or both min and max
+ * Verify interval must be a factor of both min and max
* write size
*/
- if (o->verify_interval % o->min_bs[DDIR_WRITE] ||
- o->verify_interval % o->max_bs[DDIR_WRITE])
+ if (!o->verify_interval ||
+ o->min_bs[DDIR_WRITE] % o->verify_interval ||
+ o->max_bs[DDIR_WRITE] % o->verify_interval)
o->verify_interval = gcd(o->min_bs[DDIR_WRITE],
- o->max_bs[DDIR_WRITE]);
+ o->max_bs[DDIR_WRITE]);
}
if (o->pre_read) {
@@ -1585,7 +1586,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
p.avg_msec = min(o->log_avg_msec, o->bw_avg_time);
else
o->bw_avg_time = p.avg_msec;
-
+
p.hist_msec = o->log_hist_msec;
p.hist_coarseness = o->log_hist_coarseness;
@@ -1616,7 +1617,7 @@ static int add_job(struct thread_data *td, const char *jobname, int job_add_num,
p.avg_msec = min(o->log_avg_msec, o->iops_avg_time);
else
o->iops_avg_time = p.avg_msec;
-
+
p.hist_msec = o->log_hist_msec;
p.hist_coarseness = o->log_hist_coarseness;