2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved.
5 # FS QA Test generic/095
7 # Concurrent mixed I/O (buffer I/O, aiodio, mmap, splice) on the same files
10 seqres=$RESULT_DIR/$seq
11 echo "QA output created by $seq"
15 status=1 # failure is the default!
16 trap "_cleanup; exit \$status" 0 1 2 3 15
24 # get standard environment, filters and checks
28 # real QA test starts here
34 iodepth=$((16 * LOAD_FACTOR))
35 iodepth_batch=$((8 * LOAD_FACTOR))
36 numjobs=$((5 * LOAD_FACTOR))
39 cat >$fio_config <<EOF
43 iodepth_batch=$iodepth_batch
46 directory=$SCRATCH_MNT
94 # with ioengine=mmap and direct=1, fio requires bs to be at least pagesize,
95 # which is a fio built-in var.
96 echo 'bs=$pagesize' >> $fio_config
99 _require_fio $fio_config
100 _scratch_mkfs >>$seqres.full 2>&1
103 # There's a known EIO failure to report collisions between directio and buffered
104 # writes to userspace, refer to upstream linux 5a9d929d6e13. So ignore EIO error
106 $FIO_PROG $fio_config --ignore_error=,EIO --output=$fio_out
107 cat $fio_out >> $seqres.full
108 echo "Silence is golden"
110 # xfs generates WARNINGs on purpose when applications mix buffered/mmap IO with
111 # direct IO on the same file. On the other hand, this fio job has been proven
112 # to be potent, we don't want to simply _disable_dmesg_check which could miss
113 # other potential bugs. So filter out the intentional WARNINGs, make sure test
114 # doesn't fail because of this warning and fails on other WARNINGs.
116 # umount before checking dmesg in case umount triggers any WARNING or Oops
119 _check_dmesg _filter_aiodio_dmesg