blktrace: correct setting of iodepth
authorJens Axboe <axboe@fb.com>
Fri, 21 Nov 2014 20:49:00 +0000 (13:49 -0700)
committerJens Axboe <axboe@fb.com>
Fri, 21 Nov 2014 20:49:00 +0000 (13:49 -0700)
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 <axboe@fb.com>
blktrace.c
init.c

index 8d288b080392063775c8ad477f57ef7c8bac5791..9afc5be045224165c682e9b71c2ec238cd069c98 100644 (file)
@@ -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 b72689a3782cc816a0acf879e9fd1e0ef322058f..4f66759b59b551ea0364231c45e7e61110b85ca0 100644 (file)
--- 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);