From e0224c6bd115b0decd4f330fa8ff43f5e0cc6811 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Thu, 7 Feb 2013 19:55:24 +0100 Subject: [PATCH 1/1] Fix bug with rate and read/write mixed workloads at 100% bias The rate_ddir() might sometimes decide to send the other data direction, even if we have a workload with rw=randrw and rwmixread=0. Check for this condition. Signed-off-by: Jens Axboe --- io_u.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/io_u.c b/io_u.c index 6ae3eae8..65988819 100644 --- a/io_u.c +++ b/io_u.c @@ -490,7 +490,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir) assert(ddir_rw(ddir)); - if (td->rate_pending_usleep[ddir] <= 0) + if (td->rate_pending_usleep[ddir] <= 0 || !td->o.rwmix[odir]) return ddir; /* @@ -545,6 +545,7 @@ static enum fio_ddir rate_ddir(struct thread_data *td, enum fio_ddir ddir) if (ddir_trim(ddir)) return ddir; + return ddir; } -- 2.25.1