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.
10 #-----------------------------------------------------------------------
13 owner=tes@melbourne.sgi.com
16 echo "QA output created by $seq"
20 status=1 # failure is the default!
21 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
23 # get standard environment, filters and checks
30 out=$SCRATCH_MNT/fsstress
32 param="-p 4 -z -f rmdir=10 -f link=10 -f creat=10 -f mkdir=10 \
33 -f rename=30 -f stat=30 -f unlink=30 -f truncate=20"
34 _echofull "calling fsstress $param -m8 -n $count"
35 if ! $FSSTRESS_PROG $param $FSSTRESS_AVOID -m 8 -n $count -d $out >>$seq.full 2>&1
37 _echofull "fsstress failed"
41 # real QA test starts here
43 _supported_os IRIX Linux
45 rm -f $seq.full $tmp.*
50 umount $SCRATCH_DEV >/dev/null 2>&1
52 cat >$tmp.seq.params <<EOF
54 # ------------------------------
55 version=2 logbsize=32k
56 version=2,su=4096 logbsize=32k
57 version=2,su=32768 logbsize=32k
58 version=2 logbsize=64k
59 version=2,su=64k logbsize=64k
60 version=2 logbsize=128k
61 version=2,su=128k logbsize=128k
62 version=2 logbsize=256k
63 version=2,su=256k logbsize=256k
67 | while read mkfs mnt restofline
69 if [ "$mkfs" = "#" ]; then
73 echo "--- mkfs=$mkfs, mnt=$mnt ---"
74 export MKFS_OPTIONS="-l $mkfs"
75 export MOUNT_OPTIONS="-o $mnt"
79 _scratch_mkfs_xfs >>$seq.full 2>&1
80 if [ $? -ne 0 ] ; then
81 _echofull "mkfs failed: $MKFS_OPTIONS"
87 if ! _scratch_mount >>$seq.full 2>&1; then
88 _echofull "mount failed: $MOUNT_OPTIONS"
95 # check before on what FS should look like
96 _echofull "ls -RF SCRATCH_MNT"
97 ls -RF $SCRATCH_MNT >$tmp.ls1
100 src/godown -v -f $SCRATCH_MNT >> $seq.full
103 umount $SCRATCH_DEV >>$seq.full 2>&1 \
104 || _fail "umount failed"
106 _echofull "logprint after going down..."
109 _full "logprint headers"
110 _scratch_xfs_logprint -n >>$seq.full 2>&1
112 _echofull "mount with replay"
113 _scratch_mount >>$seq.full 2>&1 \
114 || _fail "mount failed: $MOUNT_OPTIONS"
116 # check on what FS looks like after log recovery
117 _echofull "ls -RF SCRATCH_MNT"
118 ls -RF $SCRATCH_MNT >$tmp.ls2
120 _echofull "diff ls before and after"
121 diff -us $tmp.ls1 $tmp.ls2 | sed "s#$tmp#TMP#g"
126 _echofull "logprint after mount and replay..."
129 if _check_scratch_fs; then
130 _echofull "filesystem is checked ok"
132 _echofull "filesystem is NOT ok"