From b23b6a2f66637e326c5825bf438059ecc62008d4 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 11 Jun 2009 22:06:23 +0200 Subject: [PATCH] Yet another rate fixup Signed-off-by: Jens Axboe --- io_u.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/io_u.c b/io_u.c index bac65739..34ab58a1 100644 --- a/io_u.c +++ b/io_u.c @@ -970,10 +970,12 @@ static void io_completed(struct thread_data *td, struct io_u *io_u, } if (!td->o.disable_bw) add_bw_sample(td, idx, bytes, &icd->time); - if (__should_check_rate(td, idx)) - td->rate_pending_usleep[idx] += (long) td->rate_usec_cycle[idx] - rusec; + if (__should_check_rate(td, idx)) { + td->rate_pending_usleep[idx] += + (long) td->rate_usec_cycle[idx] - rusec; + } if (__should_check_rate(td, idx ^ 1)) - td->rate_pending_usleep[idx ^ 1] -= lusec; + td->rate_pending_usleep[idx ^ 1] -= rusec; } if (td_write(td) && idx == DDIR_WRITE && -- 2.25.1