From: Jens Axboe Date: Mon, 19 Jan 2009 11:49:48 +0000 (+0100) Subject: Fix broken rate check X-Git-Tag: fio-1.24~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=e235d5f883d7640d6ca2255cbdc43762b1fe6959;p=fio.git Fix broken rate check Signed-off-by: Jens Axboe --- 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; } /*