4 # ->page-mkwrite test - unwritten extents and mmap
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
8 #-----------------------------------------------------------------------
14 echo "QA output created by $seq"
18 status=1 # failure is the default!
19 trap "_cleanup; exit \$status" 0 1 2 3 15
27 # get standard environment, filters and checks
31 # assumes 1st, 3rd and 5th blocks are single written blocks,
32 # the others are unwritten.
39 unwritten1 = ((1048576/512) / 2) - written_size
40 unwritten2 = ((1048576/512) / 2) - 2 * written_size
43 # is the extent unwritten?
55 } else if ($6 != unwritten2) {
59 if ($6 != written_size)
62 print $1, "[AA..BB]", "XX..YY", "AG", "(AA..BB)", size, flags
66 # real QA test starts here
72 _scratch_mkfs_xfs >/dev/null 2>&1
75 TEST_FILE=$SCRATCH_MNT/test_file
76 TEST_PROG=$here/src/unwritten_mmap
80 $TEST_PROG $FILE_SIZE $TEST_FILE
82 xfs_bmap -vp $TEST_FILE >> $seq.full
83 xfs_bmap -vp $TEST_FILE | _filter_blocks