genfio: Adding iodepth support
It's useful to be able to specify the iodepth while running fio with
libaio.
By default, we keep iodepth=1 to keep the same as fio's default.
diff --git a/tools/genfio b/tools/genfio
index 123f6e4..4c1e710 100755
--- a/tools/genfio
+++ b/tools/genfio
@@ -32,6 +32,7 @@
CACHED_IO="FALSE"
PREFIX=""
PREFIX_FILENAME=""
+IODEPTH=1
show_help() {
PROG=$(basename $0)
@@ -48,6 +49,8 @@
-p : Run parallel test
one test after anoter but all disks at the same time
Enabled by default
+-D iodepth : Run with the specified iodepth
+ Default is 32
-d disk1[,disk2,disk3,..] : Run the tests on the selected disks
Separated each disk with a comma
Disk name shall be "sdxx", /dev/ shall NOT be used here
@@ -90,6 +93,7 @@
cat >$TEMPLATE << EOF
[global]
ioengine=libaio
+iodepth=$IODEPTH
invalidate=1
ramp_time=5
EOF
@@ -180,7 +184,7 @@
}
parse_cmdline() {
-while getopts "hacpsd:b:r:m:x:" opt; do
+while getopts "hacpsd:b:r:m:x:D:" opt; do
case $opt in
h)
show_help
@@ -224,6 +228,9 @@
d)
DISKS=$OPTARG
;;
+ D)
+ IODEPTH=$OPTARG
+ ;;
a)
SEQ=2
;;