4 # Exercise filesystem full behaviour - run numerous fsstress
5 # processes in write mode on a small filesystem. NB: delayed
6 # allocate flushing is quite deadlock prone at the filesystem
7 # full boundary due to the fact that we will retry allocation
8 # several times after flushing, before giving back ENOSPC.
10 # Note that this test will intentionally cause console msgs of form:
11 # dksc0d1s4: Process [fsstress] ran out of disk space
12 # dksc0d1s4: Process [fsstress] ran out of disk space
13 # dksc0d1s4: Process [fsstress] ran out of disk space
15 #-----------------------------------------------------------------------
16 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
18 # This program is free software; you can redistribute it and/or
19 # modify it under the terms of the GNU General Public License as
20 # published by the Free Software Foundation.
22 # This program is distributed in the hope that it would be useful,
23 # but WITHOUT ANY WARRANTY; without even the implied warranty of
24 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 # GNU General Public License for more details.
27 # You should have received a copy of the GNU General Public License
28 # along with this program; if not, write the Free Software Foundation,
29 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
31 #-----------------------------------------------------------------------
38 echo "QA output created by $seq"
47 umount $SCRATCH_MNT 2>/dev/null
50 trap "_cleanup; exit \$status" 0 1 2 3 15
52 # get standard environment, filters and checks
56 # real QA test starts here
58 _supported_os IRIX Linux
72 umount $SCRATCH_DEV >/dev/null 2>&1
73 echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
77 _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seq.full 2>&1 \
78 || _fail "size=$fsz,agcount=$ags mkfs failed"
80 _scratch_mkfs_sized $fsz >>$seq.full 2>&1 \
81 || _fail "size=$fsz mkfs failed"
83 _scratch_mount >>$seq.full 2>&1 \
84 || _fail "mount failed"
86 # -w ensures that the only ops are ones which cause write I/O
87 $FSSTRESS_PROG -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
92 echo "*** test out-of-space handling for random write operations"
94 filesize=`expr 100 \* 1024 \* 1024`
99 workout $filesize $agcount $numprocs $numops