From e235d5f883d7640d6ca2255cbdc43762b1fe6959 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Mon, 19 Jan 2009 12:49:48 +0100 Subject: [PATCH] Fix broken rate check Signed-off-by: Jens Axboe --- fio.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/fio.c b/fio.c index 0ef039dd..b4415fa7 100644 --- 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; } /* -- 2.25.1