2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2013 Red Hat, Inc. All Rights Reserved.
7 # Test xfs_logprint w/ multiply-logged inodes & continued transactions
10 _begin_fstest auto logprint quick
12 # Import common functions.
16 # real QA test starts here
18 # Modify as appropriate.
23 logblks=$(_scratch_find_xfs_min_logblocks)
24 _scratch_mkfs -l size=${logblks}b >/dev/null 2>&1
26 # Should yield a multiply-logged inode, thanks to xattr
27 # Old logprint says this, then coredumps:
28 # xlog_print_trans_inode: illegal inode type
30 echo hello > $SCRATCH_MNT/hello; setfattr -n user.name -v value $SCRATCH_MNT/hello
32 _scratch_xfs_logprint 2>&1 >> $seqres.full
34 # Now go for a continued transaction
35 # The trick here is to get a transaction which is exactly the size of a
36 # xfs_inode_log_format_32_t or xfs_inode_log_format_64_t
37 # Prior to the bugfix, this was parsed like an inode due to the size
38 # match, not as a continued transaction. If that happens we'll see:
39 # xfs_logprint: unknown log operation type (494e)
41 _scratch_mkfs -l size=${logblks}b >/dev/null 2>&1
43 for I in `seq 0 8192`; do
44 echo a >> $SCRATCH_MNT/cat
45 touch $SCRATCH_MNT/tmp$I
48 _scratch_xfs_logprint 2>&1 >> $seqres.full