Restore BUSY_OK bypassing of bitmap
[fio.git] / options.c
index ea1ffb13dd8bf95dd0f8c0bb1bbb0a8f257921c0..ae8598825e048a783da985bf9c6d89b8fb2530a2 100644 (file)
--- a/options.c
+++ b/options.c
@@ -748,12 +748,22 @@ static int str_random_distribution_cb(void *data, const char *str)
                return 1;
        }
 
-       if (td->o.random_distribution == FIO_RAND_DIST_ZIPF)
+       free(nr);
+
+       if (td->o.random_distribution == FIO_RAND_DIST_ZIPF) {
+               if (val == 1.00) {
+                       log_err("fio: zipf theta must different than 1.0\n");
+                       return 1;
+               }
                td->o.zipf_theta = val;
-       else
+       } else {
+               if (val <= 0.00 || val >= 1.00) {
+                       log_err("fio: pareto input out of range (0 < input < 1.0)\n");
+                       return 1;
+               }
                td->o.pareto_h = val;
+       }
 
-       free(nr);
        return 0;
 }