Addedd -z option to specify file size for filepaths fio files
authorLuca Maranzano <lmaranzano@zenatek.eu>
Wed, 18 Mar 2015 17:00:39 +0000 (18:00 +0100)
committerLuca Maranzano <lmaranzano@zenatek.eu>
Wed, 18 Mar 2015 17:00:39 +0000 (18:00 +0100)
tools/genfio

index 4d32d13084707103e5bd32beac10eb1156378e3e..68004520a164cd0db7f22c70ca412550888a4f0a 100755 (executable)
@@ -54,6 +54,8 @@ show_help() {
                                        Default is $IODEPTH
 -d disk1[,disk2,disk3,..]      : Run the tests on the selected disks
                                        Separated each disk with a comma
+-z filesize                     : Specify the working file size, if you are passing filepaths to -d
+                                        Disabled by default
 -r seconds                     : Time in seconds per benchmark
                                        0 means till the end of the device
                                        Default is $RUNTIME seconds
@@ -203,7 +205,7 @@ esac
 }
 
 parse_cmdline() {
-while getopts "hacpsd:b:r:m:x:D:A:B:" opt; do
+while getopts "hacpsd:b:r:m:x:z:D:A:B:" opt; do
   case $opt in
     h)
        show_help
@@ -260,6 +262,10 @@ while getopts "hacpsd:b:r:m:x:D:A:B:" opt; do
     A)
        echo "exec_postrun=$OPTARG" >> $TEMPLATE
       ;;
+    z)
+       FSIZE=$OPTARG
+       echo "size=$FSIZE" >> $TEMPLATE
+      ;;
     \?)
       echo "Invalid option: -$OPTARG" >&2
       ;;