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
43 _require_no_large_scratch_dev
54 _scratch_unmount >/dev/null 2>&1
55 echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seqres.full
56 echo "" >>$seqres.full
59 _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seqres.full 2>&1 \
60 || _fail "size=$fsz,agcount=$ags mkfs failed"
62 _scratch_mkfs_sized $fsz >>$seqres.full 2>&1 \
63 || _fail "size=$fsz mkfs failed"
67 # -w ensures that the only ops are ones which cause write I/O
68 FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID`
69 $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
72 echo "*** test out-of-space handling for random write operations"
74 filesize=`expr 256 \* 1024 \* 1024`
79 workout $filesize $agcount $numprocs $numops