4 # * like 086 but want to create more/different kinds of metadata
5 # and so will use fsstress
6 # * also can interrupt metadata with godown
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2000-2004 Silicon Graphics, Inc. All Rights Reserved.
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License as
13 # published by the Free Software Foundation.
15 # This program is distributed in the hope that it would be useful,
16 # but WITHOUT ANY WARRANTY; without even the implied warranty of
17 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 # GNU General Public License for more details.
20 # You should have received a copy of the GNU General Public License
21 # along with this program; if not, write the Free Software Foundation,
22 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24 #-----------------------------------------------------------------------
28 echo "QA output created by $seq"
32 status=1 # failure is the default!
33 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
35 # get standard environment, filters and checks
43 out=$SCRATCH_MNT/fsstress
45 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
46 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
47 _echofull "calling fsstress $param -m8 -n $count"
48 FSSTRESS_ARGS=`_scale_fsstress_args $param $FSSTRESS_AVOID -m 8 -n $count -d $out`
49 if ! $FSSTRESS_PROG $FSSTRESS_ARGS >>$seq.full 2>&1
51 _echofull "fsstress failed"
55 # real QA test starts here
57 _supported_os IRIX Linux
59 rm -f $seq.full $tmp.*
65 umount $SCRATCH_DEV >/dev/null 2>&1
67 cat >$tmp.seq.params <<EOF
69 # ------------------------------
70 version=2 logbsize=32k
71 version=2,su=4096 logbsize=32k
72 version=2,su=32768 logbsize=32k
73 version=2 logbsize=64k
74 version=2,su=64k logbsize=64k
75 version=2 logbsize=128k
76 version=2,su=128k logbsize=128k
77 version=2 logbsize=256k
78 version=2,su=256k logbsize=256k
82 | while read mkfs mnt restofline
84 if [ "$mkfs" = "#" ]; then
88 echo "--- mkfs=$mkfs, mnt=$mnt ---"
89 export MKFS_OPTIONS="-l $mkfs"
90 export MOUNT_OPTIONS="-o $mnt"
94 _scratch_mkfs_xfs >>$seq.full 2>&1
95 if [ $? -ne 0 ] ; then
96 _echofull "mkfs failed: $MKFS_OPTIONS"
102 if ! _scratch_mount -o uquota >>$seq.full 2>&1; then
103 _echofull "mount failed: $MOUNT_OPTIONS"
107 # create the metadata
110 # check before on what FS should look like
111 _echofull "ls -RF SCRATCH_MNT"
112 ls -RF $SCRATCH_MNT >$tmp.ls1
115 src/godown -v -f $SCRATCH_MNT >> $seq.full
118 umount $SCRATCH_DEV >>$seq.full 2>&1 \
119 || _fail "umount failed"
121 _echofull "logprint after going down..."
124 _full "logprint headers"
125 _scratch_xfs_logprint -n >>$seq.full 2>&1
127 _echofull "mount with replay"
128 _scratch_mount -o uquota >>$seq.full 2>&1 \
129 || _fail "mount failed: $MOUNT_OPTIONS"
131 # check on what FS looks like after log recovery
132 _echofull "ls -RF SCRATCH_MNT"
133 ls -RF $SCRATCH_MNT >$tmp.ls2
135 _echofull "diff ls before and after"
136 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
141 _echofull "logprint after mount and replay..."
144 if _check_scratch_fs; then
145 _echofull "filesystem is checked ok"
147 _echofull "filesystem is NOT ok"