4 # Hole punching with extsize hints, holes may not reported by xfs_bmap.
5 # This is not good for certain backup apps, as they rely on the hole
6 # being visible in the file so later on they know where to migrate
7 # back the data from the tape.
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2007 Silicon Graphics, Inc. All Rights Reserved.
11 #-----------------------------------------------------------------------
16 echo "QA output created by $seq"
21 status=1 # failure is the default!
22 trap "_cleanup; exit \$status" 0 1 2 3 15
29 # get standard environment, filters and checks
35 # real QA test starts here
41 # test that we have DMAPI support
43 umount $SCRATCH_MNT > /dev/null 2>&1
45 # _test_punch args: blksize extsize_hint filesize "pp1 pp2 pp3" \
46 # "ps1 ps2 ps3" "pt1 pt2 pt3" "wp1 wp2" "ws1 ws2" \
49 echo "-- test dmpunch-hole without an extent size hint --"
50 _test_punch 4096 0 256 "240" "16" "d" "0" "256" "w p" noresv
53 echo "-- this time use a 4k (one block) extent size hint --"
54 _test_punch 4096 1 256 "240" "16" "d" "0" "256" "w p" noresv