From 0a5d0ddc42afdd5c2c636e0beda195ec1ea0ade7 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 21 Nov 2014 13:49:00 -0700 Subject: [PATCH] blktrace: correct setting of iodepth We want to check for == 1, not != 1. Also set iodepth_low, like we would have done for a "normal" job file. Signed-off-by: Jens Axboe --- blktrace.c | 4 ++-- init.c | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/blktrace.c b/blktrace.c index 8d288b08..9afc5be0 100644 --- a/blktrace.c +++ b/blktrace.c @@ -459,8 +459,8 @@ int load_blktrace(struct thread_data *td, const char *filename, int need_swap) * we don't know if this option was set or not. it defaults to 1, * so we'll just guess that we should override it if it's still 1 */ - if (td->o.iodepth != 1) - td->o.iodepth = depth; + if (td->o.iodepth == 1) + td->o.iodepth = td->o.iodepth_low = depth; return 0; err: diff --git a/init.c b/init.c index b72689a3..4f66759b 100644 --- a/init.c +++ b/init.c @@ -565,7 +565,6 @@ static int fixup_options(struct thread_data *td) if (!o->max_bs[DDIR_TRIM]) o->max_bs[DDIR_TRIM] = o->bs[DDIR_TRIM]; - o->rw_min_bs = min(o->min_bs[DDIR_READ], o->min_bs[DDIR_WRITE]); o->rw_min_bs = min(o->min_bs[DDIR_TRIM], o->rw_min_bs); -- 2.25.1