Consider the maximum block size difference the minimum for loop exit

For mixed block sizes, we can hit the condition where we decided
to stop even if we could have done a small block size. Don't do
another loop for those cases.

Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/fio.h b/fio.h
index 4478eb6..621ed60 100644
--- a/fio.h
+++ b/fio.h
@@ -805,6 +805,14 @@
 	return ret;
 }
 
+static inline unsigned int td_max_bs(struct thread_data *td)
+{
+	unsigned int max_bs;
+
+	max_bs = max(td->o.max_bs[DDIR_READ], td->o.max_bs[DDIR_WRITE]);
+	return max(td->o.max_bs[DDIR_TRIM], max_bs);
+}
+
 static inline int is_power_of_2(unsigned int val)
 {
 	return (val != 0 && ((val & (val - 1)) == 0));