4 # Exercising the inheritable realtime inode bit.
6 #-----------------------------------------------------------------------
7 # Copyright (c) 2000-2005 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
27 # get standard environment, filters and checks
31 # real QA test starts here
33 _supported_os IRIX Linux
36 _require_command /usr/sbin/xfs_io
38 _filter_realtime_flag()
40 _test_inode_flag realtime $SCRATCH_MNT/testdir/$1
42 echo "--r-- SCRATCH_MNT/testdir/$1"
44 echo "----- SCRATCH_MNT/testdir/$1"
48 _filter_rtinherit_flag()
50 _test_inode_flag rt-inherit $SCRATCH_MNT/testdir
52 echo "--t-- SCRATCH_MNT/testdir"
54 echo "----- SCRATCH_MNT/testdir"
61 if ! _scratch_mkfs_xfs >$tmp.out 2>&1
64 echo "failed to mkfs $SCRATCH_DEV"
71 echo "failed to mount $SCRATCH_DEV"
77 mkdir $SCRATCH_MNT/testdir
79 # set inode attribute, create files below and check they're marked realtime
80 # unset inode attribute, create files below and check they're not realtime
82 echo "*** create directory with rtinherit"
83 $XFS_IO_PROG -r -c 'chattr +t' $SCRATCH_MNT/testdir
84 _filter_rtinherit_flag
86 echo "*** create child with inherited realtime"
87 touch $SCRATCH_MNT/testdir/real
88 _filter_realtime_flag real
90 echo "*** remove rtinherit from directory"
91 $XFS_IO_PROG -r -c 'chattr -t' $SCRATCH_MNT/testdir
92 _filter_rtinherit_flag
94 echo "*** create child without inherited realtime"
95 touch $SCRATCH_MNT/testdir/unreal
96 _filter_realtime_flag unreal