#! /bin/bash # SPDX-License-Identifier: GPL-2.0 # Copyright (c) 2015 Red Hat Inc. All Rights Reserved. # # FS QA Test generic/095 # # Concurrent mixed I/O (buffer I/O, aiodio, mmap, splice) on the same files # seq=`basename $0` seqres=$RESULT_DIR/$seq echo "QA output created by $seq" here=`pwd` tmp=/tmp/$$ status=1 # failure is the default! trap "_cleanup; exit \$status" 0 1 2 3 15 _cleanup() { cd / rm -f $tmp.* } # get standard environment, filters and checks . ./common/rc . ./common/filter # real QA test starts here _supported_fs generic _require_scratch _require_odirect _require_aio iodepth=$((16 * LOAD_FACTOR)) iodepth_batch=$((8 * LOAD_FACTOR)) numjobs=$((5 * LOAD_FACTOR)) fio_config=$tmp.fio fio_out=$tmp.fio.out cat >$fio_config <> $fio_config rm -f $seqres.full _require_fio $fio_config _scratch_mkfs >>$seqres.full 2>&1 _scratch_mount # There's a known EIO failure to report collisions between directio and buffered # writes to userspace, refer to upstream linux 5a9d929d6e13. So ignore EIO error # at here. $FIO_PROG $fio_config --ignore_error=,EIO --output=$fio_out cat $fio_out >> $seqres.full echo "Silence is golden" # xfs generates WARNINGs on purpose when applications mix buffered/mmap IO with # direct IO on the same file. On the other hand, this fio job has been proven # to be potent, we don't want to simply _disable_dmesg_check which could miss # other potential bugs. So filter out the intentional WARNINGs, make sure test # doesn't fail because of this warning and fails on other WARNINGs. # umount before checking dmesg in case umount triggers any WARNING or Oops _scratch_unmount _check_dmesg _filter_aiodio_dmesg status=$? exit