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 #-----------------------------------------------------------------------
27 owner=tes@melbourne.sgi.com
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
35 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
37 # get standard environment, filters and checks
45 out=$SCRATCH_MNT/fsstress
47 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
48 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
49 _echofull "calling fsstress $param -m8 -n $count"
50 if ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
52 _echofull "fsstress failed"
56 # real QA test starts here
58 _supported_os IRIX Linux
60 rm -f $seq.full $tmp.*
66 umount $SCRATCH_DEV >/dev/null 2>&1
68 cat >$tmp.seq.params <<EOF
70 # ------------------------------
71 version=2 logbsize=32k
72 version=2,su=4096 logbsize=32k
73 version=2,su=32768 logbsize=32k
74 version=2 logbsize=64k
75 version=2,su=64k logbsize=64k
76 version=2 logbsize=128k
77 version=2,su=128k logbsize=128k
78 version=2 logbsize=256k
79 version=2,su=256k logbsize=256k
83 | while read mkfs mnt restofline
85 if [ "$mkfs" = "#" ]; then
89 echo "--- mkfs=$mkfs, mnt=$mnt ---"
90 export MKFS_OPTIONS="-l $mkfs"
91 export MOUNT_OPTIONS="-o $mnt"
95 _scratch_mkfs_xfs >>$seq.full 2>&1
96 if [ $? -ne 0 ] ; then
97 _echofull "mkfs failed: $MKFS_OPTIONS"
103 if ! _scratch_mount -o uquota >>$seq.full 2>&1; then
104 _echofull "mount failed: $MOUNT_OPTIONS"
108 # create the metadata
111 # check before on what FS should look like
112 _echofull "ls -RF SCRATCH_MNT"
113 ls -RF $SCRATCH_MNT >$tmp.ls1
116 src/godown -v -f $SCRATCH_MNT >> $seq.full
119 umount $SCRATCH_DEV >>$seq.full 2>&1 \
120 || _fail "umount failed"
122 _echofull "logprint after going down..."
125 _full "logprint headers"
126 _scratch_xfs_logprint -n >>$seq.full 2>&1
128 _echofull "mount with replay"
129 _scratch_mount -o uquota >>$seq.full 2>&1 \
130 || _fail "mount failed: $MOUNT_OPTIONS"
132 # check on what FS looks like after log recovery
133 _echofull "ls -RF SCRATCH_MNT"
134 ls -RF $SCRATCH_MNT >$tmp.ls2
136 _echofull "diff ls before and after"
137 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
142 _echofull "logprint after mount and replay..."
145 if _check_scratch_fs; then
146 _echofull "filesystem is checked ok"
148 _echofull "filesystem is NOT ok"