From: Jens Axboe Date: Thu, 11 Jun 2009 20:06:23 +0000 (+0200) Subject: Yet another rate fixup X-Git-Tag: fio-1.28~1 X-Git-Url: https://git.kernel.dk/?p=fio.git;a=commitdiff_plain;h=b23b6a2f66637e326c5825bf438059ecc62008d4 Yet another rate fixup Signed-off-by: Jens Axboe --- 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 &&