6 #-----------------------------------------------------------------------
7 # Copyright (c) 2011-2012 Fujitsu, Inc. 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 #-----------------------------------------------------------------------
25 owner=wu.bo@cn.fujitsu.com
28 echo "QA output created by $seq"
32 status=0 # success is the default!
33 trap "_cleanup; exit \$status" 0 1 2 3 15
38 rm -f $SCRATCH_MNT/* $tmp.*
45 # real QA test starts here
47 _supported_os IRIX Linux
50 echo "------------------------------"
51 echo "preallocation test"
52 echo "------------------------------"
56 umount $SCRATCH_DEV 2>/dev/null
57 _scratch_mkfs_sized $((1 * 1024 * 1024 * 1024)) >>$seq.full 2>&1
62 dd if=/dev/zero of=test bs=4K count=1 >/dev/null 2>&1
65 echo "create file err"
70 fallocate -n -o 4K -l 1M test >/dev/null 2>&1
73 echo "fallocate file err"
78 dd if=/dev/zero of=tmp1 bs=1M >/dev/null 2>&1
79 dd if=/dev/zero of=tmp2 bs=4K >/dev/null 2>&1
82 dd if=/dev/zero of=test seek=1 bs=4K count=2 conv=notrunc >/dev/null 2>&1
85 echo "fill prealloc range err"