]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commitdiff
common: use _require_xfs_io_command() directly to check fiemap
authorXiao Yang <yangx.jy@cn.fujitsu.com>
Wed, 17 May 2017 01:42:32 +0000 (09:42 +0800)
committerEryu Guan <eguan@redhat.com>
Wed, 17 May 2017 09:38:26 +0000 (17:38 +0800)
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>
Reviewed-by: Eryu Guan <eguan@redhat.com>
Signed-off-by: Eryu Guan <eguan@redhat.com>
43 files changed:
common/rc
common/reflink
tests/generic/043
tests/generic/044
tests/generic/045
tests/generic/046
tests/generic/047
tests/generic/048
tests/generic/049
tests/generic/092
tests/generic/301
tests/generic/302
tests/generic/305
tests/generic/326
tests/generic/327
tests/generic/328
tests/generic/352
tests/generic/353
tests/generic/372
tests/generic/414
tests/generic/425
tests/xfs/180
tests/xfs/182
tests/xfs/184
tests/xfs/192
tests/xfs/193
tests/xfs/198
tests/xfs/200
tests/xfs/204
tests/xfs/207
tests/xfs/208
tests/xfs/209
tests/xfs/210
tests/xfs/211
tests/xfs/212
tests/xfs/213
tests/xfs/214
tests/xfs/231
tests/xfs/232
tests/xfs/344
tests/xfs/345
tests/xfs/346
tests/xfs/347

index aa35b5e24bd1a6045f8b2dfbcd1cf1cdecc2d5c4..539f153ddc17ff2d5c7c4151fb8eba02e20c5b49 100644 (file)
--- a/common/rc
+++ b/common/rc
@@ -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
index 2e364e54460d8a01bdad8dfc5380b6ea2adb1ede..2a7c7b848e2b0c6709ed1b53f1496a4eb95b151a 100644 (file)
@@ -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
index 3d98ab05ad875289a97c434c906f72366b925553..784683ebb14fafe1609d109717cceb943cf27278 100755 (executable)
@@ -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
index eb64b8606f3b67c011e99295c7851f3efc1b5293..f0dc0df1418837ba567e4106969ca9246c288dfc 100755 (executable)
@@ -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
index 5ef747f256fab62f87969324718f4c3fb649bb1b..b49d09e3defc93445668f6af3f917a13a99af0d6 100755 (executable)
@@ -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
index 882cb095b96b98a38448478b630368ccaefd05e6..54cb557be6fd039bd92c2f53f4173da47f3bf4a9 100755 (executable)
@@ -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
index d7e4610d842feedce67867c5d1b53cec2bb40e15..20f157e5b3b8d3e0c2b115507f7c5de3c020f108 100755 (executable)
@@ -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
index 3f0bcc183b7477133cb09d11eac7a84cd4819690..dc2ab204d6809a1cb75cb3ae2aea9dde3ac7ca22 100755 (executable)
@@ -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
index 1f2a4b2b9a08f22d54b97780757659cdaa0087af..c7f19446e96a5a97f080529b606a19f8b63b1255 100755 (executable)
@@ -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
index faf08f1fb5e90dfee6610256b03819d3fb4225e3..cc615f629f63883f96fa0c6ca02eabf98407bbed 100755 (executable)
@@ -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
index 67b1a0cf3e03a7a7ffcdf59e765d3b520ff694f4..1c6ea055ed5a029e6f49c0e945563abf6db36461 100755 (executable)
@@ -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
 
index 3834f98f3fbfb37e3cdb248789494c1ed9c681e9..5643bb53dacc0921a379ad0222325c2a10b9e12d 100755 (executable)
@@ -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
index ceef333cea3bc9db879f5ffad6e3e068782f2a2a..cb057998f7a10067ada83a7f9fdf6aeeff8333d9 100755 (executable)
@@ -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
index 3568efecf10d0bd1c7efaf2a78d1aba5e61ec18e..c6cc9bb1ac1e5e481ac81a215c8805c9d999fa2b 100755 (executable)
@@ -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
index 05cfb4afba34a90ef29044eaeec7b5424f1b17e7..1e1ab6a5fd8c04e9a393756280c2f488fb75ef96 100755 (executable)
@@ -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
index 21ec9d317791a371f44c06f8f7d89b4f865433a1..1ad53fda5303d2dcf4078ab4531aca630a1a80de 100755 (executable)
@@ -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
index 70e43fbb9dd236ccadca6ed59a489913ac70b48e..30eb43b75c2a6880411b31df4dcba7048aa1b974 100755 (executable)
@@ -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
index ca665cf37f8545cd4f7a85bf85bc1d24d22f09c8..ddb9346d16e956430e9aeeef69a4d356c9641746 100755 (executable)
@@ -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
index 51a3eca7fab66559732923ecfc6ed397cea71a32..08c81a9ddb2afe848b0df77bde7f2f60507a9498 100755 (executable)
@@ -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"
index ee85d73b11e63ed1f2cc39433f4daa91e8c7bd06..6f2136eee18e0350f7ba30fedd9b22f669efc67e 100755 (executable)
@@ -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
index 31e84674666572c74999254c823430c510bbd9e2..800afc5942f97f10e312b75b50b755781d5b7c5a 100755 (executable)
@@ -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
index ce2ac2683fab7d779e0680f349e9fbee9a4dfba0..736267e1a0e3b8a5c63cec475ba385d5fb80ae65 100755 (executable)
@@ -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
index 4413c7d3b007f1b86d4cdb84d80a68e379e28493..6d7d21ef9de3d35c24771370552575f315939e52 100755 (executable)
@@ -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
 
