4 # To test log replay for the unlinked list.
5 # So we create unlinked and still referenced inodes
6 # and make sure that no clearing of the unlinked AGI buckets
10 #-----------------------------------------------------------------------
11 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
12 #-----------------------------------------------------------------------
18 echo "QA output created by $seq"
22 status=1 # failure is the default!
23 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
25 # get standard environment, filters and checks
30 # real QA test starts here
32 _supported_os IRIX Linux
40 _scratch_mkfs_xfs >>$seq.full 2>&1 \
41 || _fail "mkfs scratch failed"
44 _scratch_mount >>$seq.full 2>&1 \
45 || _fail "mount failed: $MOUNT_OPTIONS"
47 # num_files must be greater than 64 (XFS_AGI_UNLINKED_BUCKETS)
48 # so that there will be at least one linked list from one of
49 # the 64 buckets, so that we can decode a di_next_unlinked field
52 echo "open and unlink $num_files files"
53 src/multi_open_unlink $SCRATCH_MNT/test_file $num_files $delay &
55 # time to create and unlink all the files
59 src/godown -v -f $SCRATCH_MNT >> $seq.full
61 # time for multi_open_unlink to exit out after its delay
62 # so we have no references and can unmount
68 echo "logprint after going down..."
71 echo "mount with replay"
72 _scratch_mount $mnt >>$seq.full 2>&1 \
73 || _fail "mount failed: $mnt $MOUNT_OPTIONS"
76 src/godown -v -f $SCRATCH_MNT >> $seq.full
81 echo "logprint after going down..."
84 echo "logprint to check for CLEAR_AGI_BUCKET..."
85 if _scratch_xfs_logprint -t | tee -a $seq.full | grep CLEAR; then
86 echo 'CLEAR_AGI_BUCKET transactions found!!'
87 echo 'Are you running with an old xfs kernel - where the bug still exists?'
89 echo 'No CLEAR_AGI_BUCKET found in transactions - great - test passed :)'
92 # clean up dirty log with log recovery on mount
93 _scratch_mount >> $seq.full 2>&1 \
94 || _fail "mount failed"
96 # should now be peaches