2 # FS QA Test generic/095
4 # Concurrent mixed I/O (buffer I/O, aiodio, mmap, splice) on the same files
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
21 #-----------------------------------------------------------------------
25 seqres=$RESULT_DIR/$seq
26 echo "QA output created by $seq"
30 status=1 # failure is the default!
31 trap "_cleanup; exit \$status" 0 1 2 3 15
39 # get standard environment, filters and checks
43 # real QA test starts here
49 iodepth=$((16 * LOAD_FACTOR))
50 iodepth_batch=$((8 * LOAD_FACTOR))
51 numjobs=$((5 * LOAD_FACTOR))
53 cat >$fio_config <<EOF
57 iodepth_batch=$iodepth_batch
60 directory=$SCRATCH_MNT
108 # with ioengine=mmap and direct=1, fio requires bs to be at least pagesize,
109 # which is a fio built-in var.
110 echo 'bs=$pagesize' >> $fio_config
113 _require_fio $fio_config
114 _scratch_mkfs >>$seqres.full 2>&1
117 echo "Silence is golden"
118 $FIO_PROG $fio_config >>$seqres.full 2>&1
120 # xfs generates WARNINGs on purpose when applications mix buffered/mmap IO with
121 # direct IO on the same file. On the other hand, this fio job has been proven
122 # to be potent, we don't want to simply _disable_dmesg_check which could miss
123 # other potential bugs. So filter out the intentional WARNINGs, make sure test
124 # doesn't fail because of this warning and fails on other WARNINGs.
126 # umount before checking dmesg in case umount triggers any WARNING or Oops
129 if [ "$FSTYP" == "xfs" ]; then
130 _check_dmesg _filter_xfs_dmesg