6 #-----------------------------------------------------------------------
7 # Copyright (c) 2010 Eric Sandeen. All Rights Reserved.
9 # This program is free software; you can redistribute it and/or
10 # modify it under the terms of the GNU General Public License as
11 # published by the Free Software Foundation.
13 # This program is distributed in the hope that it would be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with this program; if not, write the Free Software Foundation,
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 #-----------------------------------------------------------------------
26 echo "QA output created by $seq"
30 status=1 # failure is the default!
37 trap "_cleanup ; exit \$status" 0 1 2 3 15
39 # get standard environment, filters and checks
43 # real QA test starts here
48 _require_xfs_io_falloc
54 for SUNIT_K in 8 16 32 64 128; do
55 let SUNIT_BYTES=$SUNIT_K*1024
56 let SUNIT_BLOCKS=$SUNIT_BYTES/$BLOCKSIZE
58 echo "=== mkfs with su $SUNIT_BLOCKS blocks x 4 ==="
59 export MKFS_OPTIONS=""
60 _scratch_mkfs_geom $SUNIT_BYTES 4 $BLOCKSIZE >> $seq.full 2>&1
63 for SIZE_MULT in 1 2 8 64 256; do
64 let SIZE=$SIZE_MULT*$SUNIT_BYTES
66 echo "=== Testing size ${SIZE_MULT}*${SUNIT_K}k on ${SUNIT_K}k stripe ==="
67 for FILE in 1 2 3 4; do
68 xfs_io -F -f -c "falloc 0 $SIZE" \
69 $SCRATCH_MNT/file-$FILE-$SIZE-falloc \
71 xfs_io -F -f -c "pwrite 0 $SIZE" \
72 $SCRATCH_MNT/file-$FILE-$SIZE-write \
74 src/t_stripealign $SCRATCH_MNT/file-$FILE-$SIZE-falloc \
75 $SUNIT_BLOCKS | _filter_scratch
76 src/t_stripealign $SCRATCH_MNT/file-$FILE-$SIZE-write \
77 $SUNIT_BLOCKS | _filter_scratch
81 echo "=== Testing size 1g falloc on ${SUNIT_K}k stripe ==="
82 xfs_io -F -f -c "falloc 0 1g" \
83 $SCRATCH_MNT/file-1g-falloc >> $seq.full 2>&1
84 src/t_stripealign $SCRATCH_MNT/file-1g-falloc $SUNIT_BLOCKS \
87 rm -f $SCRATCH_MNT/file-1g-falloc | _filter_scratch
89 echo "=== Testing size 1073745920 falloc on ${SUNIT_K}k stripe ==="
90 xfs_io -F -f -c "falloc 0 1073745920" \
91 $SCRATCH_MNT/file-1073745920-falloc >> $seq.full 2>&1
92 src/t_stripealign $SCRATCH_MNT/file-1073745920-falloc \
93 $SUNIT_BLOCKS | _filter_scratch