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 seqres=$RESULT_DIR/$seq
15 echo "QA output created by $seq"
20 [ -n "$pid" ] && kill $pid
26 status=1 # failure is the default!
27 trap "_cleanup; exit \$status" 0 1 2 3 15
29 # get standard environment, filters and checks
34 # real QA test starts here
43 _scratch_mkfs_xfs >>$seqres.full 2>&1 \
44 || _fail "mkfs scratch failed"
49 # num_files must be greater than 64 (XFS_AGI_UNLINKED_BUCKETS)
50 # so that there will be at least one linked list from one of
51 # the 64 buckets, so that we can decode a di_next_unlinked field
54 ea_val_size=`expr 32 \* 1024`
56 # sleep for ages and we will kill this pid when we are ready
59 echo "open and unlink $num_files files with EAs"
60 $here/src/multi_open_unlink -f $SCRATCH_MNT/test_file -n $num_files -s $delay -e $num_eas -v $ea_val_size &
63 # time to create and unlink all the files
67 _scratch_shutdown -v -f >> $seqres.full
69 # kill the multi_open_unlink
77 echo "logprint after going down..."
80 echo "mount with replay"
81 _scratch_mount $mnt >>$seqres.full 2>&1 \
82 || _fail "mount failed: $mnt $MOUNT_OPTIONS"
85 _scratch_shutdown -v -f >> $seqres.full
90 echo "logprint after going down..."
93 echo "logprint to check for CLEAR_AGI_BUCKET..."
94 if _scratch_xfs_logprint -t | tee -a $seqres.full | grep CLEAR; then
95 echo 'CLEAR_AGI_BUCKET transactions found!!'
96 echo 'Are you running with an old xfs kernel - where the bug still exists?'
98 echo 'No CLEAR_AGI_BUCKET found in transactions - great - test passed :)'
101 # clean up dirty log with log recovery on mount
102 _scratch_mount >> $seqres.full 2>&1 \
103 || _fail "mount failed"