2 # SPDX-License-Identifier: GPL-2.0
3 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
7 # Like 121 only creating large EAs
8 # As part of the iunlink processing in recovery it will call VN_RELE
9 # which will inactivate the inodes and if they have EAs (which they
10 # will here) also call xfs_inactive_attrs.
11 # We want to test out this xfs_inactive_attrs code being called in recovery.
14 _begin_fstest shutdown log auto quick
16 # Override the default cleanup function.
20 [ -n "$pid" ] && kill $pid
25 # Import common functions.
29 # real QA test starts here
37 _scratch_mkfs_xfs >>$seqres.full 2>&1 \
38 || _fail "mkfs scratch failed"
43 # num_files must be greater than 64 (XFS_AGI_UNLINKED_BUCKETS)
44 # so that there will be at least one linked list from one of
45 # the 64 buckets, so that we can decode a di_next_unlinked field
48 ea_val_size=`expr 32 \* 1024`
50 # sleep for ages and we will kill this pid when we are ready
53 echo "open and unlink $num_files files with EAs"
54 $here/src/multi_open_unlink -f $SCRATCH_MNT/test_file -n $num_files -s $delay -e $num_eas -v $ea_val_size &
57 # time to create and unlink all the files
61 _scratch_shutdown -v -f >> $seqres.full
63 # kill the multi_open_unlink
71 echo "logprint after going down..."
74 echo "mount with replay"
75 _scratch_mount $mnt >>$seqres.full 2>&1 \
76 || _fail "mount failed: $mnt $MOUNT_OPTIONS"
79 _scratch_shutdown -v -f >> $seqres.full
84 echo "logprint after going down..."
87 echo "logprint to check for CLEAR_AGI_BUCKET..."
88 if _scratch_xfs_logprint -t | tee -a $seqres.full | grep CLEAR; then
89 echo 'CLEAR_AGI_BUCKET transactions found!!'
90 echo 'Are you running with an old xfs kernel - where the bug still exists?'
92 echo 'No CLEAR_AGI_BUCKET found in transactions - great - test passed :)'
95 # clean up dirty log with log recovery on mount
96 _scratch_mount >> $seqres.full 2>&1 \
97 || _fail "mount failed"