4 # Check that the features2 location fixups work correctly. We check both
5 # a regular read-write mount of a filesystem and the case where the
6 # filesystem is first mounted read-only and then later remounted read-write,
7 # which is the usual case for the root filesystem.
9 #-----------------------------------------------------------------------
10 # Copyright (c) 2008 Christoph Hellwig.
11 #-----------------------------------------------------------------------
17 echo "QA output created by $seq"
21 status=1 # failure is the default!
26 umount $SCRATCH_MNT >/dev/null 2>&1
28 trap "_cleanup; exit \$status" 0 1 2 3 15
30 # get standard environment, filters and checks
34 # real QA test starts here
40 _scratch_mkfs_xfs >/dev/null 2>&1
43 # Print the current flags. Just a dummy so that the test breaks
44 # in an obvious way when the default feature flags changed in mkfs
46 echo "Default feature2 flags:"
47 xfs_db -x $SCRATCH_DEV -c 'sb' -c 'print features2'
48 xfs_db -x $SCRATCH_DEV -c 'sb' -c 'print bad_features2'
51 # Now clear the normal flags
53 echo "Clearing features2:"
54 xfs_db -x $SCRATCH_DEV -c 'sb' -c 'write features2 0'
58 echo "Features 2 after mount rw:"
59 xfs_db -x $SCRATCH_DEV -c 'sb' -c 'print features2'
62 # Clear the normal flags again for the second rount.
64 echo "Clearing features2:"
65 xfs_db -x $SCRATCH_DEV -c 'sb' -c 'write features2 0'
68 # And print the flags after a mount ro and remount rw
71 _scratch_mount -o remount,rw
73 echo "Features 2 after mount ro and remount rw:"
74 xfs_db -x $SCRATCH_DEV -c 'sb' -c 'print features2'