4 # Test out the v2 stripe logs with logprint
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
27 seqres=$RESULT_DIR/$seq
28 seqres=$RESULT_DIR/$seq
29 seqres=$RESULT_DIR/$seq
30 echo "QA output created by $seq"
34 status=1 # failure is the default!
36 # get standard environment, filters and checks
46 umount $SCRATCH_MNT 2>/dev/null
48 trap "_cleanup; exit \$status" 0 1 2 3 15
50 # real QA test starts here
52 _supported_os IRIX Linux
55 rm -f $seqres.full $tmp.*
59 # link correct .out file
60 _link_out_file $seq.op $seqfull.op
63 umount $SCRATCH_DEV >/dev/null 2>&1
65 cat >$tmp.seq.params <<EOF
66 # mkfs-opt mount-opt start-blk
67 version=2 logbsize=32k 2
68 version=2,su=4096 logbsize=32k 8
69 version=2,su=32768 logbsize=32k 64
71 # expect following line to fail
73 version=2,su=36864 logbsize=32k 72
75 # following is not a power of 2 BBs
77 version=2,su=5120 logbsize=32k 10
80 # Do the work for various log params which
81 # should not effect the data content of the log
82 # Try with and without sync'ing - sync'ing will mean that
83 # the log will be written out unfilled and thus the log
84 # stripe can have an effect.
86 for s in sync nosync ; do
88 | while read mkfs mnt start restofline
90 if [ "$mkfs" = "#" ]; then
93 if [ "$HOSTOS" = "IRIX" ]; then
94 # don't have umount rec at start on IRIX
95 # so we won't have to skip over it and get to
96 # another stripe boundary
99 echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
100 export MOUNT_OPTIONS="-o $mnt"
101 if ! _mkfs_log "-l $mkfs"; then
104 if [ $s = "sync" ]; then
109 if [ $? -ne 0 ]; then
116 if [ $s = "sync" ]; then
117 # if sync then we have chance of DATA FORK EXTENTS items
118 # not hanging around very long due to inode syncing to disk
119 # (see comment in xfs_iflush_int())
120 # and this is to hard to reconcile in the op output
124 _cmp_op_output $seqfull.op $filtered
127 _print_transaction_inode $start
128 _cmp_output $seqfull.trans_inode $filtered
130 _print_transaction_buf $start
131 _cmp_output $seqfull.trans_buf $filtered