2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2000-2003 Silicon Graphics, Inc. All Rights Reserved.
7 # Test out the v2 stripe logs with logprint
11 seqres=$RESULT_DIR/$seq
12 echo "QA output created by $seq"
16 status=1 # failure is the default!
18 # get standard environment, filters and checks
28 _scratch_unmount 2>/dev/null
30 trap "_cleanup; exit \$status" 0 1 2 3 15
32 # real QA test starts here
36 rm -f $seqres.full $tmp.*
41 _scratch_unmount >/dev/null 2>&1
43 cat >$tmp.seq.params <<EOF
44 # mkfs-opt mount-opt start-blk
45 version=2 logbsize=32k 2
46 version=2,su=4096 logbsize=32k 8
47 version=2,su=32768 logbsize=32k 64
49 # expect following line to fail
51 version=2,su=36864 logbsize=32k 72
53 # following is not a power of 2 BBs
55 version=2,su=5120 logbsize=32k 10
58 # Do the work for various log params which
59 # should not effect the data content of the log
60 # Try with and without sync'ing - sync'ing will mean that
61 # the log will be written out unfilled and thus the log
62 # stripe can have an effect.
64 for s in sync nosync ; do
66 | while read mkfs mnt start restofline
68 if [ "$mkfs" = "#" ]; then
71 echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
72 export MOUNT_OPTIONS="-o $mnt"
73 if ! _mkfs_log "-l $mkfs"; then
76 if [ $s = "sync" ]; then
88 if [ $s = "sync" ]; then
89 # if sync then we have chance of DATA FORK EXTENTS items
90 # not hanging around very long due to inode syncing to disk
91 # (see comment in xfs_iflush_int())
92 # and this is to hard to reconcile in the op output
96 _cmp_op_output $seqfull.op $filtered
99 _print_transaction_inode $start
100 _cmp_output $seqfull.trans_inode $filtered
102 _print_transaction_buf $start
103 _cmp_output $seqfull.trans_buf $filtered