4 # DMAPI function punch hole. Create 3Mb file and punch a hole from
7 #-----------------------------------------------------------------------
8 # Copyright (c) 2006 Silicon Graphics, Inc. All Rights Reserved.
9 #-----------------------------------------------------------------------
15 echo "QA output created by $seq"
19 status=1 # failure is the default!
20 trap "_cleanup; exit \$status" 0 1 2 3 15
27 _filter_get_allocinfo()
29 $SED_PROG -e "s#$qa_file#QA_FILE#g" \
30 -e "s#18014398509481983\|34359738367#MAX_FILE_BLOCKS#g"
33 # get standard environment, filters and checks
38 # real QA test starts here
40 _supported_os Linux IRIX
43 _scratch_mkfs_xfs >/dev/null 2>&1
46 qa_file=$SCRATCH_MNT/dmapi_hole_file
48 dd if=/dev/zero bs=1024k count=3 of=$qa_file
50 ${DMAPI_QASUITE1_DIR}cmd/get_allocinfo $qa_file | _filter_get_allocinfo
51 ${DMAPI_QASUITE1_DIR}cmd/probe_hole -o 1048576 -l 0 $qa_file
52 ${DMAPI_QASUITE1_DIR}cmd/punch_hole -o 1048576 -l 0 $qa_file
53 ${DMAPI_QASUITE1_DIR}cmd/get_allocinfo $qa_file | _filter_get_allocinfo