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