Add support for limiting only rate in only one direction

So now you can say 'limit writes to 10MB/sec' and have reads go
full throttle, for instance.

Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/options.c b/options.c
index 9dcef0c..b2dd4de 100644
--- a/options.c
+++ b/options.c
@@ -1259,27 +1259,31 @@
 	},
 	{
 		.name	= "rate",
-		.type	= FIO_OPT_INT,
-		.off1	= td_var_offset(rate),
+		.type	= FIO_OPT_STR_VAL_INT,
+		.off1	= td_var_offset(rate[0]),
+		.off2	= td_var_offset(rate[1]),
 		.help	= "Set bandwidth rate",
 	},
 	{
 		.name	= "ratemin",
-		.type	= FIO_OPT_INT,
-		.off1	= td_var_offset(ratemin),
+		.type	= FIO_OPT_STR_VAL_INT,
+		.off1	= td_var_offset(ratemin[0]),
+		.off2	= td_var_offset(ratemin[1]),
 		.help	= "Job must meet this rate or it will be shutdown",
 		.parent	= "rate",
 	},
 	{
 		.name	= "rate_iops",
-		.type	= FIO_OPT_INT,
-		.off1	= td_var_offset(rate_iops),
+		.type	= FIO_OPT_STR_VAL_INT,
+		.off1	= td_var_offset(rate_iops[0]),
+		.off2	= td_var_offset(rate_iops[1]),
 		.help	= "Limit IO used to this number of IO operations/sec",
 	},
 	{
 		.name	= "rate_iops_min",
-		.type	= FIO_OPT_INT,
-		.off1	= td_var_offset(rate_iops_min),
+		.type	= FIO_OPT_STR_VAL_INT,
+		.off1	= td_var_offset(rate_iops_min[0]),
+		.off2	= td_var_offset(rate_iops_min[1]),
 		.help	= "Job must meet this rate or it will be shutdown",
 		.parent	= "rate_iops",
 	},