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 _begin_fstest deprecated # log logprint v2log
13 # Import common functions.
17 # Override the default cleanup function.
23 _scratch_unmount 2>/dev/null
26 # real QA test starts here
34 _scratch_unmount >/dev/null 2>&1
36 cat >$tmp.seq.params <<EOF
37 # mkfs-opt mount-opt start-blk
38 version=2 logbsize=32k 2
39 version=2,su=4096 logbsize=32k 8
40 version=2,su=32768 logbsize=32k 64
42 # expect following line to fail
44 version=2,su=36864 logbsize=32k 72
46 # following is not a power of 2 BBs
48 version=2,su=5120 logbsize=32k 10
51 # Do the work for various log params which
52 # should not effect the data content of the log
53 # Try with and without sync'ing - sync'ing will mean that
54 # the log will be written out unfilled and thus the log
55 # stripe can have an effect.
57 for s in sync nosync ; do
59 | while read mkfs mnt start restofline
61 if [ "$mkfs" = "#" ]; then
64 echo "--- mkfs=$mkfs, mnt=$mnt, sync=$s ---"
65 export MOUNT_OPTIONS="-o $mnt"
66 if ! _mkfs_log "-l $mkfs"; then
69 if [ $s = "sync" ]; then
81 if [ $s = "sync" ]; then
82 # if sync then we have chance of DATA FORK EXTENTS items
83 # not hanging around very long due to inode syncing to disk
84 # (see comment in xfs_iflush_int())
85 # and this is to hard to reconcile in the op output
89 _cmp_op_output $seqfull.op $filtered
92 _print_transaction_inode $start
93 _cmp_output $seqfull.trans_inode $filtered
95 _print_transaction_buf $start
96 _cmp_output $seqfull.trans_buf $filtered