# Several threads perform defragmentation at random position
# using 'inplace' mode (allocate and free blocks inside defrag event)
# which significantly improve load pressure on block allocator.
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
+. ./common/preamble
+_begin_fstest aio auto ioctl rw stress defrag
-here=`pwd`
-tmp=/tmp/$$
fio_config=$tmp.fio
-status=1 # failure is the default!
-trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
-# get standard environment, filters and checks
-. ./common/rc
+# Import common functions.
. ./common/filter
. ./common/defrag
_require_fio $fio_config
-rm -f $seqres.full
_scratch_mkfs >> $seqres.full 2>&1
_scratch_mount