X-Git-Url: https://git.kernel.dk/?a=blobdiff_plain;f=tools%2Fgenfio;h=306d97e5b481288642947d61e39e72aa554b53ff;hb=76c7c63e131a5f0068932c78b57eef51bc691810;hp=efc87a29514c72a48c54ff75baa1092c6c919e38;hpb=72fe3ef10c1911b6f9ec84af99ba6f97112e216b;p=fio.git diff --git a/tools/genfio b/tools/genfio index efc87a29..306d97e5 100755 --- a/tools/genfio +++ b/tools/genfio @@ -29,12 +29,15 @@ RUNTIME=300 ETA=0 MODES="read,write,randread,randwrite" SHORT_HOSTNAME= +CACHED_IO="FALSE" show_help() { PROG=$(basename $0) echo "usage of $PROG:" cat << EOF -h : Show this help & exit +-c : Enable cached-based IOs + by default, fio is run in direct mode -a : Run sequential test then parallel one -s : Run sequential test (default value) one test after another then one disk after another @@ -78,7 +81,6 @@ cat >$TEMPLATE << EOF ioengine=libaio invalidate=1 ramp_time=5 -direct=1 EOF if [ "$RUNTIME" != "0" ]; then @@ -87,6 +89,12 @@ runtime=$RUNTIME EOF fi +if [ "$CACHED_IO" = "FALSE" ]; then +cat >>$TEMPLATE << EOF +direct=1 +EOF +fi + } gen_seq_suite() { @@ -161,7 +169,7 @@ esac } parse_cmdline() { -while getopts "hapsd:b:r:m:" opt; do +while getopts "hacpsd:b:r:m:" opt; do case $opt in h) show_help @@ -170,6 +178,9 @@ while getopts "hapsd:b:r:m:" opt; do b) BLOCK_SIZE=$OPTARG ;; + c) + CACHED_IO="TRUE" + ;; s) if [ "$SEQ" = "-1" ]; then SEQ=1