4 # Like 121 only creating large EAs
5 # As part of the iunlink processing in recovery it will call VN_RELE
6 # which will inactivate the inodes and if they have EAs (which they
7 # will here) also call xfs_inactive_attrs.
8 # We want to test out this xfs_inactive_attrs code being called in recovery.
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
13 # This program is free software; you can redistribute it and/or
14 # modify it under the terms of the GNU General Public License as
15 # published by the Free Software Foundation.
17 # This program is distributed in the hope that it would be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program; if not, write the Free Software Foundation,
24 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26 #-----------------------------------------------------------------------
32 echo "QA output created by $seq"
37 [ -n "$pid" ] && kill $pid
43 status=1 # failure is the default!
44 trap "_cleanup; exit \$status" 0 1 2 3 15
46 # get standard environment, filters and checks
51 # real QA test starts here
53 _supported_os IRIX Linux
61 _scratch_mkfs_xfs >>$seq.full 2>&1 \
62 || _fail "mkfs scratch failed"
65 _scratch_mount >>$seq.full 2>&1 \
66 || _fail "mount failed: $MOUNT_OPTIONS"
68 # num_files must be greater than 64 (XFS_AGI_UNLINKED_BUCKETS)
69 # so that there will be at least one linked list from one of
70 # the 64 buckets, so that we can decode a di_next_unlinked field
73 ea_val_size=`expr 32 \* 1024`
75 # sleep for ages and we will kill this pid when we are ready
78 echo "open and unlink $num_files files with EAs"
79 src/multi_open_unlink -f $SCRATCH_MNT/test_file -n $num_files -s $delay -e $num_eas -v $ea_val_size &
82 # time to create and unlink all the files
86 src/godown -v -f $SCRATCH_MNT >> $seq.full
88 # kill the multi_open_unlink
96 echo "logprint after going down..."
99 echo "mount with replay"
100 _scratch_mount $mnt >>$seq.full 2>&1 \
101 || _fail "mount failed: $mnt $MOUNT_OPTIONS"
104 src/godown -v -f $SCRATCH_MNT >> $seq.full
109 echo "logprint after going down..."
112 echo "logprint to check for CLEAR_AGI_BUCKET..."
113 if _scratch_xfs_logprint -t | tee -a $seq.full | grep CLEAR; then
114 echo 'CLEAR_AGI_BUCKET transactions found!!'
115 echo 'Are you running with an old xfs kernel - where the bug still exists?'
117 echo 'No CLEAR_AGI_BUCKET found in transactions - great - test passed :)'
120 # clean up dirty log with log recovery on mount
121 _scratch_mount >> $seq.full 2>&1 \
122 || _fail "mount failed"
124 # should now be peaches