4 # Dmapi Punch/Probe Alignment compared to xfsctl(FREESPACE);
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2006 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
26 # get standard environment, filters and checks
31 # real QA test starts here
33 _supported_os Linux IRIX
36 _scratch_mkfs_xfs -b size=512 >/dev/null 2>&1
40 cat > $tmp.dmapi-param <<EOF
43 1k 0 # not page aligned
50 mkdir -p $SCRATCH_MNT/dmapi
51 f=$SCRATCH_MNT/dmapi/holly_file
52 e=${DMAPI_QASUITE1_DIR}cmd/probe_punch_xfsctl_hole
54 cat $tmp.dmapi-param | sed s/'\#.*'//g| grep . |while read l o; do
55 echo "======================================================="
56 echo "Testing with length = $l, offset = $o"
59 dd if=/dev/zero bs=1024k count=3 of=$f >/dev/null 2>&1
62 echo "Method: dmapi_probe"
63 dd if=/dev/zero bs=1024k count=3 of=$f >/dev/null 2>&1
66 echo "Method: dmapi_punch"
68 echo "======================================================="
71 rm -rf $tmp.dmapi-param