2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
7 # Run fsstress and ENOSPC hitters in parallel, check fs consistency at the end
10 _begin_fstest auto rw prealloc ioctl enospc stress
12 # Import common functions.
14 # Disable all sync operations to get higher load
15 FSSTRESS_AVOID="$FSSTRESS_AVOID -ffsync=0 -fsync=0 -ffdatasync=0"
23 out=$SCRATCH_MNT/fsstress.$$
24 args=`_scale_fsstress_args -p128 -n999999999 -f setattr=1 $FSSTRESS_AVOID -d $out`
25 echo "fsstress $args" >> $seqres.full
26 $FSSTRESS_PROG $args &>> $seqres.full &
28 echo "Run dd writers in parallel"
29 for ((i=0; i < num_iterations; i++))
31 # File will be opened with O_TRUNC each time
32 dd if=/dev/zero of=$SCRATCH_MNT/SPACE_CONSUMER bs=1M \
36 echo "Killing fsstress process..." >> $seqres.full
37 kill $pid >> $seqres.full 2>&1
41 # real QA test starts here
45 _scratch_mkfs_sized $((512 * 1024 * 1024)) >> $seqres.full 2>&1
49 _scratch_unmount 2>/dev/null
53 if ! _scratch_unmount; then
54 echo "failed to umount"