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 #-----------------------------------------------------------------------
35 seqres=$RESULT_DIR/$seq
36 echo "QA output created by $seq"
45 _scratch_unmount 2>/dev/null
48 trap "_cleanup; exit \$status" 0 1 2 3 15
50 # get standard environment, filters and checks
54 # real QA test starts here
56 _supported_os IRIX Linux
59 _require_no_large_scratch_dev
70 _scratch_unmount >/dev/null 2>&1
71 echo "*** mkfs -dsize=$fsz,agcount=$ags" >>$seqres.full
72 echo "" >>$seqres.full
75 _scratch_mkfs_xfs -dsize=$fsz,agcount=$ags >>$seqres.full 2>&1 \
76 || _fail "size=$fsz,agcount=$ags mkfs failed"
78 _scratch_mkfs_sized $fsz >>$seqres.full 2>&1 \
79 || _fail "size=$fsz mkfs failed"
81 _scratch_mount >>$seqres.full 2>&1 \
82 || _fail "mount failed"
84 # -w ensures that the only ops are ones which cause write I/O
85 FSSTRESS_ARGS=`_scale_fsstress_args -d $SCRATCH_MNT -w -p $procs -n $nops $FSSTRESS_AVOID`
86 $FSSTRESS_PROG $FSSTRESS_ARGS >>$seqres.full
89 echo "*** test out-of-space handling for random write operations"
91 filesize=`expr 100 \* 1024 \* 1024`
96 workout $filesize $agcount $numprocs $numops