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 <axboe@kernel.dk>
diff --git a/io_u.c b/io_u.c
index 6ae3eae..6598881 100644
--- a/io_u.c
+++ b/io_u.c
@@ -490,7 +490,7 @@
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 @@
if (ddir_trim(ddir))
return ddir;
+
return ddir;
}