3 #-----------------------------------------------------------------------
4 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
6 # This program is free software; you can redistribute it and/or
7 # modify it under the terms of the GNU General Public License as
8 # published by the Free Software Foundation.
10 # This program is distributed in the hope that it would be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write the Free Software Foundation,
17 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19 #-----------------------------------------------------------------------
23 # Test out the v2 stripe logs with logprint
26 owner=tes@melbourne.sgi.com
29 echo "QA output created by $seq"
33 status=1 # failure is the default!
35 # get standard environment, filters and checks
45 umount $SCRATCH_MNT 2>/dev/null
47 trap "_cleanup; exit \$status" 0 1 2 3 15
49 # real QA test starts here
51 _supported_os IRIX Linux
54 rm -f $seq.full $tmp.*
58 # link correct .out file
59 _link_out_file $seq.op
62 umount $SCRATCH_DEV >/dev/null 2>&1
64 cat >$tmp.seq.params <<EOF
65 # mkfs-opt mount-opt start-blk
66 version=2 logbsize=32k 2
67 version=2,su=4096 logbsize=32k 8
68 version=2,su=32768 logbsize=32k 64
70 # expect following line to fail
72 version=2,su=36864 logbsize=32k 72
74 # following is not a power of 2 BBs
76 version=2,su=5120 logbsize=32k 10
79 # Do the work for various log params which
80 # should not effect the data content of the log
81 # Try with and without sync'ing - sync'ing will mean that
82 # the log will be written out unfilled and thus the log
83 # stripe can have an effect.
85 for s in sync nosync ; do
87 | while read mkfs mnt start restofline
89 if [ "$mkfs" = "#" ]; then
92 if [ "$HOSTOS" = "IRIX" ]; then
93 # don't have umount rec at start on IRIX
94 # so we won't have to skip over it and get to
95 # another stripe boundary
98 echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
99 export MOUNT_OPTIONS="-o $mnt"
100 if ! _mkfs_log "-l $mkfs"; then
103 if [ $s = "sync" ]; then
108 if [ $? -ne 0 ]; then
115 if [ $s = "sync" ]; then
116 # if sync then we have chance of DATA FORK EXTENTS items
117 # not hanging around very long due to inode syncing to disk
118 # (see comment in xfs_iflush_int())
119 # and this is to hard to reconcile in the op output
123 _cmp_op_output $seq.op $filtered
126 _print_transaction_inode $start
127 _cmp_output $seq.trans_inode $filtered
129 _print_transaction_buf $start
130 _cmp_output $seq.trans_buf $filtered