2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
7 # Exercise filesystem full behaviour - run numerous fsstress
8 # processes in write mode on a small filesystem. NB: delayed
9 # allocate flushing is quite deadlock prone at the filesystem
10 # full boundary due to the fact that we will retry allocation
11 # several times after flushing, before giving back ENOSPC.
13 # Note that this test will intentionally cause console msgs of form:
14 # dksc0d1s4: Process [fsstress] ran out of disk space
15 # dksc0d1s4: Process [fsstress] ran out of disk space
16 # dksc0d1s4: Process [fsstress] ran out of disk space
19 seqres=$RESULT_DIR/$seq
20 echo "QA output created by $seq"
29 _scratch_unmount 2>/dev/null
32 trap "_cleanup; exit \$status" 0 1 2 3 15
34 # get standard environment, filters and checks
38 # real QA test starts here
42 _require_no_large_scratch_dev
53 _scratch_unmount >/dev/null 2>&1
54 echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seqres.full
55 echo "" >>$seqres.full
58 _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seqres.full 2>&1 \
59 || _fail "size=$fsz,agcount=$ags mkfs failed"
61 _scratch_mkfs_sized $fsz >>$seqres.full 2>&1 \
62 || _fail "size=$fsz mkfs failed"
66 # -w ensures that the only ops are ones which cause write I/O
67 FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID`
68 $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
71 echo "*** test out-of-space handling for random write operations"
73 filesize=`expr 256 \* 1024 \* 1024`
78 workout $filesize $agcount $numprocs $numops