From 20e37e4a63ea7edb528c8a443b738a0a67c2406e Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 18 Aug 2015 10:39:11 -0600 Subject: [PATCH] Correct handleing of rate_iops_min and ratemin change to allow ratemin to be set without rate disabled ratemin checking in __check_min_rate. Separate from the change to ratemin parsing, rate_iops_min check did not result in "return 1;" so jobs would not terminate on a failure to maintain rate_iops_min. --- backend.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend.c b/backend.c index d5b260a8..094cf710 100644 --- a/backend.c +++ b/backend.c @@ -179,7 +179,7 @@ static int __check_min_rate(struct thread_data *td, struct timeval *now, if (spent < td->o.ratecycle) return 0; - if (td->o.rate[ddir]) { + if (td->o.rate[ddir] || td->o.ratemin[ddir]) { /* * check bandwidth specified rate */ @@ -220,6 +220,7 @@ static int __check_min_rate(struct thread_data *td, struct timeval *now, log_err("%s: min iops rate %u not met," " got %lu\n", td->o.name, rate_iops_min, rate); + return 1; } } } -- 2.25.1