FIO is very flexible io generator, I would call it IO swiss knife.
Currently we have tons of hardcoded application which reproduces
some predefined scenario. This approach has obvious disadvantages
1) Lack of flexibility: one written it is hard to modify it in future
2) Code base is large, many routines written again and again
At the same time add new fio based test, just add simple INI file.
This greatly simplifies code review. I do believe that some day we will
replace most of hardcoded io binaries with fio.
One who is planning to run $FIO_PROG should first check that system
contains appropriate version which is able to handle jobfile
for example: _require_fio 286-job.fio
Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Reviewed-by: Rich Johnston <rjohnston@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
export XFS_COPY_PROG="`set_prog_path xfs_copy`"
export FSTRIM_PROG="`set_prog_path fstrim`"
export DUMPE2FS_PROG="`set_prog_path dumpe2fs`"
+export FIO_PROG="`set_prog_path fio`"
# Generate a comparable xfsprogs version number in the form of
# major * 10000 + minor * 100 + release
[ $? -eq 0 ] || _notrun "$BTRFS_UTIL_PROG too old (must support $cmd)"
}
+# Check that fio is present, and it is able to execute given jobfile
+_require_fio()
+{
+ job=$1
+
+ _require_command $FIO_PROG
+ if [ -z "$1" ]; then
+ return 1;
+ fi
+
+ $FIO_PROG --warnings-fatal --showcmd $job >/dev/null 2>&1
+ [ $? -eq 0 ] || _notrun "$FIO_PROG too old"
+}
+
# Does freeze work on this fs?
_require_freeze()
{