index 54eb11519a908d53dc1496dbfcce52c39d939a4c..2ae19abf3f6aa1de396f3327b6da21220e5e8770 100755 (executable)
@@ -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"
 
index d8bdb25e32a9c1ead324c2948103f3648e7aaa5c..eeb602570a79e96daf989f366ce3935e80cda718 100755 (executable)
@@ -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
index 76cb14339db2bcde055f4ae3519ca2de094b60f5..c45f05a88cfab6807b2ada8903ff443b8e4cf620 100755 (executable)
@@ -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
index d185ca258af7bddadb5a60df9418141f41c6eef3..bdfd44a475904feef74dddd1baf48bae166bcc4a 100755 (executable)
@@ -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
 
index e70fda3db2762d3548b74c5d39939f3c4e344c86..328341c949e89847150c813a175b665e8b9cbede 100755 (executable)
@@ -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"
 
index c0b69cf7ffa95a1a1ad67a668381b52593a5abe8..9a134e962887d5ab913654a9dcbd903c6c3b8f43 100755 (executable)
@@ -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
index efa283f1272aad306633134e7b932323d1c3ab7e..f9998ee101ad76a781c459aac2986193774a8c86 100755 (executable)
@@ -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
index 62192cb1b96b7496a0cf9dfb391575c64b9ffe0b..b00e4ab461b17ac0c2c14661875797b84e8868e7 100755 (executable)
@@ -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
index 9bf1f12c0071492caff16006223e0bc5e796ea84..83ccdf6b0a27eef64fc7e91ff5fe0689414367c9 100755 (executable)
@@ -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
index d3a271636a1d2064410b5374b576aa0246cf55d6..8a77464ab8776c1b704126532fc89800bd8f2bef 100755 (executable)
@@ -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
index 0d150f1d35b3ebee4f1513e80ac5c46ee6ebb008..bd4b7991ca3e17d700fabe8a10e86fa4bfbf8e4a 100755 (executable)
@@ -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
 
index 48235d45d4c0c0f505609bd6c64a293d6e897a1d..90f6903de9b350152bc6a4de3eebcb45bd80a1ef 100755 (executable)
@@ -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
 
index 844166c1673095647e8a0fc9429cc39f66831012..2029abb254fc302dec0ba5831733b8c00e9ba8c6 100755 (executable)
@@ -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"
index 01ffbaff418e1d12dd0564459141d2f31004f573..719ea2bde65bdcc2f29fbb45aa84bf856576fc85 100755 (executable)
@@ -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"
index f0b64c0d075217a0c8db7e7fbcb6ad44917c5243..ac1dd1628f25d7060b196f2364f6d7c6ac472315 100755 (executable)
@@ -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)
 
index 6b74997aa65738319d4e2361cc9deb970d06649e..8638ee636130272ee2131d4848ecc82aaefca54d 100755 (executable)
@@ -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)
 
index 806f7abf847b1f4907e3688f5c3ac4421a02407f..d5288cf9ea754c1766738882a332a8864335f31a 100755 (executable)
@@ -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
index 1684297b3b22567f7a218676dd0217611fd13724..ccfdb8f2b9a4dbb309992e8c696528d6780ab3fc 100755 (executable)
@@ -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"
 
index 90fe5eba54299f5e9da6af257be31af32eae4109..f189b5daa7f3c736f6529f463567a3c82d8c6fd8 100755 (executable)
@@ -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
index 2a13977b89d6fb131b5da4ca08af0112ce4d7c8f..fbc5ce336992beabd1b1a90166e323241d0f36f2 100755 (executable)
@@ -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"