Fix broken rate check
authorJens Axboe <jens.axboe@oracle.com>
Mon, 19 Jan 2009 11:49:48 +0000 (12:49 +0100)
committerJens Axboe <jens.axboe@oracle.com>
Mon, 19 Jan 2009 11:49:48 +0000 (12:49 +0100)
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fio.c

diff --git a/fio.c b/fio.c
index 0ef039ddb03feef70c7976cf4438200a0c5f4ca3..b4415fa7d942c2413018fb1f174345c9cb74c339 100644 (file)
--- a/fio.c
+++ b/fio.c
@@ -171,13 +171,15 @@ static void set_sig_handlers(void)
 
 static inline int should_check_rate(struct thread_data *td)
 {
+       struct thread_options *o = &td->o;
+
        /*
-        * No minimum rate set, always ok
+        * If some rate setting was given, we need to check it
         */
-       if (!td->o.ratemin && !td->o.rate_iops_min)
-               return 0;
+       if (o->rate || o->ratemin || o->rate_iops || o->rate_iops_min)
+               return 1;
 
-       return 1;
+       return 0;
 }
 
 /*