use dd and lmdd for proper direct/buffered IO on linux and irix
[xfstests-dev.git] / 119
1 #! /bin/sh
2 # FS QA Test No. 119
3 #
4 # Leaking reservation space in the GRH
5 # Test out pv#942130
6 # This can hang when things aren't working
7 #
8 #-----------------------------------------------------------------------
9 # Copyright (c) 2000-2005 Silicon Graphics, Inc.  All Rights Reserved.
10 #-----------------------------------------------------------------------
11 #
12 # creator
13 owner=tes@crackle.melbourne.sgi.com
14
15 seq=`basename $0`
16 echo "QA output created by $seq"
17
18 here=`pwd`
19 tmp=/tmp/$$
20 status=1        # failure is the default!
21 trap "_cleanup; exit \$status" 0 1 2 3 15
22
23 _cleanup()
24 {
25     cd /
26     rm -f $tmp.*
27 }
28
29 # get standard environment, filters and checks
30 . ./common.rc
31 . ./common.filter
32
33 # real QA test starts here
34
35 # Modify as appropriate.
36 _supported_fs xfs
37 _supported_os IRIX Linux
38
39 _require_scratch
40
41 # this may hang
42 sync
43
44 export MKFS_OPTIONS="-l version=2,size=1200b,su=64k" 
45 export MOUNT_OPTIONS="-o logbsize=64k"
46 _scratch_mkfs_xfs >/dev/null
47
48 _scratch_mount
49
50 max=99
51 i=0
52 echo "start freezing and unfreezing"
53 while [ $i -lt $max ]; do
54         xfs_freeze -f $SCRATCH_MNT
55         xfs_freeze -u $SCRATCH_MNT
56         echo -n .
57         i=`expr $i + 1`
58 done
59 echo "done"
60
61 # success, all done
62 status=0
63 exit