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
16 #-----------------------------------------------------------------------
17 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
19 # This program is free software; you can redistribute it and/or modify it
20 # under the terms of version 2 of the GNU General Public License as
21 # published by the Free Software Foundation.
23 # This program is distributed in the hope that it would be useful, but
24 # WITHOUT ANY WARRANTY; without even the implied warranty of
25 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
27 # Further, this software is distributed without any warranty that it is
28 # free of the rightful claim of any third person regarding infringement
29 # or the like. Any license provided herein, whether implied or
30 # otherwise, applies only to this software file. Patent licenses, if
31 # any, provided herein do not apply to combinations of this program with
32 # other software, or any other product whatsoever.
34 # You should have received a copy of the GNU General Public License along
35 # with this program; if not, write the Free Software Foundation, Inc., 59
36 # Temple Place - Suite 330, Boston MA 02111-1307, USA.
38 # Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
39 # Mountain View, CA 94043, or:
43 # For further information regarding this notice, see:
45 # http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
46 #-----------------------------------------------------------------------
52 echo "QA output created by $seq"
61 umount $SCRATCH_MNT 2>/dev/null
64 trap "_cleanup; exit \$status" 0 1 2 3 15
66 # get standard environment, filters and checks
70 # real QA test starts here
72 _supported_os IRIX Linux
86 umount $SCRATCH_DEV >/dev/null 2>&1
87 echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seq.full
89 _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seq.full 2>&1 \
90 || _fail "size=$fsz,agcount=$ags mkfs failed"
91 _scratch_mount >>$seq.full 2>&1 \
92 || _fail "mount failed"
94 # -w ensures that the only ops are ones which cause write I/O
95 ltp/fsstress -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID \
100 echo "*** test out-of-space handling for random write operations"
107 workout $filesize $agcount $numprocs $numops