X-Git-Url: https://git.kernel.dk/?p=fio.git;a=blobdiff_plain;f=time.c;h=5d3dee20e8b6337109005efe507b96c549708ace;hp=ad5ee3fe51773c9019067f593834428afad8fc9b;hb=a00735e66f9ec42549da94eba3170e543b542904;hpb=c7c280ed2e4f836bd8e9e125d55d097539b70e21 diff --git a/time.c b/time.c index ad5ee3fe..5d3dee20 100644 --- a/time.c +++ b/time.c @@ -99,14 +99,14 @@ void usec_sleep(struct thread_data *td, unsigned long usec) } void rate_throttle(struct thread_data *td, unsigned long time_spent, - unsigned int bytes) + unsigned int bytes, int ddir) { unsigned long usec_cycle; if (!td->rate) return; - usec_cycle = td->rate_usec_cycle * (bytes / td->min_bs); + usec_cycle = td->rate_usec_cycle * (bytes / td->min_bs[ddir]); if (time_spent < usec_cycle) { unsigned long s = usec_cycle - time_spent;