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
44 out=$SCRATCH_MNT/fsstress
46 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
47 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
48 _echofull "calling fsstress $param -m8 -n $count"
49 if ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$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.*
64 umount $SCRATCH_DEV >/dev/null 2>&1
66 cat >$tmp.seq.params <<EOF
68 # ------------------------------
69 version=2 logbsize=32k
70 version=2,su=4096 logbsize=32k
71 version=2,su=32768 logbsize=32k
72 version=2 logbsize=64k
73 version=2,su=64k logbsize=64k
74 version=2 logbsize=128k
75 version=2,su=128k logbsize=128k
76 version=2 logbsize=256k
77 version=2,su=256k logbsize=256k
81 | while read mkfs mnt restofline
83 if [ "$mkfs" = "#" ]; then
87 echo "--- mkfs=$mkfs, mnt=$mnt ---"
88 export MKFS_OPTIONS="-l $mkfs"
89 export MOUNT_OPTIONS="-o $mnt"
93 _scratch_mkfs_xfs >>$seq.full 2>&1
94 if [ $? -ne 0 ] ; then
95 _echofull "mkfs failed: $MKFS_OPTIONS"
101 if ! _scratch_mount >>$seq.full 2>&1; then
102 _echofull "mount failed: $MOUNT_OPTIONS"
106 # create the metadata
109 # check before on what FS should look like
110 _echofull "ls -RF SCRATCH_MNT"
111 ls -RF $SCRATCH_MNT >$tmp.ls1
114 src/godown -v -f $SCRATCH_MNT >> $seq.full
117 umount $SCRATCH_DEV >>$seq.full 2>&1 \
118 || _fail "umount failed"
120 _echofull "logprint after going down..."
123 _full "logprint headers"
124 _scratch_xfs_logprint -n >>$seq.full 2>&1
126 _echofull "mount with replay"
127 _scratch_mount >>$seq.full 2>&1 \
128 || _fail "mount failed: $MOUNT_OPTIONS"
130 # check on what FS looks like after log recovery
131 _echofull "ls -RF SCRATCH_MNT"
132 ls -RF $SCRATCH_MNT >$tmp.ls2
134 _echofull "diff ls before and after"
135 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
140 _echofull "logprint after mount and replay..."
143 if _check_scratch_fs; then
144 _echofull "filesystem is checked ok"
146 _echofull "filesystem is NOT ok"