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 echo "QA output created by $seq"
32 status=1 # failure is the default!
34 # get standard environment, filters and checks
44 umount $SCRATCH_MNT 2>/dev/null
46 trap "_cleanup; exit \$status" 0 1 2 3 15
48 # real QA test starts here
50 _supported_os IRIX Linux
53 rm -f $seqres.full $tmp.*
57 # link correct .out file
58 _link_out_file $seq.op $seqfull.op
61 umount $SCRATCH_DEV >/dev/null 2>&1
63 cat >$tmp.seq.params <<EOF
64 # mkfs-opt mount-opt start-blk
65 version=2 logbsize=32k 2
66 version=2,su=4096 logbsize=32k 8
67 version=2,su=32768 logbsize=32k 64
69 # expect following line to fail
71 version=2,su=36864 logbsize=32k 72
73 # following is not a power of 2 BBs
75 version=2,su=5120 logbsize=32k 10
78 # Do the work for various log params which
79 # should not effect the data content of the log
80 # Try with and without sync'ing - sync'ing will mean that
81 # the log will be written out unfilled and thus the log
82 # stripe can have an effect.
84 for s in sync nosync ; do
86 | while read mkfs mnt start restofline
88 if [ "$mkfs" = "#" ]; then
91 if [ "$HOSTOS" = "IRIX" ]; then
92 # don't have umount rec at start on IRIX
93 # so we won't have to skip over it and get to
94 # another stripe boundary
97 echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
98 export MOUNT_OPTIONS="-o $mnt"
99 if ! _mkfs_log "-l $mkfs"; then
102 if [ $s = "sync" ]; then
107 if [ $? -ne 0 ]; then
114 if [ $s = "sync" ]; then
115 # if sync then we have chance of DATA FORK EXTENTS items
116 # not hanging around very long due to inode syncing to disk
117 # (see comment in xfs_iflush_int())
118 # and this is to hard to reconcile in the op output
122 _cmp_op_output $seqfull.op $filtered
125 _print_transaction_inode $start
126 _cmp_output $seqfull.trans_inode $filtered
128 _print_transaction_buf $start
129 _cmp_output $seqfull.trans_buf $filtered