@@ -2940,12 +2940,6 @@ _require_metadata_journaling()
esac
}
-# Does fiemap support?
-_require_fiemap()
-{
- _require_xfs_io_command "fiemap"
-}
-
_count_extents()
{
$XFS_IO_PROG -c "fiemap" $1 | tail -n +2 | grep -v hole | wc -l
@@ -2956,12 +2950,6 @@ _count_holes()
$XFS_IO_PROG -c "fiemap" $1 | tail -n +2 | grep hole | wc -l
}
-# Does fiemap support reporting xattr extents?
-_require_fiemap_attr()
-{
- _require_xfs_io_command "fiemap" "-a"
-}
-
_count_attr_extents()
{
$XFS_IO_PROG -c "fiemap -a" $1 | tail -n +2 | grep -v hole | wc -l
@@ -111,7 +111,7 @@ _require_scratch_reflink()
_require_scratch_explicit_shared_extents()
{
_require_scratch
- _require_fiemap
+ _require_xfs_io_command "fiemap"
_require_scratch_reflink
_require_xfs_io_command "reflink"
local nr_extents
@@ -41,7 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -41,7 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -41,7 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -41,7 +41,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -42,7 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -42,7 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -42,7 +42,7 @@ _supported_os Linux IRIX
_require_scratch
_require_scratch_shutdown
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs >/dev/null 2>&1
_require_metadata_journaling $SCRATCH_DEV
_scratch_mount
@@ -53,7 +53,7 @@ _supported_fs generic
_supported_os Linux
_require_test
_require_xfs_io_command "falloc"
-_require_fiemap
+_require_xfs_io_command "fiemap"
# First test to make sure that truncating at i_size trims the preallocated bit
# past i_size
@@ -47,7 +47,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
rm -f $seqres.full
@@ -47,7 +47,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_odirect
rm -f $seqres.full
@@ -46,7 +46,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_quota
_require_nobody
_require_user
@@ -46,7 +46,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_quota
_require_nobody
_require_odirect
@@ -45,7 +45,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_quota
_require_nobody
_require_user
@@ -45,7 +45,7 @@ _cleanup()
_supported_os Linux
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_quota
_require_nobody
_require_odirect
@@ -55,7 +55,7 @@ rm -f $seqres.full
_supported_fs generic
_supported_os Linux
_require_scratch_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
@@ -56,7 +56,7 @@ rm -f $seqres.full
_supported_fs generic
_supported_os Linux
_require_scratch_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_scratch_mkfs > /dev/null 2>&1
_scratch_mount
@@ -46,7 +46,7 @@ _cleanup()
_supported_os Linux
_supported_fs generic
_require_scratch_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_scratch_explicit_shared_extents
echo "Format and mount"
@@ -47,7 +47,7 @@ _cleanup()
_supported_os Linux
_supported_fs generic
_require_scratch_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs generic
_require_scratch
_require_attrs
-_require_fiemap_attr
+_require_xfs_io_command "fiemap" "-a"
echo "Format and mount"
_scratch_mkfs > $seqres.full 2>&1
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
rm -f $seqres.full
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_odirect
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
_require_odirect
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
rm -f $seqres.full
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_odirect
@@ -51,7 +51,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
@@ -51,7 +51,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
_require_odirect
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
rm -f $seqres.full
@@ -52,7 +52,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
rm -f $seqres.full
@@ -45,7 +45,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
rm -f $seqres.full
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
rm -f $seqres.full
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_odirect
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
rm -f $seqres.full
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_quota
_require_nobody
_require_xfs_io_command "cowextsize"
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_quota
_require_nobody
_require_xfs_io_command "cowextsize"
@@ -52,7 +52,7 @@ _supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
_require_xfs_io_command "cowextsize"
-_require_fiemap
+_require_xfs_io_command "fiemap"
old_cow_lifetime=$(cat /proc/sys/fs/xfs/speculative_cow_prealloc_lifetime)
@@ -53,7 +53,7 @@ _supported_fs xfs
_require_xfs_io_command "cowextsize"
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
old_cow_lifetime=$(cat /proc/sys/fs/xfs/speculative_cow_prealloc_lifetime)
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
_require_odirect
@@ -48,7 +48,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
_require_odirect
@@ -49,7 +49,7 @@ _supported_os Linux
_supported_fs xfs
_require_scratch_reflink
_require_cp_reflink
-_require_fiemap
+_require_xfs_io_command "fiemap"
_require_xfs_io_command "cowextsize"
_require_xfs_io_command "funshare"
1) _require_fiemap and _require_xfs_io_command "fiemap" do the same thing, but some test cases use the former and some use the latter, so i feel they should be unified. 2) The number of helpers like this is slowly growing, but it's easy to simply use _require_xfs_io_command directly and just specify the command we want to check. This is just a cleanup for keeping it simple. Signed-off-by: Xiao Yang <yangx.jy@cn.fujitsu.com> --- common/rc | 12 ------------ common/reflink | 2 +- tests/generic/043 | 2 +- tests/generic/044 | 2 +- tests/generic/045 | 2 +- tests/generic/046 | 2 +- tests/generic/047 | 2 +- tests/generic/048 | 2 +- tests/generic/049 | 2 +- tests/generic/092 | 2 +- tests/generic/301 | 2 +- tests/generic/302 | 2 +- tests/generic/305 | 2 +- tests/generic/326 | 2 +- tests/generic/327 | 2 +- tests/generic/328 | 2 +- tests/generic/352 | 2 +- tests/generic/353 | 2 +- tests/generic/372 | 2 +- tests/generic/414 | 2 +- tests/generic/425 | 2 +- tests/xfs/180 | 2 +- tests/xfs/182 | 2 +- tests/xfs/184 | 2 +- tests/xfs/192 | 2 +- tests/xfs/193 | 2 +- tests/xfs/198 | 2 +- tests/xfs/200 | 2 +- tests/xfs/204 | 2 +- tests/xfs/207 | 2 +- tests/xfs/208 | 2 +- tests/xfs/209 | 2 +- tests/xfs/210 | 2 +- tests/xfs/211 | 2 +- tests/xfs/212 | 2 +- tests/xfs/213 | 2 +- tests/xfs/214 | 2 +- tests/xfs/231 | 2 +- tests/xfs/232 | 2 +- tests/xfs/344 | 2 +- tests/xfs/345 | 2 +- tests/xfs/346 | 2 +- tests/xfs/347 | 2 +- 43 files changed, 42 insertions(+), 54 deletions(-)