All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests
@ 2016-02-13 17:40 Theodore Ts'o
  2016-02-13 17:40 ` [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts Theodore Ts'o
                   ` (15 more replies)
  0 siblings, 16 replies; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

The first and last patches in these series not related to tmpfs
support.  The first is a resed of a patch to fix ext4/001 to account
for different output if delayed allocation is turned off.  The last is
a cleanup patch to remove _need_to_be_root.

Hugh Dickins (7):
  common: _scratch_mkfs_sized() for tmpfs
  generic: use mount point instead of device name
  generic: require fiemap for generic/009
  xfstests: remove dependency on /proc/partitions for generic/312
  xfstests: generic/079 and generic/277 requires chattr, not xattrs
  xfstests: add executable permission to tests
  xfstests: increase tmpfs memory size

Junho Ryu (2):
  xfstests: do not unmount tmpfs during remount
  generic: do not unmount before calling _check_scratch_fs()

Theodore Ts'o (7):
  ext4/001: add output variant for nodelalloc mounts
  check: avoid spurious complaints that tests/$FSTYP/group does not
    exist
  generic: remove the generic/125 test
  generic: add _require_odirect to generic/113 and generic/214
  Rename _scratch_mount to _scratch_cycle_mount
  Rename _test_mount to _test_cycle_mount
  xfstests: remove _need_to_be_root

 README                        |   4 -
 check                         |   6 +
 common/config                 |   4 +-
 common/defrag                 |   2 +-
 common/dump                   |   2 -
 common/rc                     |  69 +++++++--
 tests/btrfs/001               |   6 +-
 tests/btrfs/002               |   1 -
 tests/btrfs/003               |   1 -
 tests/btrfs/004               |   1 -
 tests/btrfs/005               |   2 +-
 tests/btrfs/007               |   1 -
 tests/btrfs/011               |   1 -
 tests/btrfs/017               |   1 -
 tests/btrfs/025               |   1 -
 tests/btrfs/026               |   3 +-
 tests/btrfs/029               |   1 -
 tests/btrfs/030               |   1 -
 tests/btrfs/031               |   1 -
 tests/btrfs/034               |   1 -
 tests/btrfs/037               |   1 -
 tests/btrfs/038               |   1 -
 tests/btrfs/039               |   1 -
 tests/btrfs/040               |   1 -
 tests/btrfs/041               |   1 -
 tests/btrfs/043               |   1 -
 tests/btrfs/044               |   1 -
 tests/btrfs/045               |   1 -
 tests/btrfs/046               |   1 -
 tests/btrfs/047               |   1 -
 tests/btrfs/048               |   1 -
 tests/btrfs/049               |   1 -
 tests/btrfs/050               |   1 -
 tests/btrfs/051               |   1 -
 tests/btrfs/052               |   3 +-
 tests/btrfs/053               |   1 -
 tests/btrfs/054               |   1 -
 tests/btrfs/055               |   1 -
 tests/btrfs/056               |   1 -
 tests/btrfs/057               |   1 -
 tests/btrfs/058               |   1 -
 tests/btrfs/059               |   1 -
 tests/btrfs/076               |   1 -
 tests/btrfs/077               |   1 -
 tests/btrfs/078               |   1 -
 tests/btrfs/079               |   1 -
 tests/btrfs/080               |   1 -
 tests/btrfs/081               |   3 +-
 tests/btrfs/083               |   1 -
 tests/btrfs/084               |   1 -
 tests/btrfs/085               |   1 -
 tests/btrfs/086               |   1 -
 tests/btrfs/087               |   1 -
 tests/btrfs/088               |   3 +-
 tests/btrfs/089               |   1 -
 tests/btrfs/091               |   1 -
 tests/btrfs/092               |   1 -
 tests/btrfs/093               |   1 -
 tests/btrfs/094               |   1 -
 tests/btrfs/095               |   1 -
 tests/btrfs/096               |   1 -
 tests/btrfs/097               |   1 -
 tests/btrfs/098               |   1 -
 tests/btrfs/099               |   1 -
 tests/btrfs/100               |   1 -
 tests/btrfs/101               |   1 -
 tests/btrfs/102               |   3 +-
 tests/btrfs/103               |   3 +-
 tests/btrfs/104               |   3 +-
 tests/btrfs/105               |   3 +-
 tests/btrfs/106               |   3 +-
 tests/btrfs/107               |   1 -
 tests/btrfs/108               |   1 -
 tests/btrfs/109               |   1 -
 tests/btrfs/110               |   1 -
 tests/btrfs/111               |   1 -
 tests/btrfs/112               |   1 -
 tests/btrfs/113               |   1 -
 tests/btrfs/114               |   0
 tests/btrfs/116               |   1 -
 tests/btrfs/117               |   1 -
 tests/ext4/001.cfg            |   2 +
 tests/ext4/001.out.nodelalloc | 337 ++++++++++++++++++++++++++++++++++++++++++
 tests/ext4/271                |   1 -
 tests/ext4/301                |   1 -
 tests/ext4/302                |   1 -
 tests/ext4/303                |   1 -
 tests/ext4/304                |   1 -
 tests/ext4/307                |   1 -
 tests/ext4/308                |   1 -
 tests/f2fs/001                |   2 +-
 tests/generic/003             |  20 +--
 tests/generic/009             |   2 +
 tests/generic/013             |   2 +-
 tests/generic/019             |   1 -
 tests/generic/026             |   1 -
 tests/generic/029             |   6 +-
 tests/generic/030             |   6 +-
 tests/generic/031             |   2 +-
 tests/generic/032             |   2 +-
 tests/generic/033             |   2 +-
 tests/generic/034             |   1 -
 tests/generic/037             |   1 -
 tests/generic/038             |   1 -
 tests/generic/039             |   1 -
 tests/generic/040             |   1 -
 tests/generic/041             |   1 -
 tests/generic/053             |   2 -
 tests/generic/053.out         |   2 -
 tests/generic/056             |   1 -
 tests/generic/057             |   1 -
 tests/generic/058             |   0
 tests/generic/059             |   1 -
 tests/generic/060             |   0
 tests/generic/061             |   0
 tests/generic/063             |   0
 tests/generic/065             |   1 -
 tests/generic/066             |   1 -
 tests/generic/071             |   3 +-
 tests/generic/073             |   1 -
 tests/generic/079             |   2 +-
 tests/generic/090             |   1 -
 tests/generic/092             |   0
 tests/generic/093             |   2 -
 tests/generic/094             |   0
 tests/generic/098             |   3 +-
 tests/generic/101             |   1 -
 tests/generic/102             |   1 -
 tests/generic/103             |   0
 tests/generic/104             |   1 -
 tests/generic/106             |   1 -
 tests/generic/107             |   1 -
 tests/generic/113             |   1 +
 tests/generic/116             |   4 +-
 tests/generic/118             |   4 +-
 tests/generic/119             |   6 +-
 tests/generic/121             |   4 +-
 tests/generic/122             |   4 +-
 tests/generic/125             |  68 ---------
 tests/generic/125.out         |   7 -
 tests/generic/134             |   4 +-
 tests/generic/135             |  17 +--
 tests/generic/136             |   4 +-
 tests/generic/137             |   2 +-
 tests/generic/138             |   4 +-
 tests/generic/139             |   4 +-
 tests/generic/140             |   4 +-
 tests/generic/142             |   6 +-
 tests/generic/143             |   6 +-
 tests/generic/144             |   4 +-
 tests/generic/145             |   4 +-
 tests/generic/146             |   4 +-
 tests/generic/147             |   4 +-
 tests/generic/148             |   4 +-
 tests/generic/149             |   4 +-
 tests/generic/150             |   2 +-
 tests/generic/151             |   6 +-
 tests/generic/152             |   6 +-
 tests/generic/153             |   8 +-
 tests/generic/154             |  10 +-
 tests/generic/155             |  10 +-
 tests/generic/156             |  12 +-
 tests/generic/161             |   2 +-
 tests/generic/162             |   2 +-
 tests/generic/163             |   2 +-
 tests/generic/164             |   2 +-
 tests/generic/165             |   2 +-
 tests/generic/166             |   2 +-
 tests/generic/167             |   2 +-
 tests/generic/168             |   2 +-
 tests/generic/169             |  20 +--
 tests/generic/169.out         |   6 +-
 tests/generic/170             |   2 +-
 tests/generic/171             |   2 +-
 tests/generic/172             |   2 +-
 tests/generic/173             |   2 +-
 tests/generic/174             |   2 +-
 tests/generic/175             |   2 +-
 tests/generic/176             |   2 +-
 tests/generic/177             |   1 -
 tests/generic/178             |   4 +-
 tests/generic/179             |   4 +-
 tests/generic/180             |   4 +-
 tests/generic/181             |   2 +-
 tests/generic/182             |   6 +-
 tests/generic/183             |   4 +-
 tests/generic/185             |   4 +-
 tests/generic/186             |   6 +-
 tests/generic/187             |   6 +-
 tests/generic/188             |   4 +-
 tests/generic/189             |   4 +-
 tests/generic/190             |   4 +-
 tests/generic/191             |   4 +-
 tests/generic/192             |   3 +-
 tests/generic/193             |   1 -
 tests/generic/194             |   4 +-
 tests/generic/195             |   4 +-
 tests/generic/196             |   4 +-
 tests/generic/197             |   4 +-
 tests/generic/199             |   4 +-
 tests/generic/200             |   4 +-
 tests/generic/201             |   2 +-
 tests/generic/202             |   4 +-
 tests/generic/203             |   4 +-
 tests/generic/205             |   4 +-
 tests/generic/206             |   4 +-
 tests/generic/214             |   1 +
 tests/generic/216             |   4 +-
 tests/generic/217             |   4 +-
 tests/generic/218             |   4 +-
 tests/generic/220             |   4 +-
 tests/generic/222             |   4 +-
 tests/generic/226             |   3 +-
 tests/generic/227             |   4 +-
 tests/generic/229             |   4 +-
 tests/generic/230             |   1 -
 tests/generic/231             |   1 -
 tests/generic/232             |   1 -
 tests/generic/233             |   1 -
 tests/generic/234             |   1 -
 tests/generic/235             |   1 -
 tests/generic/237             |   1 -
 tests/generic/238             |   4 +-
 tests/generic/242             |   4 +-
 tests/generic/243             |   4 +-
 tests/generic/253             |   6 +-
 tests/generic/254             |   6 +-
 tests/generic/258             |   3 +-
 tests/generic/259             |   6 +-
 tests/generic/261             |   6 +-
 tests/generic/262             |   6 +-
 tests/generic/264             |   6 +-
 tests/generic/265             |   1 -
 tests/generic/266             |   1 -
 tests/generic/267             |   1 -
 tests/generic/268             |   1 -
 tests/generic/269             |   1 -
 tests/generic/270             |   1 -
 tests/generic/271             |   1 -
 tests/generic/272             |   1 -
 tests/generic/273             |   2 +-
 tests/generic/276             |   1 -
 tests/generic/277             |   6 +-
 tests/generic/278             |   1 -
 tests/generic/279             |   1 -
 tests/generic/281             |   1 -
 tests/generic/282             |   1 -
 tests/generic/283             |   1 -
 tests/generic/284             |   4 +-
 tests/generic/287             |   4 +-
 tests/generic/289             |   4 +-
 tests/generic/290             |   4 +-
 tests/generic/291             |   4 +-
 tests/generic/292             |   4 +-
 tests/generic/293             |   4 +-
 tests/generic/295             |   4 +-
 tests/generic/296             |   4 +-
 tests/generic/299             |   1 -
 tests/generic/300             |   1 -
 tests/generic/301             |   4 +-
 tests/generic/302             |   4 +-
 tests/generic/303             |   2 +-
 tests/generic/304             |   2 +-
 tests/generic/305             |   4 +-
 tests/generic/306             |   3 +-
 tests/generic/307             |   4 +-
 tests/generic/311             |   1 -
 tests/generic/312             |  13 +-
 tests/generic/314             |   1 -
 tests/generic/317             |   4 +-
 tests/generic/318             |   4 +-
 tests/generic/319             |   1 -
 tests/generic/321             |   1 -
 tests/generic/322             |   1 -
 tests/generic/324             |   1 -
 tests/generic/325             |   1 -
 tests/generic/326             |   4 +-
 tests/generic/327             |   2 +-
 tests/generic/328             |   2 +-
 tests/generic/330             |   4 +-
 tests/generic/332             |   4 +-
 tests/generic/333             |   2 +-
 tests/generic/334             |   2 +-
 tests/generic/group           |   1 -
 tests/shared/002              |   1 -
 tests/shared/051              |   1 -
 tests/shared/272              |   1 -
 tests/xfs/003                 |   2 -
 tests/xfs/004                 |   1 -
 tests/xfs/067                 |   1 -
 tests/xfs/114                 |   1 -
 tests/xfs/127                 |   2 +-
 tests/xfs/128                 |   6 +-
 tests/xfs/132                 |  12 +-
 tests/xfs/139                 |   4 +-
 tests/xfs/140                 |   4 +-
 tests/xfs/180                 |   4 +-
 tests/xfs/182                 |   4 +-
 tests/xfs/184                 |   4 +-
 tests/xfs/189                 |   1 -
 tests/xfs/192                 |   4 +-
 tests/xfs/193                 |   4 +-
 tests/xfs/198                 |   4 +-
 tests/xfs/200                 |   4 +-
 tests/xfs/204                 |   4 +-
 tests/xfs/207                 |   8 +-
 tests/xfs/208                 |   4 +-
 tests/xfs/209                 |   2 +-
 tests/xfs/211                 |   4 +-
 tests/xfs/212                 |   4 +-
 tests/xfs/213                 |   4 +-
 tests/xfs/214                 |   4 +-
 tests/xfs/215                 |   4 +-
 tests/xfs/218                 |   4 +-
 tests/xfs/219                 |   4 +-
 tests/xfs/221                 |   4 +-
 tests/xfs/223                 |   4 +-
 tests/xfs/224                 |   4 +-
 tests/xfs/225                 |   4 +-
 tests/xfs/226                 |   4 +-
 tests/xfs/228                 |   4 +-
 tests/xfs/230                 |   4 +-
 tests/xfs/231                 |   2 +-
 tests/xfs/232                 |   2 +-
 tests/xfs/233                 |   2 +-
 tests/xfs/239                 |   4 +-
 tests/xfs/241                 |   4 +-
 tests/xfs/243                 |   2 +-
 tests/xfs/245                 |   2 +-
 tests/xfs/248                 |   4 +-
 tests/xfs/249                 |   4 +-
 tests/xfs/251                 |   4 +-
 tests/xfs/254                 |   4 +-
 tests/xfs/255                 |   4 +-
 tests/xfs/256                 |   4 +-
 tests/xfs/257                 |   4 +-
 tests/xfs/258                 |   4 +-
 337 files changed, 766 insertions(+), 640 deletions(-)
 mode change 100644 => 100755 tests/btrfs/026
 mode change 100644 => 100755 tests/btrfs/104
 mode change 100644 => 100755 tests/btrfs/114
 create mode 100644 tests/ext4/001.out.nodelalloc
 mode change 100644 => 100755 tests/generic/058
 mode change 100644 => 100755 tests/generic/060
 mode change 100644 => 100755 tests/generic/061
 mode change 100644 => 100755 tests/generic/063
 mode change 100644 => 100755 tests/generic/092
 mode change 100644 => 100755 tests/generic/094
 mode change 100644 => 100755 tests/generic/103
 delete mode 100755 tests/generic/125
 delete mode 100644 tests/generic/125.out
 mode change 100644 => 100755 tests/xfs/140

-- 
2.5.0


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
@ 2016-02-13 17:40 ` Theodore Ts'o
  2016-02-17  9:58   ` Christoph Hellwig
  2016-02-13 17:40 ` [PATCH 02/16] check: avoid spurious complaints that tests/$FSTYP/group does not exist Theodore Ts'o
                   ` (14 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o, Jan Kara

If the delayed allocation is disabled, we need a slightly different
output for the delayed allocation portion of the tests.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Jan Kara <jack@suse.cz>
---
 tests/ext4/001.cfg            |   2 +
 tests/ext4/001.out.nodelalloc | 337 ++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 339 insertions(+)
 create mode 100644 tests/ext4/001.out.nodelalloc

diff --git a/tests/ext4/001.cfg b/tests/ext4/001.cfg
index 1942203..5f7e262 100644
--- a/tests/ext4/001.cfg
+++ b/tests/ext4/001.cfg
@@ -1,2 +1,4 @@
 dax: nozero
 dioread_nolock: nozero
+nodelalloc: nodelalloc
+data=journal: nodelalloc
diff --git a/tests/ext4/001.out.nodelalloc b/tests/ext4/001.out.nodelalloc
new file mode 100644
index 0000000..212c247
--- /dev/null
+++ b/tests/ext4/001.out.nodelalloc
@@ -0,0 +1,337 @@
+QA output created by 001
+	1. into a hole
+0: [0..7]: hole
+1: [8..23]: unwritten
+2: [24..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	2. into allocated space
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	3. into unwritten space
+0: [0..39]: unwritten
+daa100df6e6711906b61c9ab5aa16032
+	4. hole -> data
+0: [0..7]: hole
+1: [8..23]: unwritten
+2: [24..31]: data
+3: [32..39]: hole
+cc63069677939f69a6e8f68cae6a6dac
+	5. hole -> unwritten
+0: [0..7]: hole
+1: [8..31]: unwritten
+2: [32..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	6. data -> hole
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: hole
+1b3779878366498b28c702ef88c4a773
+	7. data -> unwritten
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: hole
+1b3779878366498b28c702ef88c4a773
+	8. unwritten -> hole
+0: [0..23]: unwritten
+1: [24..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	9. unwritten -> data
+0: [0..23]: unwritten
+1: [24..31]: data
+2: [32..39]: hole
+cc63069677939f69a6e8f68cae6a6dac
+	10. hole -> data -> hole
+0: [0..7]: hole
+1: [8..31]: unwritten
+2: [32..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	11. data -> hole -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	12. unwritten -> data -> unwritten
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+daa100df6e6711906b61c9ab5aa16032
+	13. data -> unwritten -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	14. data -> hole @ EOF
+0: [0..23]: data
+1: [24..39]: unwritten
+e1f024eedd27ea6b1c3e9b841c850404
+	15. data -> hole @ 0
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	16. data -> cache cold ->hole
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+	1. into a hole
+0: [0..7]: hole
+1: [8..23]: unwritten
+2: [24..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	2. into allocated space
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	3. into unwritten space
+0: [0..39]: unwritten
+daa100df6e6711906b61c9ab5aa16032
+	4. hole -> data
+0: [0..7]: hole
+1: [8..23]: unwritten
+2: [24..31]: data
+3: [32..39]: hole
+cc63069677939f69a6e8f68cae6a6dac
+	5. hole -> unwritten
+0: [0..7]: hole
+1: [8..31]: unwritten
+2: [32..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	6. data -> hole
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: hole
+1b3779878366498b28c702ef88c4a773
+	7. data -> unwritten
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: hole
+1b3779878366498b28c702ef88c4a773
+	8. unwritten -> hole
+0: [0..23]: unwritten
+1: [24..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	9. unwritten -> data
+0: [0..23]: unwritten
+1: [24..31]: data
+2: [32..39]: hole
+cc63069677939f69a6e8f68cae6a6dac
+	10. hole -> data -> hole
+0: [0..7]: hole
+1: [8..31]: unwritten
+2: [32..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	11. data -> hole -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	12. unwritten -> data -> unwritten
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+daa100df6e6711906b61c9ab5aa16032
+	13. data -> unwritten -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	14. data -> hole @ EOF
+0: [0..23]: data
+1: [24..39]: unwritten
+e1f024eedd27ea6b1c3e9b841c850404
+	15. data -> hole @ 0
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	16. data -> cache cold ->hole
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+	1. into a hole
+0: [0..7]: hole
+1: [8..23]: unwritten
+2: [24..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	2. into allocated space
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	3. into unwritten space
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	4. hole -> data
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	5. hole -> unwritten
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	6. data -> hole
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	7. data -> unwritten
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	8. unwritten -> hole
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	9. unwritten -> data
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	10. hole -> data -> hole
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	11. data -> hole -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	12. unwritten -> data -> unwritten
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	13. data -> unwritten -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	14. data -> hole @ EOF
+0: [0..23]: data
+1: [24..39]: unwritten
+e1f024eedd27ea6b1c3e9b841c850404
+	15. data -> hole @ 0
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	16. data -> cache cold ->hole
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+	1. into a hole
+0: [0..7]: hole
+1: [8..23]: unwritten
+2: [24..39]: hole
+daa100df6e6711906b61c9ab5aa16032
+	2. into allocated space
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	3. into unwritten space
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	4. hole -> data
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	5. hole -> unwritten
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	6. data -> hole
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	7. data -> unwritten
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	8. unwritten -> hole
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	9. unwritten -> data
+0: [0..7]: data
+1: [8..23]: unwritten
+2: [24..39]: data
+cc58a7417c2d7763adc45b6fcd3fa024
+	10. hole -> data -> hole
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	11. data -> hole -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	12. unwritten -> data -> unwritten
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	13. data -> unwritten -> data
+0: [0..7]: data
+1: [8..31]: unwritten
+2: [32..39]: data
+f6aeca13ec49e5b266cd1c913cd726e3
+	14. data -> hole @ EOF
+0: [0..23]: data
+1: [24..39]: unwritten
+e1f024eedd27ea6b1c3e9b841c850404
+	15. data -> hole @ 0
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	16. data -> cache cold ->hole
+0: [0..15]: unwritten
+1: [16..39]: data
+eecb7aa303d121835de05028751d301c
+	17. data -> hole in single block file
+0: [0..7]: data
+0000000 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
+0000200 0000 0000 0000 0000 0000 0000 0000 0000
+*
+0000400 cdcd cdcd cdcd cdcd cdcd cdcd cdcd cdcd
+*
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 02/16] check: avoid spurious complaints that tests/$FSTYP/group does not exist
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
  2016-02-13 17:40 ` [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts Theodore Ts'o
@ 2016-02-13 17:40 ` Theodore Ts'o
  2016-02-17  9:59   ` Christoph Hellwig
  2016-02-13 17:40 ` [PATCH 03/16] common: _scratch_mkfs_sized() for tmpfs Theodore Ts'o
                   ` (13 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

There are no tmpfs specific tests, so tests/tmpfs does not exist.
This commit avoids printing a spurious error message when running
specifying a group of tests (e.g., "check -g quick"):

  DEVICE: test:/tmp
  MK2FS OPTIONS:
  MOUNT OPTIONS: -o block_validity
  ./check: line 96: tests/tmpfs/group: No such file or directory
  FSTYP         -- tmpfs
  PLATFORM      -- Linux/i686 kvm-xfstests 4.5.0-rc2ext4-00002-g6df2762
  MKFS_OPTIONS  -- test:/scratch
  MOUNT_OPTIONS -- -o size=1G test:/scratch /test/scratch

  generic/001      [10:31:10][    5.811742] run fstests generic/001
      ...

Similar problems have been reported when testing nfs using xfstests.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 check | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/check b/check
index c40d2a8..2986d84 100755
--- a/check
+++ b/check
@@ -90,6 +90,9 @@ get_group_list()
 	grp=$1
 
 	for d in $SRC_GROUPS $FSTYP; do
+		if ! test -d "$SRC_DIR/$d" ; then
+			continue
+		fi
 		l=$(sed -n < $SRC_DIR/$d/group \
 			-e 's/#.*//' \
 			-e 's/$/ /' \
@@ -105,6 +108,9 @@ get_all_tests()
 {
 	touch $tmp.list
 	for d in $SRC_GROUPS $FSTYP; do
+		if ! test -d "$SRC_DIR/$d" ; then
+			continue
+		fi
 		ls $SRC_DIR/$d/* | \
 			grep -v "\..*" | \
 			grep "^$SRC_DIR/$d/$VALID_TEST_NAME"| \
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 03/16] common: _scratch_mkfs_sized() for tmpfs
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
  2016-02-13 17:40 ` [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts Theodore Ts'o
  2016-02-13 17:40 ` [PATCH 02/16] check: avoid spurious complaints that tests/$FSTYP/group does not exist Theodore Ts'o
@ 2016-02-13 17:40 ` Theodore Ts'o
  2016-02-17  9:59   ` Christoph Hellwig
  2016-02-13 17:40 ` [PATCH 04/16] generic: use mount point instead of device name Theodore Ts'o
                   ` (12 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

Enable _scratch_mkfs_sized() for use with tmpfs, so that tests which
use this helper can now run.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/common/rc b/common/rc
index 2d91b69..9006392 100644
--- a/common/rc
+++ b/common/rc
@@ -783,6 +783,12 @@ _scratch_pool_mkfs()
     esac
 }
 
+# Return the amount of free memory available on the system
+_free_memory_bytes()
+{
+    free -b | grep ^Mem | awk '{print $4}'
+}
+
 # Create fs of certain size on scratch device
 # _scratch_mkfs_sized <size in bytes> [optional blocksize]
 _scratch_mkfs_sized()
@@ -813,7 +819,7 @@ _scratch_mkfs_sized()
 
     blocks=`expr $fssize / $blocksize`
 
-    if [ "$HOSTOS" == "Linux" ]; then
+    if [ "$HOSTOS" == "Linux" -a -b "$SCRATCH_DEV" ]; then
 	devsize=`blockdev --getsize64 $SCRATCH_DEV`
 	[ "$fssize" -gt "$devsize" ] && _notrun "Scratch device too small"
     fi
@@ -849,6 +855,13 @@ _scratch_mkfs_sized()
 	sector_size=`blockdev --getss $SCRATCH_DEV`
 	$MKFS_F2FS_PROG $MKFS_OPTIONS $SCRATCH_DEV `expr $fssize / $sector_size`
 	;;
+    tmpfs)
+	free_mem=`_free_memory_bytes`
+	if [ "$free_mem" -lt "$fssize" ] ; then
+	   _notrun "Not enough memory ($free_mem) for tmpfs with $fssize bytes"
+	fi
+	export MOUNT_OPTIONS="-o size=$fssize $TMPFS_MOUNT_OPTIONS"
+	;;
     *)
 	_notrun "Filesystem $FSTYP not supported in _scratch_mkfs_sized"
 	;;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 04/16] generic: use mount point instead of device name
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (2 preceding siblings ...)
  2016-02-13 17:40 ` [PATCH 03/16] common: _scratch_mkfs_sized() for tmpfs Theodore Ts'o
@ 2016-02-13 17:40 ` Theodore Ts'o
  2016-02-17 10:00   ` Christoph Hellwig
  2016-02-13 17:40 ` [PATCH 05/16] generic: remove the generic/125 test Theodore Ts'o
                   ` (11 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

A tmpfs mount does not involve any block device, its $SCRATCH_DEV is
nothing but a place-holder, so apply 'df' or 'stat' to its mount point
$SCRATCH_MNT instead of to $SCRATCH_DEV.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/generic/273 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/generic/273 b/tests/generic/273
index e5af7f1..0a4a600 100755
--- a/tests/generic/273
+++ b/tests/generic/273
@@ -68,7 +68,7 @@ _file_create()
 
 	cd $SCRATCH_MNT/origin
 
-	_disksize=`$DF_PROG -B 1 $SCRATCH_DEV | tail -1 | $AWK_PROG '{ print $5 }'`
+	_disksize=`$DF_PROG -B 1 $SCRATCH_MNT | tail -1 | $AWK_PROG '{ print $5 }'`
 	_disksize=$(($_disksize / 3))
 	_num=$(($_disksize / $count / $threads / 4096))
 	_count=$count
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 05/16] generic: remove the generic/125 test
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (3 preceding siblings ...)
  2016-02-13 17:40 ` [PATCH 04/16] generic: use mount point instead of device name Theodore Ts'o
@ 2016-02-13 17:40 ` Theodore Ts'o
  2016-02-17 10:03   ` Christoph Hellwig
  2016-02-13 17:40 ` [PATCH 06/16] generic: add _require_odirect to generic/113 and generic/214 Theodore Ts'o
                   ` (10 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

Dave Chinner has pointed out this test is largely pointless:

   Perhaps one should question whether generic/125 is actually testing
   anything useful in the first place.

   i.e. it's writing 16k, then truncating it back to 1000 bytes, then
   reading it with direct IO for 60s to see if it returns the correct
   data for that entire time.

   What, exactly, is going to cause that test to fail?

   Keep in mind this was ported from a CXFS test, where the metadata
   server did the truncation operation (including the data zeroing),
   but the reads are being done from the client.  i.e. it was designed
   to test whether a remote machine is doing a truncate correctly on a
   access shared disk.

   IMO, I think we just remove the test, src/trunc.c and src/ftrunc.c
   because it's 60s of testing that doesn't actually provide any value
   to us.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/generic/125     | 68 ---------------------------------------------------
 tests/generic/125.out |  7 ------
 tests/generic/group   |  1 -
 3 files changed, 76 deletions(-)
 delete mode 100755 tests/generic/125
 delete mode 100644 tests/generic/125.out

diff --git a/tests/generic/125 b/tests/generic/125
deleted file mode 100755
index bcf9b3e..0000000
--- a/tests/generic/125
+++ /dev/null
@@ -1,68 +0,0 @@
-#! /bin/bash
-# FSQA Test No. 125
-#
-# ftruncate test, modified from CXFSQA tests cxfs_ftrunc and cxfs_trunc
-#
-#-----------------------------------------------------------------------
-# Copyright (c) 2006 Silicon Graphics, Inc.  All Rights Reserved.
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it would be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write the Free Software Foundation,
-# Inc.,  51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
-#
-#-----------------------------------------------------------------------
-#
-
-seq=`basename $0`
-seqres=$RESULT_DIR/$seq
-echo "QA output created by $seq"
-
-here=`pwd`
-tmp=/tmp/$$
-status=1	# failure is the default!
-trap "exit \$status" 0 1 2 3 15
-
-# get standard environment, filters and checks
-. ./common/rc
-. ./common/filter
-
-# real QA test starts here
-_supported_fs generic
-_supported_os Linux
-
-_require_test
-_require_user
-
-TESTDIR=$TEST_DIR/ftrunc
-TESTFILE=$TESTDIR/ftrunc.tmp
-
-[ -d $TESTDIR ] && rm -r $TESTDIR
-mkdir $TESTDIR
-
-# ftrunc must be run as a mortal user.
-touch $TESTFILE
-
-chmod a+rw $TESTDIR
-chmod a+rw $TESTFILE
-
-su $qa_user -c "./src/ftrunc -f $TESTFILE"
-
-if [ "$?" != "0" ];  then
-    echo src/ftrunc returned non 0 status!
-fi
-
-src/trunc -f $TESTFILE
-if (test $? -eq 0 ) then
-    status=0
-fi
-
-exit
diff --git a/tests/generic/125.out b/tests/generic/125.out
deleted file mode 100644
index db7afc5..0000000
--- a/tests/generic/125.out
+++ /dev/null
@@ -1,7 +0,0 @@
-QA output created by 125
-direct write of 1's into file
-buffered write of 2's into file
-truncate file
-sync buffered data (2's)
-iterate direct reads for 60s or until failure...
-Passed
diff --git a/tests/generic/group b/tests/generic/group
index 5f699ce..0604caf 100644
--- a/tests/generic/group
+++ b/tests/generic/group
@@ -127,7 +127,6 @@
 122 auto quick clone dedupe
 123 perms auto quick
 124 pattern auto quick
-125 other auto
 126 perms auto quick
 127 rw auto
 128 perms auto quick
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 06/16] generic: add _require_odirect to generic/113 and generic/214
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (4 preceding siblings ...)
  2016-02-13 17:40 ` [PATCH 05/16] generic: remove the generic/125 test Theodore Ts'o
@ 2016-02-13 17:40 ` Theodore Ts'o
  2016-02-17 10:03   ` Christoph Hellwig
  2016-02-13 17:41 ` [PATCH 07/16] Rename _scratch_mount to _scratch_cycle_mount Theodore Ts'o
                   ` (9 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:40 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

generic/113 and generic/214 both use O_DIRECT at some stage in their
tests, so check O_DIRECT support before running them.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/generic/113 | 1 +
 tests/generic/214 | 1 +
 2 files changed, 2 insertions(+)

diff --git a/tests/generic/113 b/tests/generic/113
index 7208fa2..54d6191 100755
--- a/tests/generic/113
+++ b/tests/generic/113
@@ -77,6 +77,7 @@ _do_test()
 _supported_fs generic
 _supported_os Linux
 _require_test
+_require_odirect
 
 [ -x $here/ltp/aio-stress ] || _notrun "aio-stress not built for this platform"
 
diff --git a/tests/generic/214 b/tests/generic/214
index dff267e..7838047 100755
--- a/tests/generic/214
+++ b/tests/generic/214
@@ -55,6 +55,7 @@ rm -f $seqres.full
 rm -f $TEST_DIR/ouch*
 
 _require_xfs_io_command "falloc"
+_require_odirect
 
 # Ok, off we go.
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 07/16] Rename _scratch_mount to _scratch_cycle_mount
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (5 preceding siblings ...)
  2016-02-13 17:40 ` [PATCH 06/16] generic: add _require_odirect to generic/113 and generic/214 Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-13 17:41 ` [PATCH 08/16] Rename _test_mount to _test_cycle_mount Theodore Ts'o
                   ` (8 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

This makes it clear when we are using "mount ; umount" versus "mount
-o remount" for most file systems.  The reason for this distinction is
(a) tests may want to test the difference between what happens on the
remount versus the munt paths, (b) with tmpfs, "mount ; umount" will
cause the contents of all of the files to disappear which makes many
tests sad, and (c) some mount options may not be changed using "mount
-o remount".

Currently _scratch_mount performs "_scratch_mount ; _scratch_umount"
so mechnically rename this function to _scratch_cycle_mount.  This was
done mechnically using the script fragment:

git grep "_scratch_remount" | \
	awk -F: '{print $1}' | sort -u | \
	xargs sed -i 's/_scratch_remount/_scratch_cycle_mount/g'

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/defrag     | 2 +-
 common/rc         | 2 +-
 tests/btrfs/001   | 6 +++---
 tests/btrfs/005   | 2 +-
 tests/btrfs/026   | 2 +-
 tests/btrfs/052   | 2 +-
 tests/btrfs/081   | 2 +-
 tests/btrfs/088   | 2 +-
 tests/btrfs/102   | 2 +-
 tests/btrfs/103   | 2 +-
 tests/btrfs/104   | 2 +-
 tests/btrfs/106   | 2 +-
 tests/f2fs/001    | 2 +-
 tests/generic/029 | 6 +++---
 tests/generic/030 | 6 +++---
 tests/generic/031 | 2 +-
 tests/generic/032 | 2 +-
 tests/generic/033 | 2 +-
 tests/generic/071 | 2 +-
 tests/generic/098 | 2 +-
 tests/generic/161 | 2 +-
 tests/generic/162 | 2 +-
 tests/generic/163 | 2 +-
 tests/generic/164 | 2 +-
 tests/generic/165 | 2 +-
 tests/generic/166 | 2 +-
 tests/generic/167 | 2 +-
 tests/generic/168 | 2 +-
 tests/generic/170 | 2 +-
 tests/generic/171 | 2 +-
 tests/generic/172 | 2 +-
 tests/generic/173 | 2 +-
 tests/generic/174 | 2 +-
 tests/generic/175 | 2 +-
 tests/generic/176 | 2 +-
 tests/generic/183 | 4 ++--
 tests/generic/185 | 4 ++--
 tests/generic/186 | 6 +++---
 tests/generic/187 | 6 +++---
 tests/generic/188 | 4 ++--
 tests/generic/189 | 4 ++--
 tests/generic/190 | 4 ++--
 tests/generic/191 | 4 ++--
 tests/generic/194 | 4 ++--
 tests/generic/195 | 4 ++--
 tests/generic/196 | 4 ++--
 tests/generic/197 | 4 ++--
 tests/generic/199 | 4 ++--
 tests/generic/200 | 4 ++--
 tests/generic/201 | 2 +-
 tests/generic/202 | 4 ++--
 tests/generic/203 | 4 ++--
 tests/generic/205 | 4 ++--
 tests/generic/206 | 4 ++--
 tests/generic/216 | 4 ++--
 tests/generic/217 | 4 ++--
 tests/generic/218 | 4 ++--
 tests/generic/220 | 4 ++--
 tests/generic/222 | 4 ++--
 tests/generic/227 | 4 ++--
 tests/generic/229 | 4 ++--
 tests/generic/238 | 4 ++--
 tests/generic/242 | 4 ++--
 tests/generic/243 | 4 ++--
 tests/generic/253 | 6 +++---
 tests/generic/254 | 6 +++---
 tests/generic/259 | 6 +++---
 tests/generic/261 | 6 +++---
 tests/generic/262 | 6 +++---
 tests/generic/264 | 6 +++---
 tests/generic/277 | 4 ++--
 tests/generic/284 | 4 ++--
 tests/generic/287 | 4 ++--
 tests/generic/289 | 4 ++--
 tests/generic/290 | 4 ++--
 tests/generic/291 | 4 ++--
 tests/generic/292 | 4 ++--
 tests/generic/293 | 4 ++--
 tests/generic/295 | 4 ++--
 tests/generic/296 | 4 ++--
 tests/generic/301 | 4 ++--
 tests/generic/302 | 4 ++--
 tests/generic/305 | 4 ++--
 tests/generic/307 | 4 ++--
 tests/generic/326 | 4 ++--
 tests/generic/327 | 2 +-
 tests/generic/328 | 2 +-
 tests/generic/330 | 4 ++--
 tests/generic/332 | 4 ++--
 tests/generic/333 | 2 +-
 tests/generic/334 | 2 +-
 tests/xfs/127     | 2 +-
 tests/xfs/139     | 4 ++--
 tests/xfs/140     | 4 ++--
 tests/xfs/180     | 4 ++--
 tests/xfs/182     | 4 ++--
 tests/xfs/184     | 4 ++--
 tests/xfs/192     | 4 ++--
 tests/xfs/193     | 4 ++--
 tests/xfs/198     | 4 ++--
 tests/xfs/200     | 4 ++--
 tests/xfs/204     | 4 ++--
 tests/xfs/207     | 8 ++++----
 tests/xfs/208     | 4 ++--
 tests/xfs/209     | 2 +-
 tests/xfs/211     | 4 ++--
 tests/xfs/212     | 4 ++--
 tests/xfs/213     | 4 ++--
 tests/xfs/214     | 4 ++--
 tests/xfs/215     | 4 ++--
 tests/xfs/218     | 4 ++--
 tests/xfs/219     | 4 ++--
 tests/xfs/221     | 4 ++--
 tests/xfs/223     | 4 ++--
 tests/xfs/224     | 4 ++--
 tests/xfs/225     | 4 ++--
 tests/xfs/226     | 4 ++--
 tests/xfs/228     | 4 ++--
 tests/xfs/230     | 4 ++--
 tests/xfs/231     | 2 +-
 tests/xfs/232     | 2 +-
 tests/xfs/233     | 2 +-
 tests/xfs/239     | 4 ++--
 tests/xfs/241     | 4 ++--
 tests/xfs/243     | 2 +-
 tests/xfs/245     | 2 +-
 tests/xfs/248     | 4 ++--
 tests/xfs/249     | 4 ++--
 tests/xfs/251     | 4 ++--
 tests/xfs/254     | 4 ++--
 tests/xfs/255     | 4 ++--
 tests/xfs/256     | 4 ++--
 tests/xfs/257     | 4 ++--
 tests/xfs/258     | 4 ++--
 134 files changed, 237 insertions(+), 237 deletions(-)

diff --git a/common/defrag b/common/defrag
index d2b137e..942593e 100644
--- a/common/defrag
+++ b/common/defrag
@@ -144,7 +144,7 @@ _defrag()
 	STAT_BEFORE=`stat -c "a: %x m: %y c: %z" $1`
 	$DEFRAG_PROG -v $1 >> $seqres.full 2>&1
 
-	_scratch_remount
+	_scratch_cycle_mount
 	STAT_AFTER=`stat -c "a: %x m: %y c: %z" $1`
 	[ ! -z $csum ] && CSUM_AFTER=`md5sum $1`
 
diff --git a/common/rc b/common/rc
index 9006392..509e524 100644
--- a/common/rc
+++ b/common/rc
@@ -329,7 +329,7 @@ _scratch_unmount()
 	esac
 }
 
-_scratch_remount()
+_scratch_cycle_mount()
 {
     _scratch_unmount
     _scratch_mount
diff --git a/tests/btrfs/001 b/tests/btrfs/001
index 8258d06..005791d 100755
--- a/tests/btrfs/001
+++ b/tests/btrfs/001
@@ -80,7 +80,7 @@ dd if=/dev/zero of=$SCRATCH_MNT/subvol/bar bs=1M count=1 &> /dev/null
 echo "Setting subvol to the default"
 subvolid=$(_btrfs_get_subvolid $SCRATCH_MNT subvol)
 $BTRFS_UTIL_PROG subvolume set-default $subvolid $SCRATCH_MNT | _filter_scratch
-_scratch_remount
+_scratch_cycle_mount
 echo "List root dir which is now subvol"
 ls $SCRATCH_MNT
 _scratch_unmount
@@ -90,7 +90,7 @@ echo "List root dir"
 ls $SCRATCH_MNT
 echo "Setting the root dir as the default again"
 $BTRFS_UTIL_PROG subvolume set-default 0 $SCRATCH_MNT | _filter_scratch
-_scratch_remount
+_scratch_cycle_mount
 echo "List root dir"
 ls $SCRATCH_MNT
 
@@ -102,7 +102,7 @@ $BTRFS_UTIL_PROG subvolume list $SCRATCH_MNT | awk '{ print $NF }'
 $BTRFS_UTIL_PROG subvolume delete $SCRATCH_MNT/snap | _filter_btrfs_subvol_delete
 echo "List root dir"
 ls $SCRATCH_MNT
-_scratch_remount
+_scratch_cycle_mount
 echo "List root dir"
 ls $SCRATCH_MNT
 
diff --git a/tests/btrfs/005 b/tests/btrfs/005
index c048ab5..9236501 100755
--- a/tests/btrfs/005
+++ b/tests/btrfs/005
@@ -88,7 +88,7 @@ _btrfs_online_defrag()
 		fi
 	fi
 	ret_val=$?
-	_scratch_remount
+	_scratch_cycle_mount
 	# Older defrag returned "20" for success
 	# e9393c2 btrfs-progs: defrag return zero on success
 	if [ $ret_val -ne 0 -a $ret_val -ne 20 ]; then
diff --git a/tests/btrfs/026 b/tests/btrfs/026
index 0477ed4..60908cc 100644
--- a/tests/btrfs/026
+++ b/tests/btrfs/026
@@ -99,7 +99,7 @@ $XFS_IO_PROG -d -c "pwrite -S 0xbb -b 256M 3M 256M" $SCRATCH_MNT/bar \
 echo "File digests before remounting the file system:"
 md5sum $SCRATCH_MNT/foo | _filter_scratch
 md5sum $SCRATCH_MNT/bar | _filter_scratch
-_scratch_remount
+_scratch_cycle_mount
 echo "File digests after remounting the file system:"
 md5sum $SCRATCH_MNT/foo | _filter_scratch
 md5sum $SCRATCH_MNT/bar | _filter_scratch
diff --git a/tests/btrfs/052 b/tests/btrfs/052
index b760b92..babc127 100755
--- a/tests/btrfs/052
+++ b/tests/btrfs/052
@@ -149,7 +149,7 @@ test_btrfs_clone_same_file()
 	# Check that after defragmenting the file and re-mounting, the file
 	# content remains exactly the same as before.
 	_run_btrfs_util_prog filesystem defragment $SCRATCH_MNT/foo
-	_scratch_remount
+	_scratch_cycle_mount
 	od -t x1 $SCRATCH_MNT/foo | _filter_od
 
 	# Verify that there are no consistency errors.
diff --git a/tests/btrfs/081 b/tests/btrfs/081
index 51d0e84..40fa426 100755
--- a/tests/btrfs/081
+++ b/tests/btrfs/081
@@ -127,7 +127,7 @@ md5sum $SCRATCH_MNT/bar | _filter_scratch
 
 # Validate the content of bar still matches foo's content even after
 # clearing all of bar's data from the page cache.
-_scratch_remount
+_scratch_cycle_mount
 echo "Verifying target file digest after umount + mount"
 md5sum $SCRATCH_MNT/bar | _filter_scratch
 
diff --git a/tests/btrfs/088 b/tests/btrfs/088
index ca11c25..79268ec 100755
--- a/tests/btrfs/088
+++ b/tests/btrfs/088
@@ -121,7 +121,7 @@ $FSTRIM_PROG $SCRATCH_MNT
 
 # We expect to be able to mount the fs again and have available all metadata and
 # data that got persisted in the first transaction.
-_scratch_remount
+_scratch_cycle_mount
 
 # We now expect file's foo content to match what it had when the first
 # transaction was committed because the second transaction was aborted and we
diff --git a/tests/btrfs/102 b/tests/btrfs/102
index a94e3f6..9f0bea0 100755
--- a/tests/btrfs/102
+++ b/tests/btrfs/102
@@ -74,7 +74,7 @@ _run_btrfs_util_prog balance start -dusage=0 $SCRATCH_MNT
 # object was marked as full when initialized (because it had 0 total bytes),
 # which prevented the file write path from attempting to allocate a data block
 # group and fail immediately with ENOSPC.
-_scratch_remount
+_scratch_cycle_mount
 echo "hello world" > $SCRATCH_MNT/foobar
 
 echo "Silence is golden"
diff --git a/tests/btrfs/103 b/tests/btrfs/103
index 9d11d0f..a5a252a 100755
--- a/tests/btrfs/103
+++ b/tests/btrfs/103
@@ -95,7 +95,7 @@ test_clone_and_read_compressed_extent()
 	# exclusively in the read path). The issue happened only if the same
 	# readpages() call targeted pages belonging to the first and second
 	# ranges that point to the same compressed extent.
-	_scratch_remount
+	_scratch_cycle_mount
 
 	echo "File contents after mounting filesystem again:"
 	# Must match the same contents we got before.
diff --git a/tests/btrfs/104 b/tests/btrfs/104
index 80161a3..efc0d74 100644
--- a/tests/btrfs/104
+++ b/tests/btrfs/104
@@ -132,7 +132,7 @@ _run_btrfs_util_prog quota enable $SCRATCH_MNT
 _run_btrfs_util_prog quota rescan -w $SCRATCH_MNT
 
 # Remount to clear cache, force everything to disk
-_scratch_remount
+_scratch_cycle_mount
 
 # Finally, delete snap1 to trigger btrfs_drop_snapshot(). This
 # snapshot is most interesting to delete because it will cause some
diff --git a/tests/btrfs/106 b/tests/btrfs/106
index 30c43fa..c7e61f7 100755
--- a/tests/btrfs/106
+++ b/tests/btrfs/106
@@ -82,7 +82,7 @@ test_clone_and_read_compressed_extent()
 	# bug exclusively in the read path of compressed extents, the correct
 	# data was stored on disk, btrfs just failed to fill in the pages
 	# correctly.
-	_scratch_remount
+	_scratch_cycle_mount
 
 	echo "File contents after remount:"
 	# Must match the digest we got before.
diff --git a/tests/f2fs/001 b/tests/f2fs/001
index 9c4425a..c84dbde 100755
--- a/tests/f2fs/001
+++ b/tests/f2fs/001
@@ -76,7 +76,7 @@ $testfile | _filter_xfs_io
 
 echo "==== check data contents ===="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 hexdump -C $testfile
 
 rm $testfile
diff --git a/tests/generic/029 b/tests/generic/029
index 854794e..a83d02d 100755
--- a/tests/generic/029
+++ b/tests/generic/029
@@ -69,7 +69,7 @@ $testfile | _filter_xfs_io
 
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
@@ -94,7 +94,7 @@ $testfile | _filter_xfs_io
  
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
@@ -114,7 +114,7 @@ $testfile | _filter_xfs_io
  
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
diff --git a/tests/generic/030 b/tests/generic/030
index 9947b96..8e6827d 100755
--- a/tests/generic/030
+++ b/tests/generic/030
@@ -74,7 +74,7 @@ $testfile | _filter_xfs_io
 
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
@@ -103,7 +103,7 @@ $testfile | _filter_xfs_io
 
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
@@ -139,7 +139,7 @@ $testfile | _filter_xfs_io
 
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
diff --git a/tests/generic/031 b/tests/generic/031
index 7d615c0..fcb5f89 100755
--- a/tests/generic/031
+++ b/tests/generic/031
@@ -64,7 +64,7 @@ $testfile | _filter_xfs_io
 
 echo "==== Pre-Remount ==="
 hexdump -C $testfile
-_scratch_remount
+_scratch_cycle_mount
 echo "==== Post-Remount =="
 hexdump -C $testfile
 
diff --git a/tests/generic/032 b/tests/generic/032
index 53fb3de..8f48884 100755
--- a/tests/generic/032
+++ b/tests/generic/032
@@ -104,7 +104,7 @@ kill $syncpid
 wait
 
 # clear page cache and dump the file
-_scratch_remount
+_scratch_cycle_mount
 hexdump $SCRATCH_MNT/file
 
 status=0
diff --git a/tests/generic/033 b/tests/generic/033
index d221fcd..4f8bb92 100755
--- a/tests/generic/033
+++ b/tests/generic/033
@@ -77,7 +77,7 @@ for i in $(seq 4096 8192 $endoff); do
 	$XFS_IO_PROG -c "fzero -k $i 4k" $file >> $seqres.full 2>&1
 done
 
-_scratch_remount
+_scratch_cycle_mount
 hexdump $file
 
 status=0
diff --git a/tests/generic/071 b/tests/generic/071
index 7aaaed7..1b0f558 100755
--- a/tests/generic/071
+++ b/tests/generic/071
@@ -68,7 +68,7 @@ $XFS_IO_PROG -c "falloc 0 512K" $SCRATCH_MNT/foo
 
 # Now ummount and mount again the fs. After this we expect the file's size to
 # be 512Kb.
-_scratch_remount
+_scratch_cycle_mount
 
 # Now check that all data we wrote before are available and the file size is
 # 512Kb.
diff --git a/tests/generic/098 b/tests/generic/098
index 77dd492..4945630 100755
--- a/tests/generic/098
+++ b/tests/generic/098
@@ -80,7 +80,7 @@ $XFS_IO_PROG -c "pwrite -S 0xbb 256K 32K" $SCRATCH_MNT/foo | _filter_xfs_io
 # up being written to disk.
 $XFS_IO_PROG -c "truncate 160K" $SCRATCH_MNT/foo
 
-_scratch_remount
+_scratch_cycle_mount
 
 # We expect to see a file with a size of 160Kb, with the first 128Kb of data all
 # having the value 0xaa and the remaining 32Kb of data all having the value 0x00
diff --git a/tests/generic/161 b/tests/generic/161
index 7776b83..c62e0fb 100755
--- a/tests/generic/161
+++ b/tests/generic/161
@@ -61,7 +61,7 @@ echo "Initialize files"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Delete while rewriting"
 rm -rf $testdir/file1 &
diff --git a/tests/generic/162 b/tests/generic/162
index 6d5bb7a..c42c25a 100755
--- a/tests/generic/162
+++ b/tests/generic/162
@@ -61,7 +61,7 @@ echo "Initialize files"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 overwrite() {
 	while [ ! -e $testdir/finished ]; do
diff --git a/tests/generic/163 b/tests/generic/163
index b9b0cd7..4e916c6 100755
--- a/tests/generic/163
+++ b/tests/generic/163
@@ -61,7 +61,7 @@ echo "Initialize files"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 overwrite() {
 	while [ ! -e $testdir/finished ]; do
diff --git a/tests/generic/164 b/tests/generic/164
index 6c12724..e2ef55f 100755
--- a/tests/generic/164
+++ b/tests/generic/164
@@ -64,7 +64,7 @@ echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file3
-_scratch_remount
+_scratch_cycle_mount
 
 fbytes() {
 	egrep -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)'
diff --git a/tests/generic/165 b/tests/generic/165
index 1ae08a4..fc2ac1b 100755
--- a/tests/generic/165
+++ b/tests/generic/165
@@ -65,7 +65,7 @@ echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file3
-_scratch_remount
+_scratch_cycle_mount
 
 fbytes() {
 	egrep -v '(61 61 61 61 61 61 61 61 61 61 61 61 61 61 61 61|62 62 62 62 62 62 62 62 62 62 62 62 62 62 62 62)'
diff --git a/tests/generic/166 b/tests/generic/166
index a1e4ff4..831b598 100755
--- a/tests/generic/166
+++ b/tests/generic/166
@@ -63,7 +63,7 @@ blksz=65536
 echo "Initialize file"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 # Snapshot creator...
 snappy() {
diff --git a/tests/generic/167 b/tests/generic/167
index 76969c1..355a2bf 100755
--- a/tests/generic/167
+++ b/tests/generic/167
@@ -62,7 +62,7 @@ blksz=65536
 echo "Initialize file"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 # Snapshot creator...
 snappy() {
diff --git a/tests/generic/168 b/tests/generic/168
index bb4a5a1..98e6f30 100755
--- a/tests/generic/168
+++ b/tests/generic/168
@@ -62,7 +62,7 @@ echo "Initialize files"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 # Direct I/O overwriter...
 overwrite() {
diff --git a/tests/generic/170 b/tests/generic/170
index 0f29b3a..4f34f3b 100755
--- a/tests/generic/170
+++ b/tests/generic/170
@@ -63,7 +63,7 @@ echo "Initialize files"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 0 $((loops * blksz)) $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 # Direct I/O overwriter...
 overwrite() {
diff --git a/tests/generic/171 b/tests/generic/171
index 8a3f246..f391685 100755
--- a/tests/generic/171
+++ b/tests/generic/171
@@ -87,7 +87,7 @@ echo ${out} >> $seqres.full 2>&1
 echo ${out}
 
 echo "Remount and try CoW again"
-_scratch_remount
+_scratch_cycle_mount
 
 out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
 echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
diff --git a/tests/generic/172 b/tests/generic/172
index 3e32644..26fb305 100755
--- a/tests/generic/172
+++ b/tests/generic/172
@@ -87,7 +87,7 @@ echo ${out} >> $seqres.full 2>&1
 echo ${out}
 
 echo "Remount and try CoW again"
-_scratch_remount
+_scratch_cycle_mount
 
 out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
 echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
diff --git a/tests/generic/173 b/tests/generic/173
index fe085a6..c5fac9e 100755
--- a/tests/generic/173
+++ b/tests/generic/173
@@ -88,7 +88,7 @@ if [ $err -lt 128 ]; then
 fi
 
 echo "Remount and try CoW again"
-_scratch_remount
+_scratch_cycle_mount
 
 out="$(_mwrite_byte 0x62 0 $((blksz * nr_blks)) $((blksz * nr_blks)) $testdir/bigfile 2>&1)"
 err="$?"
diff --git a/tests/generic/174 b/tests/generic/174
index edfc2bc..8077d76 100755
--- a/tests/generic/174
+++ b/tests/generic/174
@@ -88,7 +88,7 @@ echo ${out} >> $seqres.full 2>&1
 echo ${out}
 
 echo "Remount and try CoW again"
-_scratch_remount
+_scratch_cycle_mount
 
 out="$(_pwrite_byte 0x62 0 $((blksz * nr_blks)) $testdir/bigfile -d 2>&1)"
 echo ${out} | grep -q "No space left on device" || echo "CoW should have failed with ENOSPC"
diff --git a/tests/generic/175 b/tests/generic/175
index 56e9919..964580c 100755
--- a/tests/generic/175
+++ b/tests/generic/175
@@ -67,7 +67,7 @@ for i in $(seq 0 $fnr); do
 	n=$(( (2 ** i) * blksz))
 	_reflink_range "$testdir/file1" 0 "$testdir/file1" $n $n >> "$seqres.full"
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Reflink the big file"
 blks=$((2 ** (fnr + 1) ))
diff --git a/tests/generic/176 b/tests/generic/176
index a77a16d..f7d6495 100755
--- a/tests/generic/176
+++ b/tests/generic/176
@@ -79,7 +79,7 @@ echo "creating $blocks_needed blocks..." >> "$seqres.full"
 echo "punching..." >> "$seqres.full"
 "$here/src/punch-alternating" "$testdir/file1" >> "$seqres.full"
 echo "...done" >> "$seqres.full"
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Reflink the big file"
 bytes=$((blocks_needed * blksz))
diff --git a/tests/generic/183 b/tests/generic/183
index 0ab4afe..24adf97 100755
--- a/tests/generic/183
+++ b/tests/generic/183
@@ -74,7 +74,7 @@ seq 1 2 $((nr-1)) | while read f; do
 	_reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
 	_pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -87,7 +87,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/185 b/tests/generic/185
index 28826d0..49feaf3 100755
--- a/tests/generic/185
+++ b/tests/generic/185
@@ -73,7 +73,7 @@ seq 1 2 $((nr-1)) | while read f; do
 	_reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
 	_pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -86,7 +86,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/186 b/tests/generic/186
index 9839a22..70a0280 100755
--- a/tests/generic/186
+++ b/tests/generic/186
@@ -116,10 +116,10 @@ seq 1 2 $((nr-1)) | while read f; do
 	_reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
 	_pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 _fragment_freesp $testdir/bigfile >> $seqres.full 2>&1
 filesize=$((blksz * nr))
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -132,7 +132,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/187 b/tests/generic/187
index ac6037d..25cbcd9 100755
--- a/tests/generic/187
+++ b/tests/generic/187
@@ -117,10 +117,10 @@ seq 1 2 $((nr-1)) | while read f; do
 	_reflink_range $testdir/file2 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
 	_pwrite_byte 0x62 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 _fragment_freesp $testdir/bigfile >> $seqres.full 2>&1
 filesize=$((blksz * nr))
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -133,7 +133,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/188 b/tests/generic/188
index bb293b1..19d3f56 100755
--- a/tests/generic/188
+++ b/tests/generic/188
@@ -65,7 +65,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -77,7 +77,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/189 b/tests/generic/189
index 5b409be..14cfef9 100755
--- a/tests/generic/189
+++ b/tests/generic/189
@@ -64,7 +64,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,7 +76,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/190 b/tests/generic/190
index b4de3ed..3009bfe 100755
--- a/tests/generic/190
+++ b/tests/generic/190
@@ -65,7 +65,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -77,7 +77,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/191 b/tests/generic/191
index cfedcde..36af284 100755
--- a/tests/generic/191
+++ b/tests/generic/191
@@ -64,7 +64,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,7 +76,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/194 b/tests/generic/194
index f67e567..9edbe2c 100755
--- a/tests/generic/194
+++ b/tests/generic/194
@@ -66,7 +66,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -79,7 +79,7 @@ cowsz=$((filesize / 2))
 _weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/195 b/tests/generic/195
index 51f10f3..98954d5 100755
--- a/tests/generic/195
+++ b/tests/generic/195
@@ -65,7 +65,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -78,7 +78,7 @@ cowsz=$((filesize / 2))
 _weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/196 b/tests/generic/196
index 3fcf522..69e7c04 100755
--- a/tests/generic/196
+++ b/tests/generic/196
@@ -65,7 +65,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -77,7 +77,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/197 b/tests/generic/197
index b40ea93..0fc0c5e 100755
--- a/tests/generic/197
+++ b/tests/generic/197
@@ -64,7 +64,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,7 +76,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/199 b/tests/generic/199
index 04380ed..0ac4762 100755
--- a/tests/generic/199
+++ b/tests/generic/199
@@ -71,7 +71,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -85,7 +85,7 @@ _weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 # now cow
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/200 b/tests/generic/200
index 2aa0315..5d7da84 100755
--- a/tests/generic/200
+++ b/tests/generic/200
@@ -71,7 +71,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -85,7 +85,7 @@ _weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 # now cow
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/201 b/tests/generic/201
index 634dec9..547f194 100755
--- a/tests/generic/201
+++ b/tests/generic/201
@@ -66,7 +66,7 @@ seq 0 2 $((nr-1)) | while read f; do
 	_reflink_range $testdir/file1 $((blksz * f)) $testdir/file3 $((blksz * f)) $blksz >> $seqres.full
 	_pwrite_byte 0x61 $((blksz * f)) $blksz $testdir/file3.chk >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/202 b/tests/generic/202
index a7f4004..14c94af 100755
--- a/tests/generic/202
+++ b/tests/generic/202
@@ -59,7 +59,7 @@ blksz=65536
 _pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2
 _pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -69,7 +69,7 @@ md5sum $testdir/file2.chk | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) 17" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) 17" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/203 b/tests/generic/203
index 2ffb311..a7d0bcc 100755
--- a/tests/generic/203
+++ b/tests/generic/203
@@ -60,7 +60,7 @@ blksz=65536
 _pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2
 _pwrite_byte 0x61 0 $((blksz + 17)) $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -70,7 +70,7 @@ md5sum $testdir/file2.chk | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $blksz" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $blksz" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/205 b/tests/generic/205
index 683849e..65c3563 100755
--- a/tests/generic/205
+++ b/tests/generic/205
@@ -77,7 +77,7 @@ _pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -86,7 +86,7 @@ cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't mat
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/206 b/tests/generic/206
index 6b3e200..0d8006f 100755
--- a/tests/generic/206
+++ b/tests/generic/206
@@ -78,7 +78,7 @@ _pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -87,7 +87,7 @@ cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't mat
 echo "CoW and unmount"
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/216 b/tests/generic/216
index d9f7e21..29fa6a0 100755
--- a/tests/generic/216
+++ b/tests/generic/216
@@ -78,7 +78,7 @@ _pwrite_byte 0x00 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -87,7 +87,7 @@ cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't mat
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/217 b/tests/generic/217
index ce8e0a1..3843a8b 100755
--- a/tests/generic/217
+++ b/tests/generic/217
@@ -79,7 +79,7 @@ _pwrite_byte 0x00 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -88,7 +88,7 @@ cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't mat
 echo "CoW and unmount"
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/218 b/tests/generic/218
index ecc009a..6e7f465 100755
--- a/tests/generic/218
+++ b/tests/generic/218
@@ -72,7 +72,7 @@ $XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -81,7 +81,7 @@ cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't mat
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/220 b/tests/generic/220
index 3bce21b..d3ee888 100755
--- a/tests/generic/220
+++ b/tests/generic/220
@@ -73,7 +73,7 @@ $XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -82,7 +82,7 @@ cmp -s $testdir/file2 $testdir/file2.chk || _fail "file2 and file2.chk don't mat
 echo "CoW and unmount"
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/222 b/tests/generic/222
index 58ca8f5..7de8ad6 100755
--- a/tests/generic/222
+++ b/tests/generic/222
@@ -72,7 +72,7 @@ $XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -87,7 +87,7 @@ _pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/227 b/tests/generic/227
index 00985d3..daac550 100755
--- a/tests/generic/227
+++ b/tests/generic/227
@@ -73,7 +73,7 @@ $XFS_IO_PROG -f -c "truncate $pagesz" $testdir/file2.chk >> $seqres.full
 
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) $blksz >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
@@ -88,7 +88,7 @@ _pwrite_byte 0x61 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/229 b/tests/generic/229
index b6359e8..a307408 100755
--- a/tests/generic/229
+++ b/tests/generic/229
@@ -107,7 +107,7 @@ runtest() {
 
 	_reflink_range $dir/file1 $blksz $dir/file2 $((blksz * 2)) $blksz >> $seqres.full
 	_pwrite_byte 0x61 $((blksz * 2)) $blksz $dir/file2.chk >> $seqres.full
-	_scratch_remount
+	_scratch_cycle_mount
 
 	echo "Compare files"
 	! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
@@ -126,7 +126,7 @@ runtest() {
 
 	$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $dir/file2 >> $seqres.full
 	$XFS_IO_PROG -f -c "pwrite -S 0x63 $((blksz + 17)) $((blksz * 3 - 34))" $dir/file2.chk >> $seqres.full
-	_scratch_remount
+	_scratch_cycle_mount
 
 	echo "Compare files"
 	! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/238 b/tests/generic/238
index 3b46492..38e3aac 100755
--- a/tests/generic/238
+++ b/tests/generic/238
@@ -108,7 +108,7 @@ runtest() {
 
 	_reflink_range $dir/file1 $blksz $dir/file2 $((blksz * 2)) $blksz >> $seqres.full
 	_pwrite_byte 0x61 $((blksz * 2)) $blksz $dir/file2.chk >> $seqres.full
-	_scratch_remount
+	_scratch_cycle_mount
 
 	echo "Compare files"
 	! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
@@ -127,7 +127,7 @@ runtest() {
 
 	$XFS_IO_PROG -d -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $dir/file2 >> $seqres.full
 	$XFS_IO_PROG -f -c "pwrite -S 0x63 $blksz $((blksz * 3))" $dir/file2.chk >> $seqres.full
-	_scratch_remount
+	_scratch_cycle_mount
 
 	echo "Compare files"
 	! cmp -s $dir/file1 $dir/file2 || _fail "file1 and file2 don't match."
diff --git a/tests/generic/242 b/tests/generic/242
index 1f174df..93fdc1d 100755
--- a/tests/generic/242
+++ b/tests/generic/242
@@ -74,7 +74,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -84,7 +84,7 @@ md5sum $testdir/file2.chk | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/243 b/tests/generic/243
index e1d698b..ae9caa2 100755
--- a/tests/generic/243
+++ b/tests/generic/243
@@ -75,7 +75,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -85,7 +85,7 @@ md5sum $testdir/file2.chk | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/253 b/tests/generic/253
index bfb91a3..4935f44 100755
--- a/tests/generic/253
+++ b/tests/generic/253
@@ -67,7 +67,7 @@ echo "Create the original files"
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $filesize $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,9 +76,9 @@ md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 2)) $blksz $((blksz * 2))" -c "truncate $((blksz * 2))" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 2)) $blksz $((blksz * 2))" -c "truncate $((blksz * 2))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/254 b/tests/generic/254
index f16cdd3..cd015ec 100755
--- a/tests/generic/254
+++ b/tests/generic/254
@@ -67,7 +67,7 @@ echo "Create the original files"
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $filesize $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,9 +76,9 @@ md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" -c "fpunch $((blksz * 2)) $blksz" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" -c "pwrite -S 0x00 $((blksz * 2)) $blksz" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/259 b/tests/generic/259
index 6718c50..3765bfd 100755
--- a/tests/generic/259
+++ b/tests/generic/259
@@ -67,7 +67,7 @@ echo "Create the original files"
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $filesize $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,9 +76,9 @@ md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" -c "fzero $((blksz * 2)) $blksz" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" -c "pwrite -S 0x00 $((blksz * 2)) $blksz" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/261 b/tests/generic/261
index 28d0e0b..84ebc86 100755
--- a/tests/generic/261
+++ b/tests/generic/261
@@ -67,7 +67,7 @@ echo "Create the original files"
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $filesize $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,9 +76,9 @@ md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" -c "fcollapse $((blksz * 2)) $blksz" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 2)) $blksz $((blksz * 2))" -c "truncate $((blksz * (nr - 1)))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/262 b/tests/generic/262
index aaf38cf..366801b 100755
--- a/tests/generic/262
+++ b/tests/generic/262
@@ -67,7 +67,7 @@ echo "Create the original files"
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $filesize $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,12 +76,12 @@ md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 2)) $blksz $((blksz * 2))" -c "finsert $((blksz * 2)) $blksz" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 _pwrite_byte 0x62 $blksz $blksz $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x62 $((blksz * 3)) $blksz $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 4)) $blksz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/264 b/tests/generic/264
index d5bcca6..631184c 100755
--- a/tests/generic/264
+++ b/tests/generic/264
@@ -67,7 +67,7 @@ echo "Create the original files"
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $filesize $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -76,9 +76,9 @@ md5sum $testdir/file2.chk | _filter_scratch
 
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" -c "falloc $((blksz * 2)) $blksz" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 $XFS_IO_PROG -f -c "pwrite -S 0x62 -b $((blksz * 3)) $blksz $((blksz * 3))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/277 b/tests/generic/277
index 39ebdc3..f92235b 100755
--- a/tests/generic/277
+++ b/tests/generic/277
@@ -50,7 +50,7 @@ _scratch_mkfs > /dev/null 2>&1
 _scratch_mount
 
 touch $SCRATCH_MNT/tmp
-_scratch_remount
+_scratch_cycle_mount
 ctime1=`stat -c %z $SCRATCH_MNT/tmp`
 
 sleep 1
@@ -58,7 +58,7 @@ chattr +A $SCRATCH_MNT/tmp
 chattr -A $SCRATCH_MNT/tmp
 ctime2=`stat -c %z $SCRATCH_MNT/tmp`
 
-_scratch_remount
+_scratch_cycle_mount
 ctime3=`stat -c %z $SCRATCH_MNT/tmp`
 
 if [ "$ctime1" == "$ctime2" ]; then
diff --git a/tests/generic/284 b/tests/generic/284
index aae4bb0..b3e8f3b 100755
--- a/tests/generic/284
+++ b/tests/generic/284
@@ -65,7 +65,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -77,7 +77,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/287 b/tests/generic/287
index 11e3c9f..7d53883 100755
--- a/tests/generic/287
+++ b/tests/generic/287
@@ -66,7 +66,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -78,7 +78,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/289 b/tests/generic/289
index 31df1b8..62b28dc 100755
--- a/tests/generic/289
+++ b/tests/generic/289
@@ -67,7 +67,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -79,7 +79,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/290 b/tests/generic/290
index 4a576c5..ff3af20 100755
--- a/tests/generic/290
+++ b/tests/generic/290
@@ -68,7 +68,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -80,7 +80,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/291 b/tests/generic/291
index 0f35ee0..1888043 100755
--- a/tests/generic/291
+++ b/tests/generic/291
@@ -67,7 +67,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -79,7 +79,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/292 b/tests/generic/292
index c3d9f11..e71b555 100755
--- a/tests/generic/292
+++ b/tests/generic/292
@@ -68,7 +68,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -80,7 +80,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/293 b/tests/generic/293
index f6579d9..6792f10 100755
--- a/tests/generic/293
+++ b/tests/generic/293
@@ -68,7 +68,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ cowsz=$((filesize / 2))
 _sweave_reflink_holes_delalloc $blksz $nr $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/295 b/tests/generic/295
index e7cfaa0..8f7916e 100755
--- a/tests/generic/295
+++ b/tests/generic/295
@@ -69,7 +69,7 @@ blksz=65536
 nr=64
 filesize=$((blksz * nr))
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -82,7 +82,7 @@ cowsz=$((filesize / 2))
 _sweave_reflink_holes_delalloc $blksz $nr $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/296 b/tests/generic/296
index 53eceb2..4297088 100755
--- a/tests/generic/296
+++ b/tests/generic/296
@@ -68,7 +68,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -78,7 +78,7 @@ md5sum $testdir/file2.chk | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $real_blksz 0 $((filesize + 1))" -c "fdatasync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $real_blksz 0 $((filesize + 1))" -c "fdatasync" $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/301 b/tests/generic/301
index 0201d0b..a513333 100755
--- a/tests/generic/301
+++ b/tests/generic/301
@@ -71,7 +71,7 @@ internal_blks=$((filesize / real_blksz))
 echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ echo "CoW and unmount"
 for i in `seq 1 8`; do
 	$XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/302 b/tests/generic/302
index c48da0a..1600b5a 100755
--- a/tests/generic/302
+++ b/tests/generic/302
@@ -72,7 +72,7 @@ internal_blks=$((filesize / real_blksz))
 echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -82,7 +82,7 @@ echo "CoW and unmount"
 for i in `seq 1 8`; do
 	$XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/305 b/tests/generic/305
index 9356a86..d73d87f 100755
--- a/tests/generic/305
+++ b/tests/generic/305
@@ -75,7 +75,7 @@ chown nobody $testdir/urk
 touch $testdir/erk
 chown fsgqa $testdir/erk
 _repquota
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Change file ownership"
 chown fsgqa $testdir/file1
@@ -88,7 +88,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $((sz/2)) 0 $((sz/2))" -c "fsync" $testdir
 _repquota
 
 echo "Remount the FS to see if accounting changes"
-_scratch_remount
+_scratch_cycle_mount
 _repquota
 
 echo "Chown one of the files"
diff --git a/tests/generic/307 b/tests/generic/307
index 857c196..f5d0680 100755
--- a/tests/generic/307
+++ b/tests/generic/307
@@ -58,14 +58,14 @@ _scratch_mkfs >/dev/null 2>&1
 _scratch_mount >/dev/null 2>&1
 
 touch $testfile
-_scratch_remount
+_scratch_cycle_mount
 ctime1=`stat -c %Z $testfile`
 
 sleep 1
 setfacl -m 'u::x,g::x,o::x' $testfile
 ctime2=`stat -c %Z $testfile`
 
-_scratch_remount
+_scratch_cycle_mount
 ctime3=`stat -c %Z $testfile`
 
 if [ "$ctime1" == "$ctime2" ]; then
diff --git a/tests/generic/326 b/tests/generic/326
index b6c748c..8afc6a2 100755
--- a/tests/generic/326
+++ b/tests/generic/326
@@ -76,7 +76,7 @@ chown nobody $testdir/urk
 touch $testdir/erk
 chown fsgqa $testdir/erk
 _repquota
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Change file ownership"
 chown fsgqa $testdir/file1
@@ -89,7 +89,7 @@ $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $((sz/2)) 0 $((sz/2))" -c "fsync" $test
 _repquota
 
 echo "Remount the FS to see if accounting changes"
-_scratch_remount
+_scratch_cycle_mount
 _repquota
 
 echo "Chown one of the files"
diff --git a/tests/generic/327 b/tests/generic/327
index 90d2aca..c165ad5 100755
--- a/tests/generic/327
+++ b/tests/generic/327
@@ -70,7 +70,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $sz 0 $sz" $testdir/file1 >> $seqres.full
 chown fsgqa $testdir/file1
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _repquota
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Set hard quota to prevent third reflink"
 setquota -u fsgqa 0 1024 0 0 $SCRATCH_MNT
diff --git a/tests/generic/328 b/tests/generic/328
index 46cfa66..e0b0550 100755
--- a/tests/generic/328
+++ b/tests/generic/328
@@ -72,7 +72,7 @@ chown fsgqa $testdir/file1
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file3 >> $seqres.full
 _repquota
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Set hard quota to prevent rewrite"
 setquota -u fsgqa 0 1024 0 0 $SCRATCH_MNT
diff --git a/tests/generic/330 b/tests/generic/330
index 377d822..f9f82a4 100755
--- a/tests/generic/330
+++ b/tests/generic/330
@@ -67,7 +67,7 @@ _require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
 echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -78,7 +78,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 sync
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 $AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/332 b/tests/generic/332
index f9b5f6f..b805bbd 100755
--- a/tests/generic/332
+++ b/tests/generic/332
@@ -68,7 +68,7 @@ _require_fs_space $SCRATCH_MNT $((filesize / 1024 * 3 * 5 / 4))
 echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -79,7 +79,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 sync
 $AIO_TEST -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/generic/333 b/tests/generic/333
index b8a1ea8..61a2d02 100755
--- a/tests/generic/333
+++ b/tests/generic/333
@@ -63,7 +63,7 @@ blksz=65536
 echo "Initialize file"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 # Snapshot creator...
 snappy() {
diff --git a/tests/generic/334 b/tests/generic/334
index 89601be..28c47d6 100755
--- a/tests/generic/334
+++ b/tests/generic/334
@@ -62,7 +62,7 @@ blksz=65536
 echo "Initialize file"
 echo > $seqres.full
 _pwrite_byte 0x61 0 $((loops * blksz)) $testdir/file1 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 # Snapshot creator...
 snappy() {
diff --git a/tests/xfs/127 b/tests/xfs/127
index 67a8c96..f44daae 100755
--- a/tests/xfs/127
+++ b/tests/xfs/127
@@ -62,7 +62,7 @@ _cp_reflink $testdir/copy1 $testdir/copy2
 
 echo "Grow fs"
 $XFS_GROWFS_PROG $SCRATCH_MNT 2>&1 |  _filter_growfs >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Create more reflink copies"
 _cp_reflink $testdir/original $testdir/copy3
diff --git a/tests/xfs/139 b/tests/xfs/139
index ecd88e6..16193e5 100755
--- a/tests/xfs/139
+++ b/tests/xfs/139
@@ -61,11 +61,11 @@ sz=$((48 * 1048576))
 nr=$((sz / blksz))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "CoW every other block"
 _pwrite_byte 0x62 0 $sz $testdir/file1 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/140 b/tests/xfs/140
index 6dfe581..052c539 100644
--- a/tests/xfs/140
+++ b/tests/xfs/140
@@ -62,7 +62,7 @@ nr=$((sz / blksz))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $sz $testdir/file2.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 cmp -s $testdir/file1 $testdir/file2 || echo "file1 and file2 do not match"
@@ -73,7 +73,7 @@ seq 1 2 $((nr - 1)) | while read f; do
 	_pwrite_byte 0x62 $((f * blksz)) $blksz $testdir/file2 >> $seqres.full
 	_pwrite_byte 0x62 $((f * blksz)) $blksz $testdir/file2.chk >> $seqres.full
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 ! cmp -s $testdir/file1 $testdir/file2 || echo "file1 and file2 must not match"
diff --git a/tests/xfs/180 b/tests/xfs/180
index fdb24eb..00e91a4 100755
--- a/tests/xfs/180
+++ b/tests/xfs/180
@@ -75,7 +75,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -85,7 +85,7 @@ echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $real_blksz 0 $((filesize + 1))" -c "fdatasync" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/182 b/tests/xfs/182
index c1bfc02..b7aa5e7 100755
--- a/tests/xfs/182
+++ b/tests/xfs/182
@@ -76,7 +76,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -86,7 +86,7 @@ echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $((filesize + 1))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $real_blksz 0 $((filesize + 1))" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/184 b/tests/xfs/184
index 50674ff..6d32e93 100755
--- a/tests/xfs/184
+++ b/tests/xfs/184
@@ -75,7 +75,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -85,7 +85,7 @@ echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $((filesize + 1))" -c "fdatasync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "falloc 0 $((filesize + 1))" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/192 b/tests/xfs/192
index 6429def..8594787 100755
--- a/tests/xfs/192
+++ b/tests/xfs/192
@@ -76,7 +76,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -86,7 +86,7 @@ echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "falloc 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/193 b/tests/xfs/193
index 974f1eb..f59b3bd 100755
--- a/tests/xfs/193
+++ b/tests/xfs/193
@@ -74,7 +74,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -83,7 +83,7 @@ md5sum $testdir/file2 | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/198 b/tests/xfs/198
index 7f3c105..c12d915 100755
--- a/tests/xfs/198
+++ b/tests/xfs/198
@@ -75,7 +75,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -84,7 +84,7 @@ md5sum $testdir/file2 | _filter_scratch
 echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/200 b/tests/xfs/200
index 99bcf31..a750ef6 100755
--- a/tests/xfs/200
+++ b/tests/xfs/200
@@ -77,7 +77,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -89,7 +89,7 @@ cat $testdir/file2 > /dev/null
 $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "fadvise -d 0 $filesize" -c "fsync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "falloc 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/204 b/tests/xfs/204
index 3159849..ae21d6e 100755
--- a/tests/xfs/204
+++ b/tests/xfs/204
@@ -78,7 +78,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -90,7 +90,7 @@ cat $testdir/file2 > /dev/null
 $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "fadvise -d 0 $filesize" -c "fsync" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "falloc 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/207 b/tests/xfs/207
index d416f79..efa283f 100755
--- a/tests/xfs/207
+++ b/tests/xfs/207
@@ -64,7 +64,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 0 0" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 0 1048576" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 0 0" $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Set extsz and cowextsz on zero byte file"
 $XFS_IO_PROG -c "extsize 1048576" $testdir/file1 | _filter_scratch
@@ -73,7 +73,7 @@ $XFS_IO_PROG -c "cowextsize 1048576" $testdir/file1 | _filter_scratch
 echo "Set extsz and cowextsz on 1Mbyte file"
 $XFS_IO_PROG -c "extsize 1048576" $testdir/file2 | _filter_scratch
 $XFS_IO_PROG -c "cowextsize 1048576" $testdir/file2 | _filter_scratch
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Check extsz and cowextsz settings on zero byte file"
 $XFS_IO_PROG -c "extsize" $testdir/file1 | _filter_scratch
@@ -85,14 +85,14 @@ $XFS_IO_PROG -c "cowextsize" $testdir/file2 | _filter_scratch
 
 echo "Set cowextsize and check flag"
 $XFS_IO_PROG -c "cowextsize 1048576" $testdir/file3 | _filter_scratch
-_scratch_remount
+_scratch_cycle_mount
 
 $XFS_IO_PROG -c "stat" $testdir/file3 | grep 'fsxattr.xflags' | _filter_scratch
 $XFS_IO_PROG -c "cowextsize" $testdir/file3 | _filter_scratch
 
 echo "Unset cowextsize and check flag"
 $XFS_IO_PROG -c "cowextsize 0" $testdir/file3 | _filter_scratch
-_scratch_remount
+_scratch_cycle_mount
 
 $XFS_IO_PROG -c "stat" $testdir/file3 | grep 'fsxattr.xflags' | _filter_scratch
 $XFS_IO_PROG -c "cowextsize" $testdir/file3 | _filter_scratch
diff --git a/tests/xfs/208 b/tests/xfs/208
index d876898..4f56884 100755
--- a/tests/xfs/208
+++ b/tests/xfs/208
@@ -85,7 +85,7 @@ _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "extsize $bufsize" $testdir/file3
 $XFS_IO_PROG -f -c "cowextsize $real_blksz" $testdir/file3
 _cp_reflink $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -108,7 +108,7 @@ $XFS_IO_PROG -f -c "cowextsize" $testdir/file3 >> $seqres.full
 
 $XFS_IO_PROG -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $filesize" -c "fdatasync" $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $real_blksz 0 $((filesize + 1))" -c "fdatasync" $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/209 b/tests/xfs/209
index 684187e..cecd9c7 100755
--- a/tests/xfs/209
+++ b/tests/xfs/209
@@ -67,7 +67,7 @@ seq 1 2 | while read nr; do
 		touch "$testdir/dir-$nr/file-$nnr"
 	done
 done
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Check cowextsize settings"
 seq 1 2 | while read nr; do
diff --git a/tests/xfs/211 b/tests/xfs/211
index cb0f17a..9f01d08 100755
--- a/tests/xfs/211
+++ b/tests/xfs/211
@@ -76,7 +76,7 @@ echo "Create the original files"
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $((filesize + 1))" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "cowextsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -86,7 +86,7 @@ echo "CoW and unmount"
 $XFS_IO_PROG -f -c "cowextsize" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -R -S 0x63 -b $real_blksz 0 $((filesize + 1))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b 8388608 0 $filesize" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/212 b/tests/xfs/212
index 4e3bcd4..48235d4 100755
--- a/tests/xfs/212
+++ b/tests/xfs/212
@@ -72,7 +72,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $s
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 $XFS_IO_PROG -f -c "extsize $bufsize" $testdir/file2
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -87,7 +87,7 @@ sync
 
 echo "Crash and recover"
 $XFS_IO_PROG -x -c "shutdown" $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/213 b/tests/xfs/213
index 2450097..d5cc129 100755
--- a/tests/xfs/213
+++ b/tests/xfs/213
@@ -80,7 +80,7 @@ chown nobody $testdir/urk
 touch $testdir/erk
 chown fsgqa $testdir/erk
 _repquota
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Change file ownership"
 chown fsgqa $testdir/file1
@@ -93,7 +93,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $blksz $((sz - blksz)) $blksz" -c "fsync"
 _repquota
 
 echo "Remount the FS to see if accounting changes"
-_scratch_remount
+_scratch_cycle_mount
 _repquota
 
 echo "Chown one of the files"
diff --git a/tests/xfs/214 b/tests/xfs/214
index 847f489..35972c6 100755
--- a/tests/xfs/214
+++ b/tests/xfs/214
@@ -81,7 +81,7 @@ chown nobody $testdir/urk
 touch $testdir/erk
 chown fsgqa $testdir/erk
 _repquota
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Change file ownership"
 chown fsgqa $testdir/file1
@@ -94,7 +94,7 @@ $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $blksz $((sz - blksz)) $blksz" -c "fsyn
 _repquota
 
 echo "Remount the FS to see if accounting changes"
-_scratch_remount
+_scratch_cycle_mount
 _repquota
 
 echo "Chown one of the files"
diff --git a/tests/xfs/215 b/tests/xfs/215
index 9ed842e..5ae4d85 100755
--- a/tests/xfs/215
+++ b/tests/xfs/215
@@ -69,7 +69,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/218 b/tests/xfs/218
index e98b14e..ea464f2 100755
--- a/tests/xfs/218
+++ b/tests/xfs/218
@@ -68,7 +68,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -80,7 +80,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/219 b/tests/xfs/219
index 25c0bb4..012b07c 100755
--- a/tests/xfs/219
+++ b/tests/xfs/219
@@ -69,7 +69,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/221 b/tests/xfs/221
index dc00331..8b860f2 100755
--- a/tests/xfs/221
+++ b/tests/xfs/221
@@ -68,7 +68,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -80,7 +80,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/223 b/tests/xfs/223
index 2bb1fcb..1e6ba98 100755
--- a/tests/xfs/223
+++ b/tests/xfs/223
@@ -70,7 +70,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -83,7 +83,7 @@ cowsz=$((filesize / 2))
 _weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/224 b/tests/xfs/224
index 92d3b05..3d19f94 100755
--- a/tests/xfs/224
+++ b/tests/xfs/224
@@ -69,7 +69,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -82,7 +82,7 @@ cowsz=$((filesize / 2))
 _weave_reflink_holes_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/225 b/tests/xfs/225
index b8e7712..c2e5b82 100755
--- a/tests/xfs/225
+++ b/tests/xfs/225
@@ -69,7 +69,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/226 b/tests/xfs/226
index ef4226e..3f035b4 100755
--- a/tests/xfs/226
+++ b/tests/xfs/226
@@ -68,7 +68,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -80,7 +80,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/228 b/tests/xfs/228
index ecbe35f..52fbb75 100755
--- a/tests/xfs/228
+++ b/tests/xfs/228
@@ -75,7 +75,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -89,7 +89,7 @@ _weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 # now cow
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/230 b/tests/xfs/230
index e09b52e..91e4d3f 100755
--- a/tests/xfs/230
+++ b/tests/xfs/230
@@ -75,7 +75,7 @@ real_blksz=$(stat -f -c '%S' $testdir)
 internal_blks=$((filesize / real_blksz))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _weave_reflink_rainbow $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -89,7 +89,7 @@ _weave_reflink_rainbow_delalloc $blksz $nr $testdir/file3 >> $seqres.full
 # now cow
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file3 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file3.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/231 b/tests/xfs/231
index 3672887..60f59a9 100755
--- a/tests/xfs/231
+++ b/tests/xfs/231
@@ -79,7 +79,7 @@ $XFS_IO_PROG -c "cowextsize $bufsize" $testdir
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/232 b/tests/xfs/232
index 7219a64..9a8403c 100755
--- a/tests/xfs/232
+++ b/tests/xfs/232
@@ -80,7 +80,7 @@ $XFS_IO_PROG -c "cowextsize $bufsize" $testdir
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file2.chk >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/233 b/tests/xfs/233
index f821004..f10af2b 100755
--- a/tests/xfs/233
+++ b/tests/xfs/233
@@ -61,7 +61,7 @@ cp -p $testdir/copy1 $testdir/copy2
 
 echo "Grow fs"
 $XFS_GROWFS_PROG $SCRATCH_MNT 2>&1 |  _filter_growfs >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Create more copies"
 cp -p $testdir/original $testdir/copy3
diff --git a/tests/xfs/239 b/tests/xfs/239
index 5bab633..c658dda 100755
--- a/tests/xfs/239
+++ b/tests/xfs/239
@@ -72,7 +72,7 @@ echo "Create the original files"
 $XFS_IO_PROG -c "cowextsize $((bufsize * 2))" $testdir
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -83,7 +83,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 sync
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 $AIO_TEST -f DIRECT -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/241 b/tests/xfs/241
index 090f913..5b29f4d 100755
--- a/tests/xfs/241
+++ b/tests/xfs/241
@@ -74,7 +74,7 @@ echo "Create the original files"
 $XFS_IO_PROG -c "cowextsize $((bufsize * 2))" $testdir
 $XFS_IO_PROG -f -c "pwrite -S 0x61 -b $bufsize 0 $filesize" $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -85,7 +85,7 @@ $XFS_IO_PROG -f -c "pwrite -S 0x63 $bufsize 1" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" $TEST_DIR/moo >> $seqres.full
 sync
 $AIO_TEST -b $bufsize $TEST_DIR/moo $testdir/file2 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/243 b/tests/xfs/243
index 629173e..b616adf 100755
--- a/tests/xfs/243
+++ b/tests/xfs/243
@@ -153,7 +153,7 @@ echo "Regular data extents:"
 test $(_xfs_bmapx_find data $testdir/file3 '000000$') -gt 0 || \
 	echo "Expected to find a regular data extent"
 
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/245 b/tests/xfs/245
index 6da701d..c745592 100755
--- a/tests/xfs/245
+++ b/tests/xfs/245
@@ -62,7 +62,7 @@ mkdir $testdir
 
 echo "Create the original files"
 $XFS_IO_PROG -f -c "falloc 0 256k" -c "pwrite 252k 6k" $testdir/file1 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 
 echo "Compare files"
diff --git a/tests/xfs/248 b/tests/xfs/248
index 50771a1..7e25258 100755
--- a/tests/xfs/248
+++ b/tests/xfs/248
@@ -67,7 +67,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -79,7 +79,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/249 b/tests/xfs/249
index f2088ee..b82d89c 100755
--- a/tests/xfs/249
+++ b/tests/xfs/249
@@ -68,7 +68,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_regular $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -80,7 +80,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/251 b/tests/xfs/251
index a2617bb..4f74772 100755
--- a/tests/xfs/251
+++ b/tests/xfs/251
@@ -69,7 +69,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/254 b/tests/xfs/254
index f5cbbfe..c8ac412 100755
--- a/tests/xfs/254
+++ b/tests/xfs/254
@@ -70,7 +70,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_unwritten $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -82,7 +82,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/255 b/tests/xfs/255
index 7532d68..93ad13e 100755
--- a/tests/xfs/255
+++ b/tests/xfs/255
@@ -69,7 +69,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -81,7 +81,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/256 b/tests/xfs/256
index ea8bd69..d5cf71b 100755
--- a/tests/xfs/256
+++ b/tests/xfs/256
@@ -70,7 +70,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -82,7 +82,7 @@ cowoff=$((filesize / 4))
 cowsz=$((filesize / 2))
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/257 b/tests/xfs/257
index 05a3d25..624f5e3 100755
--- a/tests/xfs/257
+++ b/tests/xfs/257
@@ -70,7 +70,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -83,7 +83,7 @@ cowsz=$((filesize / 2))
 _sweave_reflink_holes_delalloc $blksz $nr $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/258 b/tests/xfs/258
index ad7cb83..243e853 100755
--- a/tests/xfs/258
+++ b/tests/xfs/258
@@ -71,7 +71,7 @@ nr=64
 filesize=$((blksz * nr))
 $XFS_IO_PROG -c "cowextsize $((blksz * 16))" $testdir >> $seqres.full
 _sweave_reflink_holes $blksz $nr $testdir/file1 $testdir/file3 >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
@@ -84,7 +84,7 @@ cowsz=$((filesize / 2))
 _sweave_reflink_holes_delalloc $blksz $nr $testdir/file1 >> $seqres.full
 $XFS_IO_PROG -d -f -c "pwrite -S 0x63 -b $cowsz $cowoff $cowsz" $testdir/file1 >> $seqres.full
 _pwrite_byte 0x63 $cowoff $cowsz $testdir/file1.chk >> $seqres.full
-_scratch_remount
+_scratch_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_scratch
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 08/16] Rename _test_mount to _test_cycle_mount
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (6 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 07/16] Rename _scratch_mount to _scratch_cycle_mount Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-13 17:41 ` [PATCH 09/16] xfstests: do not unmount tmpfs during remount Theodore Ts'o
                   ` (7 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

This makes it clear when we are using "mount ; umount" versus "mount
-o remount" for most file systems.  The reason for this distinction is
(a) tests may want to test the difference between what happens on the
remount versus the munt paths, (b) with tmpfs, "mount ; umount" will
cause the contents of all of the files to disappear which makes many
tests sad, and (c) some mount options may not be changed using "mount
-o remount".

Currently _test_mount performs "_test_mount ; _test_umount"
so mechnically rename this function to _test_cycle_mount.  This was
done mechnically using the script fragment:

git grep -E "_test_remount" | \
	awk -F: '{print $1}' | sort -u | grep -v tests/xfs/189 \
	xargs sed -i 's/_test_remount/_test_cycle_mount/g'

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc         |  2 +-
 tests/generic/013 |  2 +-
 tests/generic/116 |  4 ++--
 tests/generic/118 |  4 ++--
 tests/generic/119 |  6 +++---
 tests/generic/121 |  4 ++--
 tests/generic/122 |  4 ++--
 tests/generic/134 |  4 ++--
 tests/generic/136 |  4 ++--
 tests/generic/137 |  2 +-
 tests/generic/138 |  4 ++--
 tests/generic/139 |  4 ++--
 tests/generic/140 |  4 ++--
 tests/generic/142 |  6 +++---
 tests/generic/143 |  6 +++---
 tests/generic/144 |  4 ++--
 tests/generic/145 |  4 ++--
 tests/generic/146 |  4 ++--
 tests/generic/147 |  4 ++--
 tests/generic/148 |  4 ++--
 tests/generic/149 |  4 ++--
 tests/generic/150 |  2 +-
 tests/generic/151 |  6 +++---
 tests/generic/152 |  6 +++---
 tests/generic/153 |  8 ++++----
 tests/generic/154 | 10 +++++-----
 tests/generic/155 | 10 +++++-----
 tests/generic/156 | 12 ++++++------
 tests/generic/178 |  4 ++--
 tests/generic/179 |  4 ++--
 tests/generic/180 |  4 ++--
 tests/generic/181 |  2 +-
 tests/generic/182 |  6 +++---
 tests/generic/303 |  2 +-
 tests/generic/304 |  2 +-
 tests/xfs/128     |  6 +++---
 tests/xfs/132     | 12 ++++++------
 37 files changed, 90 insertions(+), 90 deletions(-)

diff --git a/common/rc b/common/rc
index 509e524..18d1a00 100644
--- a/common/rc
+++ b/common/rc
@@ -354,7 +354,7 @@ _test_unmount()
 	fi
 }
 
-_test_remount()
+_test_cycle_mount()
 {
     _test_unmount
     _test_mount
diff --git a/tests/generic/013 b/tests/generic/013
index 534c9f0..e31fe35 100755
--- a/tests/generic/013
+++ b/tests/generic/013
@@ -35,7 +35,7 @@ _cleanup()
 {
     cd /
     # we might get here with a RO FS
-    _test_remount
+    _test_cycle_mount
     # now remove fsstress directory.
     # N.B. rm(1) on IRIX can find problems when building up a long pathname
     # such that what it has is greater the 1024 chars and will
diff --git a/tests/generic/116 b/tests/generic/116
index 18f8073..620a358 100755
--- a/tests/generic/116
+++ b/tests/generic/116
@@ -56,7 +56,7 @@ echo "Create the original files"
 blksz=65536
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -68,7 +68,7 @@ echo "Reflink the middle blocks together"
 free_before=$(stat -f -c '%a' $testdir)
 _reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
 		$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
diff --git a/tests/generic/118 b/tests/generic/118
index 6b6478b..66dbc04 100755
--- a/tests/generic/118
+++ b/tests/generic/118
@@ -57,7 +57,7 @@ echo "Create the original files"
 blksz=65536
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -69,7 +69,7 @@ echo "Reflink the middle blocks together"
 free_before=$(stat -f -c '%a' $testdir)
 _reflink_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
 		$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
diff --git a/tests/generic/119 b/tests/generic/119
index 1a7d26e..e6a6f59 100755
--- a/tests/generic/119
+++ b/tests/generic/119
@@ -60,7 +60,7 @@ _pwrite_byte 0x61 0 $((blksz * 8)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz * 8)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x63 0 $((blksz * 8)) $testdir/file3 >> $seqres.full
 _pwrite_byte 0x64 0 $((blksz * 8)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -80,7 +80,7 @@ echo "Reflink the first four blocks together, 1-2 3-4"
 free_before=$(stat -f -c '%a' $testdir)
 _reflink_range $testdir/file1 0 $testdir/file2 0 $((blksz * 4)) >> $seqres.full
 _reflink_range $testdir/file3 0 $testdir/file4 0 $((blksz * 4)) >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
@@ -112,7 +112,7 @@ echo "Reflink the first two blocks together, 1-3 1-4"
 free_before=$(stat -f -c '%a' $testdir)
 _reflink_range $testdir/file1 0 $testdir/file3 0 $((blksz * 2)) >> $seqres.full
 _reflink_range $testdir/file1 0 $testdir/file4 0 $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
diff --git a/tests/generic/121 b/tests/generic/121
index 7d6f982..d17f047 100755
--- a/tests/generic/121
+++ b/tests/generic/121
@@ -56,7 +56,7 @@ echo "Create the original files"
 blksz=65536
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -68,7 +68,7 @@ echo "Dedupe the middle blocks together"
 free_before=$(stat -f -c '%a' $testdir)
 _dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
 		$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
diff --git a/tests/generic/122 b/tests/generic/122
index d5cc3a2..9dcfa9a 100755
--- a/tests/generic/122
+++ b/tests/generic/122
@@ -56,7 +56,7 @@ echo "Create the original files"
 blksz=65536
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 6)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 $((blksz * 2)) $((blksz * 6)) $testdir/file2 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -68,7 +68,7 @@ echo "(Fail to) dedupe the middle blocks together"
 free_before=$(stat -f -c '%a' $testdir)
 _dedupe_range $testdir/file1 $((blksz * 4)) $testdir/file2 \
 		$((blksz * 4)) $((blksz * 2)) >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_after=$(stat -f -c '%a' $testdir)
 echo "freesp changed by $free_before -> $free_after" >> $seqres.full
 
diff --git a/tests/generic/134 b/tests/generic/134
index b1b1fa7..8dc9988 100755
--- a/tests/generic/134
+++ b/tests/generic/134
@@ -62,7 +62,7 @@ _pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -84,7 +84,7 @@ test ${c3} = ${c4} || echo "file3 and file4 should match"
 echo "Reflink the last blocks together, 1-2 1-3"
 _reflink_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
 _reflink_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
diff --git a/tests/generic/136 b/tests/generic/136
index bc69fa7..c72d11f 100755
--- a/tests/generic/136
+++ b/tests/generic/136
@@ -62,7 +62,7 @@ _pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz + 37)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file3 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz + 37)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -86,7 +86,7 @@ echo "1->2"
 _dedupe_range $testdir/file1 $blksz $testdir/file2 $blksz 37 >> $seqres.full
 echo "1->3"
 _dedupe_range $testdir/file1 $blksz $testdir/file3 $blksz 37 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
diff --git a/tests/generic/137 b/tests/generic/137
index 19a7ab4..a813036 100755
--- a/tests/generic/137
+++ b/tests/generic/137
@@ -86,7 +86,7 @@ seq 1 $((nr_blks / 7)) | while read nr; do
 			$((nr * 7 * blksz)) $blksz >> $seqres.full 2>&1
 done
 
-_test_remount
+_test_cycle_mount
 
 echo "Check block mappings"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/138 b/tests/generic/138
index c8b4255..f8a3197 100755
--- a/tests/generic/138
+++ b/tests/generic/138
@@ -59,7 +59,7 @@ blksz=65536
 _pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
@@ -79,7 +79,7 @@ _pwrite_byte 0x62 $((blksz * 16 - 34)) 17 $testdir/file3 >> $seqres.full
 
 _pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x62 $((blksz * 48 - 8)) 17 $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/139 b/tests/generic/139
index 989b054..ef66034 100755
--- a/tests/generic/139
+++ b/tests/generic/139
@@ -60,7 +60,7 @@ blksz=65536
 _pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
@@ -80,7 +80,7 @@ _pwrite_byte 0x62 $((blksz * 16 - 512)) 512 $testdir/file3 -d >> $seqres.full
 
 _pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file2 -d >> $seqres.full
 _pwrite_byte 0x62 $((blksz * 48)) $blksz $testdir/file3 -d >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/140 b/tests/generic/140
index 5bcd4ef..bf95ec1 100755
--- a/tests/generic/140
+++ b/tests/generic/140
@@ -59,7 +59,7 @@ blksz=65536
 _pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
@@ -79,7 +79,7 @@ _mwrite_byte 0x62 $((blksz * 16 - 34)) 17 $((blksz * 48 - 3)) $testdir/file3 >>
 
 _mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file2 >> $seqres.full
 _mwrite_byte 0x62 $((blksz * 48 - 20)) 17 $((blksz * 48 - 3)) $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/142 b/tests/generic/142
index e9a2d5e..d19725f 100755
--- a/tests/generic/142
+++ b/tests/generic/142
@@ -61,7 +61,7 @@ blksz=65536
 nr=9
 filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 csum=$(_md5_checksum $testdir/file1)
@@ -70,13 +70,13 @@ echo "Create the reflink copies"
 seq 2 $nr | while read i; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 
 echo "Rewrite the copies"
 seq 2 $nr | while read i; do
 	_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i >> $seqres.full
 done
-_test_remount
+_test_cycle_mount
 
 echo "Examine original file"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/143 b/tests/generic/143
index 703b585..8c4f9ce 100755
--- a/tests/generic/143
+++ b/tests/generic/143
@@ -62,7 +62,7 @@ blksz=65536
 nr=9
 filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 csum=$(_md5_checksum $testdir/file1)
@@ -71,13 +71,13 @@ echo "Create the reflink copies"
 seq 2 $nr | while read i; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 
 echo "Rewrite the copies"
 seq 2 $nr | while read i; do
 	_pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file$i -d >> $seqres.full
 done
-_test_remount
+_test_cycle_mount
 
 echo "Examine original file"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/144 b/tests/generic/144
index 71020ab..dbbe169 100755
--- a/tests/generic/144
+++ b/tests/generic/144
@@ -72,7 +72,7 @@ _reflink_range $testdir/file1 $((blksz * 3)) $testdir/file4 $((blksz * 3)) \
 		$blksz >> $seqres.full
 
 _cp_reflink $testdir/file1 $testdir/file5
-_test_remount
+_test_cycle_mount
 
 echo "Compare sections"
 md5sum $testdir/file1 | _filter_test_dir
@@ -116,7 +116,7 @@ echo "falloc everything"
 $XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -f -c "falloc 0 $((blksz * 5))" $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/145 b/tests/generic/145
index dac2b27..93d3839 100755
--- a/tests/generic/145
+++ b/tests/generic/145
@@ -83,7 +83,7 @@ _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
 _pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -109,7 +109,7 @@ echo "fcollapse files"
 $XFS_IO_PROG -f -c "fcollapse 0 $blksz" $testdir/file2
 $XFS_IO_PROG -f -c "fcollapse $blksz $blksz" $testdir/file3
 $XFS_IO_PROG -f -c "fcollapse $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/146 b/tests/generic/146
index 98f0621..b1013f8 100755
--- a/tests/generic/146
+++ b/tests/generic/146
@@ -77,7 +77,7 @@ _pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
 _pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -103,7 +103,7 @@ echo "fpunch files"
 $XFS_IO_PROG -f -c "fpunch 0 $blksz" $testdir/file2
 $XFS_IO_PROG -f -c "fpunch $blksz $blksz" $testdir/file3
 $XFS_IO_PROG -f -c "fpunch $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/147 b/tests/generic/147
index 8706f83..a1f59a0 100755
--- a/tests/generic/147
+++ b/tests/generic/147
@@ -80,7 +80,7 @@ _pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x63 $((blksz * 3)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -106,7 +106,7 @@ echo "finsert files"
 $XFS_IO_PROG -f -c "finsert 0 $blksz" $testdir/file2
 $XFS_IO_PROG -f -c "finsert $blksz $blksz" $testdir/file3
 $XFS_IO_PROG -f -c "finsert $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/148 b/tests/generic/148
index af60ab8..31e7ebe 100755
--- a/tests/generic/148
+++ b/tests/generic/148
@@ -71,7 +71,7 @@ _pwrite_byte 0x62 $blksz 34 $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x61 0 $blksz $testdir/file3.chk >> $seqres.full
 _pwrite_byte 0x62 $blksz 37 $testdir/file3.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz + 37)) 3 $testdir/file3.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -90,7 +90,7 @@ test ${c2} = ${c3} || echo "file2 and file3 should match"
 echo "truncate files"
 $XFS_IO_PROG -f -c "truncate $((blksz + 34))" $testdir/file2
 $XFS_IO_PROG -f -c "truncate $((blksz + 40))" $testdir/file3
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/149 b/tests/generic/149
index b5f9f4a..0f13b79 100755
--- a/tests/generic/149
+++ b/tests/generic/149
@@ -77,7 +77,7 @@ _pwrite_byte 0x63 $((blksz * 2)) $blksz $testdir/file3.chk >> $seqres.full
 _pwrite_byte 0x61 0 $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x62 $blksz $blksz $testdir/file4.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz * 2)) $blksz $testdir/file4.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -103,7 +103,7 @@ echo "fzero files"
 $XFS_IO_PROG -f -c "fzero 0 $blksz" $testdir/file2
 $XFS_IO_PROG -f -c "fzero $blksz $blksz" $testdir/file3
 $XFS_IO_PROG -f -c "fzero $((blksz * 2)) $blksz" $testdir/file4
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/150 b/tests/generic/150
index 88814b1..2e21d37 100755
--- a/tests/generic/150
+++ b/tests/generic/150
@@ -69,7 +69,7 @@ echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file.$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 _within_tolerance "free blocks after reflink" $free_blocks1 $free_blocks0 $margin -v
diff --git a/tests/generic/151 b/tests/generic/151
index 207378c..55e0e02 100755
--- a/tests/generic/151
+++ b/tests/generic/151
@@ -74,17 +74,17 @@ for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file.$i
 done
 _cp_reflink $testdir/file1 $testdir/survivor
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Delete most of the files"
 rm -rf $testdir/file*
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Delete all the files"
 rm -rf $testdir/*
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
 
diff --git a/tests/generic/152 b/tests/generic/152
index b221f8f..9fe4d32 100755
--- a/tests/generic/152
+++ b/tests/generic/152
@@ -74,14 +74,14 @@ echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Punch most of the blocks"
 $XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file2
 $XFS_IO_PROG -f -c "fpunch 0 $((sz / 2))" $testdir/file3
 $XFS_IO_PROG -f -c "fpunch $((sz / 2)) $((sz / 2))" $testdir/file4
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Punch all the files"
@@ -89,7 +89,7 @@ for i in `seq 2 $nr`; do
 	$XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file$i
 done
 $XFS_IO_PROG -f -c "fpunch 0 $sz" $testdir/file1
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
 
diff --git a/tests/generic/153 b/tests/generic/153
index 550aa95..5d22153 100755
--- a/tests/generic/153
+++ b/tests/generic/153
@@ -68,27 +68,27 @@ free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
 filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Collapse most of the blocks"
 $XFS_IO_PROG -f -c "fcollapse 0 $(((blks - 1) * blksz))" $testdir/file2
 $XFS_IO_PROG -f -c "fcollapse 0 $((sz / 2))" $testdir/file3
 $XFS_IO_PROG -f -c "fcollapse $((sz / 2)) $(( ((blks / 2) - 1) * blksz))" $testdir/file4
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Collpase nearly all the files"
 $XFS_IO_PROG -f -c "fcollapse 0 $(( ((blks / 2) - 1) * blksz))" $testdir/file3
 $XFS_IO_PROG -f -c "fcollapse 0 $((sz / 2))" $testdir/file4
 $XFS_IO_PROG -f -c "fcollapse 0 $(( (blks - 1) * blksz))" $testdir/file1
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3
 
diff --git a/tests/generic/154 b/tests/generic/154
index c0c3142..23b626b 100755
--- a/tests/generic/154
+++ b/tests/generic/154
@@ -67,32 +67,32 @@ nr=4
 filesize=$((blksz * nr))
 sz=$((blks * blksz))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Rewrite some of the blocks"
 _pwrite_byte 0x62 0 $sz $testdir/file2 >> $seqres.full
 _pwrite_byte 0x63 0 $((sz / 2)) $testdir/file3 >> $seqres.full
 _pwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Rewrite all the files"
 _pwrite_byte 0x62 0 $sz $testdir/file2 >> $seqres.full
 _pwrite_byte 0x63 0 $sz $testdir/file3 >> $seqres.full
 _pwrite_byte 0x64 0 $sz $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 
 echo "Rewrite the original file"
 _pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks4=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
diff --git a/tests/generic/155 b/tests/generic/155
index e96bda7..50083e7 100755
--- a/tests/generic/155
+++ b/tests/generic/155
@@ -72,32 +72,32 @@ free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
 filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "Rewrite some of the blocks"
 $XFS_IO_PROG -f -c "fzero 0 $sz" $testdir/file2 >> $seqres.full
 _pwrite_byte 0x63 0 $((sz / 2)) $testdir/file3 -d >> $seqres.full
 _mwrite_byte 0x64 $((sz / 2)) $((sz / 2)) $sz $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "Rewrite all the files"
 _pwrite_byte 0x62 0 $sz $testdir/file2 -d >> $seqres.full
 _mwrite_byte 0x63 0 $sz $sz $testdir/file3 >> $seqres.full
 $XFS_IO_PROG -f -c "fzero 0 $sz" $testdir/file4 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 
 echo "Rewrite the original file"
 _pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks4=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
diff --git a/tests/generic/156 b/tests/generic/156
index de2d9b1..52ac11f 100755
--- a/tests/generic/156
+++ b/tests/generic/156
@@ -79,34 +79,34 @@ free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
 filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 echo "funshare part of a file"
 $XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
-_test_remount
+_test_cycle_mount
 
 echo "funshare some of the copies"
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 echo "funshare the rest of the files"
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 
 echo "Rewrite the original file"
 _pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks4=$(stat -f $testdir -c '%f')
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
 
diff --git a/tests/generic/178 b/tests/generic/178
index 68432e7..7540802 100755
--- a/tests/generic/178
+++ b/tests/generic/178
@@ -59,7 +59,7 @@ filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $filesize $testdir/file1 >> $seqres.full
 
 _cp_reflink $testdir/file1 $testdir/file2
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -67,7 +67,7 @@ md5sum $testdir/file2 | _filter_test_dir
 echo "Write and punch"
 _pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
 $XFS_IO_PROG -f -c "fpunch $blksz $((blksz * 254))" $testdir/file2
-_test_remount
+_test_cycle_mount
 
 echo "Compare results"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/179 b/tests/generic/179
index 27c25e7..c0ea70f 100755
--- a/tests/generic/179
+++ b/tests/generic/179
@@ -63,7 +63,7 @@ _cp_reflink $testdir/file1 $testdir/file2
 
 _pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) $testdir/file2.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -76,7 +76,7 @@ test ${c1} = ${c2} || echo "file1 and file2 should match"
 
 echo "fpunch files"
 $XFS_IO_PROG -f -c "fpunch $((blksz - 17)) $((blksz + 17))" $testdir/file2
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/180 b/tests/generic/180
index a0f30a2..af2abf9 100755
--- a/tests/generic/180
+++ b/tests/generic/180
@@ -63,7 +63,7 @@ _cp_reflink $testdir/file1 $testdir/file2
 
 _pwrite_byte 0x61 0 $((blksz * 3)) $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x00 $((blksz - 17)) $((blksz + 17)) $testdir/file2.chk >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -76,7 +76,7 @@ test ${c1} = ${c2} || echo "file1 and file2 should match"
 
 echo "fzero files"
 $XFS_IO_PROG -f -c "fzero $((blksz - 17)) $((blksz + 17))" $testdir/file2
-_test_remount
+_test_cycle_mount
 
 echo "Compare files"
 md5sum $testdir/file1 | _filter_test_dir
diff --git a/tests/generic/181 b/tests/generic/181
index 9c640e4..bd884df 100755
--- a/tests/generic/181
+++ b/tests/generic/181
@@ -61,7 +61,7 @@ _pwrite_byte 0x62 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz * 2)) $testdir/file2.chk >> $seqres.full
 _pwrite_byte 0x61 $((blksz * 2)) $((blksz * 255)) $testdir/file2.chk >> $seqres.full
 _reflink_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
diff --git a/tests/generic/182 b/tests/generic/182
index fddacc4..f484399 100755
--- a/tests/generic/182
+++ b/tests/generic/182
@@ -59,7 +59,7 @@ _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz * 257)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x62 0 $((blksz * 257)) $testdir/file2.chk >> $seqres.full
 _dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -78,7 +78,7 @@ _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file2.chk >> $seqres.full
 _dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
@@ -97,7 +97,7 @@ _pwrite_byte 0x61 0 $((blksz * 256)) $testdir/file1 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 257)) $testdir/file2 >> $seqres.full
 _pwrite_byte 0x61 0 $((blksz * 257)) $testdir/file2.chk >> $seqres.full
 _dedupe_range $testdir/file1 $blksz $testdir/file2 $((blksz * 2)) 0 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 md5sum $testdir/file1 | _filter_test_dir
 md5sum $testdir/file2 | _filter_test_dir
diff --git a/tests/generic/303 b/tests/generic/303
index 2283b5e..3c84008 100755
--- a/tests/generic/303
+++ b/tests/generic/303
@@ -83,7 +83,7 @@ echo "Reflink with huge off/len (should fail)"
 _reflink_range $testdir/file2 $bigoff_64k $testdir/file9 0 $bigoff_64k >> $seqres.full
 
 echo "Check file creation"
-_test_remount
+_test_cycle_mount
 echo "file3"
 $XFS_IO_PROG -c "pread -v -q $bigoff 1" $testdir/file3
 echo "file4"
diff --git a/tests/generic/304 b/tests/generic/304
index e50fc2a..b7ee7b9 100755
--- a/tests/generic/304
+++ b/tests/generic/304
@@ -84,7 +84,7 @@ echo "Dedupe with huge off/len (should fail)"
 _dedupe_range $testdir/file2 $bigoff_64k $testdir/file9 0 $bigoff_64k >> $seqres.full
 
 echo "Check file creation"
-_test_remount
+_test_cycle_mount
 echo "file3"
 $XFS_IO_PROG -c "pread -v -q $bigoff 1" $testdir/file3
 echo "file4"
diff --git a/tests/xfs/128 b/tests/xfs/128
index 56778fc..68f6f94 100755
--- a/tests/xfs/128
+++ b/tests/xfs/128
@@ -66,7 +66,7 @@ _pwrite_byte 0x61 0 $((blks * blksz)) $testdir/file1 >> $seqres.full
 _cp_reflink $testdir/file1 $testdir/file2
 _cp_reflink $testdir/file2 $testdir/file3
 _cp_reflink $testdir/file3 $testdir/file4
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 
 md5sum $testdir/file1 | _filter_scratch
@@ -82,7 +82,7 @@ c04=$(_md5_checksum $testdir/file4)
 echo "CoW the reflink copies"
 _pwrite_byte 0x62 $blksz $blksz $testdir/file2 >> $seqres.full
 _pwrite_byte 0x63 $(( blksz * (blks - 1) )) $blksz $testdir/file3 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 
 md5sum $testdir/file1 | _filter_scratch
@@ -101,7 +101,7 @@ xfs_fsr -v -d $testdir/file1 >> $seqres.full
 xfs_fsr -v -d $testdir/file2 >> $seqres.full # fsr probably breaks the link
 xfs_fsr -v -d $testdir/file3 >> $seqres.full # fsr probably breaks the link
 xfs_fsr -v -d $testdir/file4 >> $seqres.full # fsr probably ignores this file
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 
 md5sum $testdir/file1 | _filter_scratch
diff --git a/tests/xfs/132 b/tests/xfs/132
index cf3d645..f174b3f 100755
--- a/tests/xfs/132
+++ b/tests/xfs/132
@@ -80,38 +80,38 @@ free_blocks0=$(stat -f $testdir -c '%f')
 nr=4
 filesize=$((blksz * nr))
 _pwrite_byte 0x61 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 
 echo "Create the reflink copies"
 for i in `seq 2 $nr`; do
 	_cp_reflink $testdir/file1 $testdir/file$i
 done
-_test_remount
+_test_cycle_mount
 free_blocks1=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "funshare part of a file"
 $XFS_IO_PROG -f -c "falloc 0 $((sz / 2))" $testdir/file2
-_test_remount
+_test_cycle_mount
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "funshare some of the copies"
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file2
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file3
-_test_remount
+_test_cycle_mount
 free_blocks2=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "funshare the rest of the files"
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file4
 $XFS_IO_PROG -f -c "falloc 0 $sz" $testdir/file1
-_test_remount
+_test_cycle_mount
 free_blocks3=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 
 echo "Rewrite the original file"
 _pwrite_byte 0x65 0 $sz $testdir/file1 >> $seqres.full
-_test_remount
+_test_cycle_mount
 free_blocks4=$(stat -f $testdir -c '%f')
 lsattr -l $testdir/ | _filter_test_dir | _filter_spaces
 #echo $free_blocks0 $free_blocks1 $free_blocks2 $free_blocks3 $free_blocks4
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 09/16] xfstests: do not unmount tmpfs during remount
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (7 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 08/16] Rename _test_mount to _test_cycle_mount Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-16  6:43   ` [PATCH-v3a " Theodore Ts'o
  2016-02-13 17:41 ` [PATCH 10/16] generic: do not unmount before calling _check_scratch_fs() Theodore Ts'o
                   ` (6 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu, Theodore Ts'o

From: Junho Ryu <jayr@google.com>

Several tests unmount then re-mount the scratch filesystem, to check
that the content is unchanged; but unmounting a tmpfs is designed to
lose its content, which causes such tests to fail unnecessarily.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc             | 23 ++++++++++++++++++++++-
 tests/generic/003     | 20 ++++++++------------
 tests/generic/135     | 17 +++--------------
 tests/generic/169     | 20 ++++++--------------
 tests/generic/169.out |  6 ++----
 tests/generic/192     |  3 +--
 tests/generic/226     |  3 +--
 tests/generic/258     |  3 +--
 tests/generic/306     |  3 +--
 tests/generic/317     |  3 +--
 tests/generic/318     |  3 +--
 11 files changed, 47 insertions(+), 57 deletions(-)

diff --git a/common/rc b/common/rc
index 18d1a00..42415a7 100644
--- a/common/rc
+++ b/common/rc
@@ -329,10 +329,28 @@ _scratch_unmount()
 	esac
 }
 
+_scratch_remount()
+{
+    local opts="$1"
+
+    if test -n "$opts"; then
+	mount -o "remount,$opts" $SCRATCH_MNT
+    fi
+}
+
 _scratch_cycle_mount()
 {
+    local opts="$1"
+
+    if [ "$FSTYP" = tmpfs ]; then
+	_scratch_remount "$opts"
+	return
+    fi
+    if test -n "$opts"; then
+	opts="-o $opts"
+    fi
     _scratch_unmount
-    _scratch_mount
+    _scratch_mount "$opts"
 }
 
 _test_mount()
@@ -356,6 +374,9 @@ _test_unmount()
 
 _test_cycle_mount()
 {
+    if [ "$FSTYP" = tmpfs ]; then
+	return
+    fi
     _test_unmount
     _test_mount
 }
diff --git a/tests/generic/003 b/tests/generic/003
index 7ffd09a..710ffc8 100755
--- a/tests/generic/003
+++ b/tests/generic/003
@@ -107,9 +107,8 @@ file1_stat_after_second_access=`_stat $TPATH/dir1/file1`
 _compare_stat_times NNN "$file1_stat_after_first_access" \
 	"$file1_stat_after_second_access" "after accessing file1 second time"
 
-# Remounting with nodiratime option
-_scratch_unmount
-_scratch_mount "-o nodiratime"
+# Mounting with nodiratime option
+_scratch_cycle_mount "nodiratime"
 file1_stat_after_remount=`_stat $TPATH/dir1/file1`
 _compare_stat_times NNN "$file1_stat_after_second_access" \
 	"$file1_stat_after_remount" "for file1 after remount"
@@ -134,9 +133,8 @@ dir2_stat_after_file_access=`_stat $TPATH/dir2`
 _compare_stat_times NNN "$dir2_stat_after_file_creation" \
 	"$dir2_stat_after_file_access" "for dir2 after file access"
 
-# Remounting with noatime option, creating a file and accessing it
-_scratch_unmount
-_scratch_mount "-o noatime"
+# Mounting with noatime option, creating a file and accessing it
+_scratch_cycle_mount "noatime"
 echo "ccc" > $TPATH/dir2/file3
 file3_stat_before_first_access=`_stat $TPATH/dir2/file3`
 sleep 1
@@ -158,10 +156,9 @@ file1_stat_after_change=`_stat $TPATH/dir1/file1_renamed`
 _compare_stat_times NNY "$file1_stat_after_modify" \
 	"$file1_stat_after_change" "after changing file1"
 
-# Remounting with strictatime option and
+# Mounting with strictatime option and
 # accessing a previously created file twice
-_scratch_unmount
-_scratch_mount "-o strictatime"
+_scratch_cycle_mount "strictatime"
 cat $TPATH/dir2/file3 > /dev/null
 file3_stat_after_second_access=`_stat $TPATH/dir2/file3`
 _compare_stat_times YNN "$file3_stat_after_first_access" \
@@ -189,13 +186,12 @@ if [ "$FSTYP" = "btrfs" ]; then
 		"$file3_stat_readonly_after_access" "for file in readonly subvol"
 fi
 
-# Remounting read-only. Access time should never be updated, despite the
+# Mounting read-only. Access time should never be updated, despite the
 # strictatime mount option.
 sleep 1
 dir2_stat_before_ro_mount=`_stat $TPATH/dir2`
 file3_stat_before_ro_mount=`_stat $TPATH/dir2/file3`
-_scratch_unmount
-_scratch_mount "-o ro,strictatime"
+_scratch_cycle_mount "ro,strictatime"
 ls $TPATH/dir2 > /dev/null
 cat $TPATH/dir2/file3 > /dev/null
 dir2_stat_after_ro_mount=`_stat $TPATH/dir2`
diff --git a/tests/generic/135 b/tests/generic/135
index 4400672..ec5a320 100755
--- a/tests/generic/135
+++ b/tests/generic/135
@@ -41,19 +41,8 @@ _supported_os Linux IRIX
 
 _require_odirect
 _require_scratch
-_scratch_mkfs >/dev/null 2>&1
-
-_umount_mount()
-{
-    CWD=`pwd`
-    cd /
-    # pipe error into /dev/null, in case not mounted (after _require_scratch)
-    _scratch_unmount 2>/dev/null
-    _scratch_mount
-    cd "$CWD"
-}
-
-_umount_mount
+_scratch_mkfs >/dev/null
+_scratch_mount
 
 cd $SCRATCH_MNT
 
@@ -71,7 +60,7 @@ $XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
 $XFS_IO_PROG -f -c 'truncate 2k' trunc_file > /dev/null
 $XFS_IO_PROG -c 'pwrite 1k 0 1k' trunc_file > /dev/null
 
-_umount_mount
+_scratch_cycle_mount
 
 # check file size and contents
 od -Ad -x async_file
diff --git a/tests/generic/169 b/tests/generic/169
index 839ff9d..f51f4d1 100755
--- a/tests/generic/169
+++ b/tests/generic/169
@@ -73,13 +73,9 @@ $XFS_IO_PROG -a -c "pwrite 0 5k" -c "fsync" \
 	$SCRATCH_MNT/testfile \
 	| _show_wrote_and_stat_only
 
-echo "# unmounting scratch"
-_scratch_unmount>>$seqres.full 2>&1 \
-    || _fail "unmount failed"
-
-echo "# mounting scratch"
-_scratch_mount >>$seqres.full 2>&1 \
-    || _fail "mount failed: $MOUNT_OPTIONS"
+echo "# remounting scratch"
+_scratch_cycle_mount >>$seqres.full 2>&1 \
+    || _fail "remount failed: $MOUNT_OPTIONS"
 
 echo "# stating file to confirm correct size"
 $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/testfile \
@@ -90,13 +86,9 @@ $XFS_IO_PROG -f -c "pwrite 0 5" -c s -c "pwrite 5 5" \
 	-c "stat" $SCRATCH_MNT/nextfile \
 	| _show_wrote_and_stat_only
 
-echo "# unmounting scratch"
-_scratch_unmount>>$seqres.full 2>&1 \
-    || _fail "unmount failed"
-
-echo "# mounting scratch"
-_scratch_mount >>$seqres.full 2>&1 \
-    || _fail "mount failed: $MOUNT_OPTIONS"
+echo "# remounting scratch"
+_scratch_cycle_mount >>$seqres.full 2>&1 \
+    || _fail "remount failed: $MOUNT_OPTIONS"
 
 echo "# stating file to confirm correct size"
 $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/nextfile \
diff --git a/tests/generic/169.out b/tests/generic/169.out
index 22a5b77..5f7df39 100644
--- a/tests/generic/169.out
+++ b/tests/generic/169.out
@@ -5,15 +5,13 @@ wrote 5120/5120 bytes at offset 0
 wrote 5120/5120 bytes at offset 5120
 wrote 5120/5120 bytes at offset 10240
 stat.size = 15360
-# unmounting scratch
-# mounting scratch
+# remounting scratch
 # stating file to confirm correct size
 stat.size = 15360
 # appending 10 bytes to new file, sync at 5 bytes
 wrote 5/5 bytes at offset 0
 wrote 5/5 bytes at offset 5
 stat.size = 10
-# unmounting scratch
-# mounting scratch
+# remounting scratch
 # stating file to confirm correct size
 stat.size = 10
diff --git a/tests/generic/192 b/tests/generic/192
index ebabea2..6bbc87c 100755
--- a/tests/generic/192
+++ b/tests/generic/192
@@ -78,8 +78,7 @@ cat $testfile
 time2=`_access_time $testfile | tee -a $seqres.full`
 
 cd /
-_test_unmount
-_test_mount
+_test_cycle_mount
 time3=`_access_time $testfile | tee -a $seqres.full`
 
 delta1=`expr $time2 - $time1`
diff --git a/tests/generic/226 b/tests/generic/226
index b12965a..a099ec6 100755
--- a/tests/generic/226
+++ b/tests/generic/226
@@ -61,8 +61,7 @@ for I in `seq 1 $loops`; do
 done
 
 echo
-_scratch_unmount
-_scratch_mount
+_scratch_cycle_mount
 
 echo "--> $loops direct 64m writes in a loop"
 for I in `seq 1 $loops`; do
diff --git a/tests/generic/258 b/tests/generic/258
index 285a422..d28437f 100755
--- a/tests/generic/258
+++ b/tests/generic/258
@@ -62,8 +62,7 @@ fi
 
 # unmount, remount, and check the timestamp
 echo "Remounting to flush cache"
-_test_unmount
-_test_mount
+_test_cycle_mount
 
 # Should yield -315593940 (prior to epoch)
 echo "Testing for negative seconds since epoch"
diff --git a/tests/generic/306 b/tests/generic/306
index 64d8cde..86fd829 100755
--- a/tests/generic/306
+++ b/tests/generic/306
@@ -67,8 +67,7 @@ touch $BINDFILE || _fail "Could not create bind mount file"
 touch $TARGET || _fail "Could not create symlink target"
 ln -s $TARGET $SYMLINK
 
-_scratch_unmount || _fail "Could not unmount scratch device"
-_scratch_mount -o ro || _fail "Could not mount scratch readonly"
+_scratch_remount ro || _fail "Could not remount scratch readonly"
 
 # We should be able to read & write to/from these devices even on an RO fs
 echo "== try to create new file"
diff --git a/tests/generic/317 b/tests/generic/317
index 68f231c..a5d8804 100755
--- a/tests/generic/317
+++ b/tests/generic/317
@@ -96,8 +96,7 @@ echo ""
 echo "*** Remounting ***"
 echo ""
 sync
-_scratch_unmount >>$seqres.full 2>&1
-_scratch_mount      >>$seqres.full 2>&1 || _fail "mount failed"
+_scratch_cycle_mount      >>$seqres.full 2>&1 || _fail "remount failed"
 
 _print_numeric_uid
 
diff --git a/tests/generic/318 b/tests/generic/318
index c730b50..f850a9b 100755
--- a/tests/generic/318
+++ b/tests/generic/318
@@ -109,8 +109,7 @@ _print_getfacls
 echo "*** Remounting ***"
 echo ""
 sync
-_scratch_unmount >>$seqres.full 2>&1
-_scratch_mount      >>$seqres.full 2>&1 || _fail "mount failed"
+_scratch_cycle_mount      >>$seqres.full 2>&1 || _fail "remount failed"
 
 _print_getfacls
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 10/16] generic: do not unmount before calling _check_scratch_fs()
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (8 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 09/16] xfstests: do not unmount tmpfs during remount Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-13 17:41 ` [PATCH 11/16] generic: require fiemap for generic/009 Theodore Ts'o
                   ` (5 subsequent siblings)
  15 siblings, 0 replies; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu, Theodore Ts'o

From: Junho Ryu <jayr@google.com>

Fix generic/053 so it works on tmpfs by relying on _check_scratch_fs
to unmount before checking the file system and remounting it
afterwards.  Many other tests rely on this, and since tmpfs does not
have a file system consistency checker, this allows the test to
succeed because the files don't disappear when the tmpfs file system
is unmounted.

Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/generic/053     | 2 --
 tests/generic/053.out | 2 --
 2 files changed, 4 deletions(-)

diff --git a/tests/generic/053 b/tests/generic/053
index a0e7280..cf46a93 100755
--- a/tests/generic/053
+++ b/tests/generic/053
@@ -81,9 +81,7 @@ list_acls()
 
 echo "acls before repair:"
 list_acls
-_do 'unmount $SCRATCH_DEV' '_scratch_unmount'
 _do 'repair filesystem' '_check_scratch_fs'
-_do 'mount filesytem' '_scratch_mount'
 echo "acls after repair: "
 list_acls
 
diff --git a/tests/generic/053.out b/tests/generic/053.out
index cd71cbb..d57857a 100644
--- a/tests/generic/053.out
+++ b/tests/generic/053.out
@@ -10,9 +10,7 @@ $SCRATCH_MNT/test.4 [u::---,g::r-x,o::rwx]
 $SCRATCH_MNT/test.5 [u::---,u:id2:r-x,g::---,m::rwx,o::---]
 $SCRATCH_MNT/test.6 [u::rwx,g::r-x,o::r--]
 $SCRATCH_MNT/test.7 [u::---,g::---,g:id2:r-x,m::-w-,o::---]
-unmount $SCRATCH_DEV... done
 repair filesystem... done
-mount filesytem... done
 acls after repair: 
 $SCRATCH_MNT/test.0 [u::r--,g::rwx,o::rw-]
 $SCRATCH_MNT/test.1 [u::r-x,g::---,o::---]
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 11/16] generic: require fiemap for generic/009
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (9 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 10/16] generic: do not unmount before calling _check_scratch_fs() Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-17 10:04   ` Christoph Hellwig
  2016-02-13 17:41 ` [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312 Theodore Ts'o
                   ` (4 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

Require xfs_io commands fiemap and falloc as well as fzero: fzero
without falloc is unlikely, but tmpfs may later support fzero, though
probably never fiemap (and in v3.15 wrongly claimed to support fzero).

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/generic/009 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/generic/009 b/tests/generic/009
index 7fbec34..5902afd 100755
--- a/tests/generic/009
+++ b/tests/generic/009
@@ -45,6 +45,8 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_os Linux
 _require_xfs_io_command "fzero"
+_require_xfs_io_command "fiemap"
+_require_xfs_io_command "falloc"
 _require_test
 
 testfile=$TEST_DIR/009.$$
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (10 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 11/16] generic: require fiemap for generic/009 Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-17 10:06   ` Christoph Hellwig
  2016-02-13 17:41 ` [PATCH 13/16] xfstests: generic/079 and generic/277 requires chattr, not xattrs Theodore Ts'o
                   ` (3 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

This allows this test to work with tmpfs, if the system has at least
5G of free memory.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/generic/312 | 13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/tests/generic/312 b/tests/generic/312
index b570814..639eb57 100755
--- a/tests/generic/312
+++ b/tests/generic/312
@@ -51,12 +51,15 @@ _require_scratch
 
 # 5G in byte
 fssize=$((2**30 * 5))
-required_blocks=$(($fssize / 1024))
-dev_blocks=$(grep -w $(_short_dev $SCRATCH_DEV) /proc/partitions | $AWK_PROG '{print $3}')
-if [ $required_blocks -gt $dev_blocks ];then
-	_notrun "this test requires \$SCRATCH_DEV has ${fssize}B space"
-fi
 
+# We don't need to do this check for tmpfs because _scratch_mkfs_size
+# will validate the size against the available memory
+if [ "$FSTYP" != "tmpfs" ]; then
+   _scratch_mkfs
+   _scratch_mount
+   _require_fs_space $SCRATCH_MNT $(($fssize / 1024))
+   _scratch_unmount
+fi
 rm -f $seqres.full
 _scratch_mkfs_sized $fssize >>$seqres.full 2>&1
 _scratch_mount >>$seqres.full 2>&1
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 13/16] xfstests: generic/079 and generic/277 requires chattr, not xattrs
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (11 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312 Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-17 10:06   ` Christoph Hellwig
  2016-02-13 17:41 ` [PATCH 14/16] xfstests: add executable permission to tests Theodore Ts'o
                   ` (2 subsequent siblings)
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

Add a new helper, _require_chattr, which allows the test to explicitly
check to see if the file system supports a specific chattr flag, as
not all file systems support chattr +A or chattr +i, and the presence
of extended attribute support is has nothing to do with a specific
chattr flag being supported.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc         | 16 ++++++++++++++++
 tests/generic/079 |  2 +-
 tests/generic/277 |  2 +-
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/common/rc b/common/rc
index 42415a7..0e5320f 100644
--- a/common/rc
+++ b/common/rc
@@ -3133,6 +3133,22 @@ _xfs_bmapx_find() {
 	"$XFS_IO_PROG" -c "bmap -${param}lpv" "$file" | grep -c "$@"
 }
 
+_require_chattr()
+{
+    attribute=$1
+
+    touch $TEST_DIR/syscalltest
+    chattr "+$attribute" $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1
+    status=$?
+    chattr "-$attribute" $TEST_DIR/syscalltest > $TEST_DIR/syscalltest.out 2>&1
+    if [ "$status" -ne 0 ]; then
+      _notrun "file system doesn't support chattr +$attribute"
+    fi
+    cat $TEST_DIR/syscalltest.out >> $seqres.full
+
+    rm -f $TEST_DIR/syscalltest.out
+}
+
 _get_total_inode()
 {
 	if [ -z "$1" ]; then
diff --git a/tests/generic/079 b/tests/generic/079
index 041d9c0..5cceeba 100755
--- a/tests/generic/079
+++ b/tests/generic/079
@@ -48,7 +48,7 @@ _cleanup()
 _supported_fs generic
 _supported_os Linux
 
-_require_attrs
+_require_chattr i
 _require_scratch
 
 [ -x $timmutable ] || _notrun "t_immutable was not built for this platform"
diff --git a/tests/generic/277 b/tests/generic/277
index f92235b..8e2a32f 100755
--- a/tests/generic/277
+++ b/tests/generic/277
@@ -44,7 +44,7 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 _supported_fs generic
 _supported_os Linux
 _require_scratch
-_require_attrs
+_require_chattr A
 
 _scratch_mkfs > /dev/null 2>&1
 _scratch_mount
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 14/16] xfstests: add executable permission to tests
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (12 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 13/16] xfstests: generic/079 and generic/277 requires chattr, not xattrs Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-17 10:07   ` Christoph Hellwig
  2016-02-13 17:41 ` [PATCH 15/16] xfstests: increase tmpfs memory size Theodore Ts'o
  2016-02-13 17:41 ` [PATCH 16/16] xfstests: remove _need_to_be_root Theodore Ts'o
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 tests/btrfs/026   | 0
 tests/btrfs/104   | 0
 tests/btrfs/114   | 0
 tests/generic/058 | 0
 tests/generic/060 | 0
 tests/generic/061 | 0
 tests/generic/063 | 0
 tests/generic/092 | 0
 tests/generic/094 | 0
 tests/generic/103 | 0
 tests/xfs/140     | 0
 11 files changed, 0 insertions(+), 0 deletions(-)
 mode change 100644 => 100755 tests/btrfs/026
 mode change 100644 => 100755 tests/btrfs/104
 mode change 100644 => 100755 tests/btrfs/114
 mode change 100644 => 100755 tests/generic/058
 mode change 100644 => 100755 tests/generic/060
 mode change 100644 => 100755 tests/generic/061
 mode change 100644 => 100755 tests/generic/063
 mode change 100644 => 100755 tests/generic/092
 mode change 100644 => 100755 tests/generic/094
 mode change 100644 => 100755 tests/generic/103
 mode change 100644 => 100755 tests/xfs/140

diff --git a/tests/btrfs/026 b/tests/btrfs/026
old mode 100644
new mode 100755
diff --git a/tests/btrfs/104 b/tests/btrfs/104
old mode 100644
new mode 100755
diff --git a/tests/btrfs/114 b/tests/btrfs/114
old mode 100644
new mode 100755
diff --git a/tests/generic/058 b/tests/generic/058
old mode 100644
new mode 100755
diff --git a/tests/generic/060 b/tests/generic/060
old mode 100644
new mode 100755
diff --git a/tests/generic/061 b/tests/generic/061
old mode 100644
new mode 100755
diff --git a/tests/generic/063 b/tests/generic/063
old mode 100644
new mode 100755
diff --git a/tests/generic/092 b/tests/generic/092
old mode 100644
new mode 100755
diff --git a/tests/generic/094 b/tests/generic/094
old mode 100644
new mode 100755
diff --git a/tests/generic/103 b/tests/generic/103
old mode 100644
new mode 100755
diff --git a/tests/xfs/140 b/tests/xfs/140
old mode 100644
new mode 100755
-- 
2.5.0


^ permalink raw reply	[flat|nested] 35+ messages in thread

* [PATCH 15/16] xfstests: increase tmpfs memory size
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (13 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 14/16] xfstests: add executable permission to tests Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-17 10:08   ` Christoph Hellwig
  2016-02-13 17:41 ` [PATCH 16/16] xfstests: remove _need_to_be_root Theodore Ts'o
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu, Theodore Ts'o

From: Hugh Dickins <hughd@google.com>

512M is not enough for generic/129.  Raise default tmpfs size to 1G.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/config | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/config b/common/config
index c97facf..cacd815 100644
--- a/common/config
+++ b/common/config
@@ -316,8 +316,8 @@ _mount_opts()
 		export MOUNT_OPTIONS="-o acl $GFS2_MOUNT_OPTIONS"
 		;;
 	tmpfs)
-		# We need to specify the size at mount, use 512 MB by default
-		export MOUNT_OPTIONS="-o size=512M $TMPFS_MOUNT_OPTIONS"
+		# We need to specify the size at mount, use 1G by default
+		export MOUNT_OPTIONS="-o size=1G $TMPFS_MOUNT_OPTIONS"
 		;;
 	*)
 		;;
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH 16/16] xfstests: remove _need_to_be_root
  2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
                   ` (14 preceding siblings ...)
  2016-02-13 17:41 ` [PATCH 15/16] xfstests: increase tmpfs memory size Theodore Ts'o
@ 2016-02-13 17:41 ` Theodore Ts'o
  2016-02-17 10:09   ` Christoph Hellwig
  15 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-13 17:41 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Theodore Ts'o

The check script requires that it be run as root, so adding
individualized checks for this in each teat is not needed.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 README            |  4 ----
 common/dump       |  2 --
 common/rc         | 13 -------------
 tests/btrfs/002   |  1 -
 tests/btrfs/003   |  1 -
 tests/btrfs/004   |  1 -
 tests/btrfs/007   |  1 -
 tests/btrfs/011   |  1 -
 tests/btrfs/017   |  1 -
 tests/btrfs/025   |  1 -
 tests/btrfs/026   |  1 -
 tests/btrfs/029   |  1 -
 tests/btrfs/030   |  1 -
 tests/btrfs/031   |  1 -
 tests/btrfs/034   |  1 -
 tests/btrfs/037   |  1 -
 tests/btrfs/038   |  1 -
 tests/btrfs/039   |  1 -
 tests/btrfs/040   |  1 -
 tests/btrfs/041   |  1 -
 tests/btrfs/043   |  1 -
 tests/btrfs/044   |  1 -
 tests/btrfs/045   |  1 -
 tests/btrfs/046   |  1 -
 tests/btrfs/047   |  1 -
 tests/btrfs/048   |  1 -
 tests/btrfs/049   |  1 -
 tests/btrfs/050   |  1 -
 tests/btrfs/051   |  1 -
 tests/btrfs/052   |  1 -
 tests/btrfs/053   |  1 -
 tests/btrfs/054   |  1 -
 tests/btrfs/055   |  1 -
 tests/btrfs/056   |  1 -
 tests/btrfs/057   |  1 -
 tests/btrfs/058   |  1 -
 tests/btrfs/059   |  1 -
 tests/btrfs/076   |  1 -
 tests/btrfs/077   |  1 -
 tests/btrfs/078   |  1 -
 tests/btrfs/079   |  1 -
 tests/btrfs/080   |  1 -
 tests/btrfs/081   |  1 -
 tests/btrfs/083   |  1 -
 tests/btrfs/084   |  1 -
 tests/btrfs/085   |  1 -
 tests/btrfs/086   |  1 -
 tests/btrfs/087   |  1 -
 tests/btrfs/088   |  1 -
 tests/btrfs/089   |  1 -
 tests/btrfs/091   |  1 -
 tests/btrfs/092   |  1 -
 tests/btrfs/093   |  1 -
 tests/btrfs/094   |  1 -
 tests/btrfs/095   |  1 -
 tests/btrfs/096   |  1 -
 tests/btrfs/097   |  1 -
 tests/btrfs/098   |  1 -
 tests/btrfs/099   |  1 -
 tests/btrfs/100   |  1 -
 tests/btrfs/101   |  1 -
 tests/btrfs/102   |  1 -
 tests/btrfs/103   |  1 -
 tests/btrfs/104   |  1 -
 tests/btrfs/105   |  3 +--
 tests/btrfs/106   |  1 -
 tests/btrfs/107   |  1 -
 tests/btrfs/108   |  1 -
 tests/btrfs/109   |  1 -
 tests/btrfs/110   |  1 -
 tests/btrfs/111   |  1 -
 tests/btrfs/112   |  1 -
 tests/btrfs/113   |  1 -
 tests/btrfs/116   |  1 -
 tests/btrfs/117   |  1 -
 tests/ext4/271    |  1 -
 tests/ext4/301    |  1 -
 tests/ext4/302    |  1 -
 tests/ext4/303    |  1 -
 tests/ext4/304    |  1 -
 tests/ext4/307    |  1 -
 tests/ext4/308    |  1 -
 tests/generic/019 |  1 -
 tests/generic/026 |  1 -
 tests/generic/034 |  1 -
 tests/generic/037 |  1 -
 tests/generic/038 |  1 -
 tests/generic/039 |  1 -
 tests/generic/040 |  1 -
 tests/generic/041 |  1 -
 tests/generic/056 |  1 -
 tests/generic/057 |  1 -
 tests/generic/059 |  1 -
 tests/generic/065 |  1 -
 tests/generic/066 |  1 -
 tests/generic/071 |  1 -
 tests/generic/073 |  1 -
 tests/generic/090 |  1 -
 tests/generic/093 |  2 --
 tests/generic/098 |  1 -
 tests/generic/101 |  1 -
 tests/generic/102 |  1 -
 tests/generic/104 |  1 -
 tests/generic/106 |  1 -
 tests/generic/107 |  1 -
 tests/generic/177 |  1 -
 tests/generic/193 |  1 -
 tests/generic/230 |  1 -
 tests/generic/231 |  1 -
 tests/generic/232 |  1 -
 tests/generic/233 |  1 -
 tests/generic/234 |  1 -
 tests/generic/235 |  1 -
 tests/generic/237 |  1 -
 tests/generic/265 |  1 -
 tests/generic/266 |  1 -
 tests/generic/267 |  1 -
 tests/generic/268 |  1 -
 tests/generic/269 |  1 -
 tests/generic/270 |  1 -
 tests/generic/271 |  1 -
 tests/generic/272 |  1 -
 tests/generic/276 |  1 -
 tests/generic/278 |  1 -
 tests/generic/279 |  1 -
 tests/generic/281 |  1 -
 tests/generic/282 |  1 -
 tests/generic/283 |  1 -
 tests/generic/299 |  1 -
 tests/generic/300 |  1 -
 tests/generic/311 |  1 -
 tests/generic/314 |  1 -
 tests/generic/317 |  1 -
 tests/generic/318 |  1 -
 tests/generic/319 |  1 -
 tests/generic/321 |  1 -
 tests/generic/322 |  1 -
 tests/generic/324 |  1 -
 tests/generic/325 |  1 -
 tests/shared/002  |  1 -
 tests/shared/051  |  1 -
 tests/shared/272  |  1 -
 tests/xfs/003     |  2 --
 tests/xfs/004     |  1 -
 tests/xfs/067     |  1 -
 tests/xfs/114     |  1 -
 tests/xfs/189     |  1 -
 147 files changed, 1 insertion(+), 166 deletions(-)

diff --git a/README b/README
index 7fa0089..c0d966d 100644
--- a/README
+++ b/README
@@ -172,10 +172,6 @@ Test script environment:
      3. By default, tests are run as the same uid as the person
 	executing the control script "check" that runs the test scripts.
 
-	If you need to be root, add a call to the shell procedure
-	_need_to_be_root ... this will do nothing or exit with an
-	error message depending on your current uid.
-
      4. Some other useful shell procedures:
 
 	_get_fqdn		- echo the host's fully qualified
diff --git a/common/dump b/common/dump
index 2db7378..d6663e0 100644
--- a/common/dump
+++ b/common/dump
@@ -60,8 +60,6 @@ session_label="stress_$seq"
 nobody=4 # define this uid/gid as a number
 do_quota_check=true # do quota check if quotas enabled
 
-_need_to_be_root
-
 # install our cleaner
 trap "_cleanup; exit \$status" 0 1 2 3 15
 
diff --git a/common/rc b/common/rc
index 0e5320f..370464b 100644
--- a/common/rc
+++ b/common/rc
@@ -1076,19 +1076,6 @@ _fix_malloc()
     '
 }
 
-# check if run as root
-#
-_need_to_be_root()
-{
-    id=`id | $SED_PROG -e 's/(.*//' -e 's/.*=//'`
-    if [ "$id" -ne 0 ]
-    then
-	echo "Arrgh ... you need to be root (not uid=$id) to run this test"
-	exit 1
-    fi
-}
-
-
 #
 # _df_device : get an IRIX style df line for a given device
 #
diff --git a/tests/btrfs/002 b/tests/btrfs/002
index 35e857b..fce5d95 100755
--- a/tests/btrfs/002
+++ b/tests/btrfs/002
@@ -41,7 +41,6 @@ trap "_cleanup ; exit \$status" 0 1 2 3 15
 . ./common/rc
 . ./common/filter
 
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/003 b/tests/btrfs/003
index ae7e377..51cff46 100755
--- a/tests/btrfs/003
+++ b/tests/btrfs/003
@@ -46,7 +46,6 @@ _cleanup()
 . ./common/rc
 . ./common/filter
 
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/004 b/tests/btrfs/004
index d588c5b..905770a 100755
--- a/tests/btrfs/004
+++ b/tests/btrfs/004
@@ -47,7 +47,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/007 b/tests/btrfs/007
index 82d093a..57f9a79 100755
--- a/tests/btrfs/007
+++ b/tests/btrfs/007
@@ -47,7 +47,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/011 b/tests/btrfs/011
index 72c53ab..91ddebb 100755
--- a/tests/btrfs/011
+++ b/tests/btrfs/011
@@ -59,7 +59,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _require_scratch_nocheck
 _require_scratch_dev_pool 4
diff --git a/tests/btrfs/017 b/tests/btrfs/017
index 34c5f0a..3f409d3 100755
--- a/tests/btrfs/017
+++ b/tests/btrfs/017
@@ -48,7 +48,6 @@ _cleanup()
 
 # real QA test starts here
 
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/025 b/tests/btrfs/025
index 76ec2dd..81ae943 100755
--- a/tests/btrfs/025
+++ b/tests/btrfs/025
@@ -47,7 +47,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/026 b/tests/btrfs/026
index 60908cc..876651d 100755
--- a/tests/btrfs/026
+++ b/tests/btrfs/026
@@ -42,7 +42,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/029 b/tests/btrfs/029
index 87c289b..c390c95 100755
--- a/tests/btrfs/029
+++ b/tests/btrfs/029
@@ -55,7 +55,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_cp_reflink
-_need_to_be_root
 
 reflink_test_dir=$TEST_DIR/test-$seq
 rm -rf $reflink_test_dir
diff --git a/tests/btrfs/030 b/tests/btrfs/030
index a76a410..a8e08f6 100755
--- a/tests/btrfs/030
+++ b/tests/btrfs/030
@@ -54,7 +54,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/031 b/tests/btrfs/031
index fe8cd4e..c2b11dd 100755
--- a/tests/btrfs/031
+++ b/tests/btrfs/031
@@ -52,7 +52,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_cp_reflink
-_need_to_be_root
 
 _checksum_files()
 {
diff --git a/tests/btrfs/034 b/tests/btrfs/034
index 38952a3..179c827 100755
--- a/tests/btrfs/034
+++ b/tests/btrfs/034
@@ -44,7 +44,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/037 b/tests/btrfs/037
index 2591a33..5c0ea66 100755
--- a/tests/btrfs/037
+++ b/tests/btrfs/037
@@ -51,7 +51,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/038 b/tests/btrfs/038
index 4941d3e..d75ed48 100755
--- a/tests/btrfs/038
+++ b/tests/btrfs/038
@@ -50,7 +50,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/039 b/tests/btrfs/039
index 758b23c..ac7144f 100755
--- a/tests/btrfs/039
+++ b/tests/btrfs/039
@@ -53,7 +53,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/040 b/tests/btrfs/040
index dfd495c..c97ed50 100755
--- a/tests/btrfs/040
+++ b/tests/btrfs/040
@@ -53,7 +53,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/041 b/tests/btrfs/041
index 9639787..8bb74cd 100755
--- a/tests/btrfs/041
+++ b/tests/btrfs/041
@@ -53,7 +53,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_test
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 mkdir $restore_dir
diff --git a/tests/btrfs/043 b/tests/btrfs/043
index 4993349..1ba5acd 100755
--- a/tests/btrfs/043
+++ b/tests/btrfs/043
@@ -49,7 +49,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/044 b/tests/btrfs/044
index 5565b86..9d6d212 100755
--- a/tests/btrfs/044
+++ b/tests/btrfs/044
@@ -54,7 +54,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/045 b/tests/btrfs/045
index 8570fa6..bdafbab 100755
--- a/tests/btrfs/045
+++ b/tests/btrfs/045
@@ -70,7 +70,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/046 b/tests/btrfs/046
index 288fb7f..6bf5000 100755
--- a/tests/btrfs/046
+++ b/tests/btrfs/046
@@ -54,7 +54,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 rm -f $seqres.full
 rm -fr $send_files_dir
diff --git a/tests/btrfs/047 b/tests/btrfs/047
index 2c50bf6..6d7d351 100755
--- a/tests/btrfs/047
+++ b/tests/btrfs/047
@@ -62,7 +62,6 @@ _require_scratch
 _require_fssum
 _require_xfs_io_command "fiemap"
 _require_btrfs_send_stream_version
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/048 b/tests/btrfs/048
index dc7386d..c2cb4a6 100755
--- a/tests/btrfs/048
+++ b/tests/btrfs/048
@@ -48,7 +48,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_btrfs "property"
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/049 b/tests/btrfs/049
index 38ed7ad..4ec5dd8 100755
--- a/tests/btrfs/049
+++ b/tests/btrfs/049
@@ -48,7 +48,6 @@ _cleanup()
 # real QA test starts here
 _supported_fs btrfs
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 
diff --git a/tests/btrfs/050 b/tests/btrfs/050
index b72408a..9a1f5e4 100755
--- a/tests/btrfs/050
+++ b/tests/btrfs/050
@@ -54,7 +54,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/051 b/tests/btrfs/051
index 1ddfb74..9ffbde3 100755
--- a/tests/btrfs/051
+++ b/tests/btrfs/051
@@ -51,7 +51,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/052 b/tests/btrfs/052
index babc127..599d261 100755
--- a/tests/btrfs/052
+++ b/tests/btrfs/052
@@ -45,7 +45,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_cloner
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/053 b/tests/btrfs/053
index 43a831c..06dcaff 100755
--- a/tests/btrfs/053
+++ b/tests/btrfs/053
@@ -54,7 +54,6 @@ _require_test
 _require_scratch
 _require_fssum
 _require_attrs
-_need_to_be_root
 
 # max(16384, PAGE_SIZE) is the default leaf/node size on btrfs-progs v3.12+.
 # Older versions just use max(4096, PAGE_SIZE).
diff --git a/tests/btrfs/054 b/tests/btrfs/054
index 33241b0..606fb40 100755
--- a/tests/btrfs/054
+++ b/tests/btrfs/054
@@ -60,7 +60,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_test
 _require_scratch
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/055 b/tests/btrfs/055
index 1f50850..29afdba 100755
--- a/tests/btrfs/055
+++ b/tests/btrfs/055
@@ -51,7 +51,6 @@ _require_scratch
 _require_cloner
 _require_btrfs_fs_feature "no_holes"
 _require_btrfs_mkfs_feature "no-holes"
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/056 b/tests/btrfs/056
index 6dc3bfd..ef515a1 100755
--- a/tests/btrfs/056
+++ b/tests/btrfs/056
@@ -56,7 +56,6 @@ _require_cloner
 _require_btrfs_fs_feature "no_holes"
 _require_btrfs_mkfs_feature "no-holes"
 _require_dm_target flakey
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/057 b/tests/btrfs/057
index 605bd02..8d35579 100755
--- a/tests/btrfs/057
+++ b/tests/btrfs/057
@@ -42,7 +42,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/058 b/tests/btrfs/058
index 4d45686..ecfe857 100755
--- a/tests/btrfs/058
+++ b/tests/btrfs/058
@@ -56,7 +56,6 @@ _require_scratch
 # Requiring flink command tests for the presence of the -T option used
 # to pass O_TMPFILE to open(2).
 _require_xfs_io_command "flink"
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/059 b/tests/btrfs/059
index 3379ead..b9a6ef4 100755
--- a/tests/btrfs/059
+++ b/tests/btrfs/059
@@ -51,7 +51,6 @@ _supported_os Linux
 _require_test
 _require_scratch
 _require_btrfs "property"
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/076 b/tests/btrfs/076
index 16d674d..1c86d81 100755
--- a/tests/btrfs/076
+++ b/tests/btrfs/076
@@ -50,7 +50,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_test
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/077 b/tests/btrfs/077
index fdaaf9e..e56fe5b 100755
--- a/tests/btrfs/077
+++ b/tests/btrfs/077
@@ -58,7 +58,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/078 b/tests/btrfs/078
index 48de357..2c1dfa3 100755
--- a/tests/btrfs/078
+++ b/tests/btrfs/078
@@ -48,7 +48,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/079 b/tests/btrfs/079
index 4f59ff9..6aee3a3 100755
--- a/tests/btrfs/079
+++ b/tests/btrfs/079
@@ -58,7 +58,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 # Since xfs_io's fiemap always use SYNC flag and can't be unset,
 # we must use filefrag to call fiemap without SYNC flag.
 _require_command "/usr/sbin/filefrag" filefrag
diff --git a/tests/btrfs/080 b/tests/btrfs/080
index a5d3b38..b1474d1 100755
--- a/tests/btrfs/080
+++ b/tests/btrfs/080
@@ -53,7 +53,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch_nocheck
diff --git a/tests/btrfs/081 b/tests/btrfs/081
index 40fa426..c367a01 100755
--- a/tests/btrfs/081
+++ b/tests/btrfs/081
@@ -50,7 +50,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/083 b/tests/btrfs/083
index e4b6767..47fc3e7 100755
--- a/tests/btrfs/083
+++ b/tests/btrfs/083
@@ -52,7 +52,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/084 b/tests/btrfs/084
index a9e26be..55e989a 100755
--- a/tests/btrfs/084
+++ b/tests/btrfs/084
@@ -51,7 +51,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/085 b/tests/btrfs/085
index d82f79a..3dbc67f 100755
--- a/tests/btrfs/085
+++ b/tests/btrfs/085
@@ -55,7 +55,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_dm_target flakey
-_need_to_be_root
 
 BTRFS_DEBUG_TREE_PROG="`set_prog_path btrfs-debug-tree`"
 _require_command "$BTRFS_DEBUG_TREE_PROG" btrfs-debug-tree
diff --git a/tests/btrfs/086 b/tests/btrfs/086
index 77c8da6..ea5489b 100755
--- a/tests/btrfs/086
+++ b/tests/btrfs/086
@@ -53,7 +53,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_cloner
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/087 b/tests/btrfs/087
index b8ee3e1..b4a62e5 100755
--- a/tests/btrfs/087
+++ b/tests/btrfs/087
@@ -57,7 +57,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/088 b/tests/btrfs/088
index 79268ec..7b8e128 100755
--- a/tests/btrfs/088
+++ b/tests/btrfs/088
@@ -51,7 +51,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fail_make_request
-_need_to_be_root
 
 SYSFS_BDEV=`_sysfs_dev $SCRATCH_DEV`
 
diff --git a/tests/btrfs/089 b/tests/btrfs/089
index 5372698..db7d511 100755
--- a/tests/btrfs/089
+++ b/tests/btrfs/089
@@ -46,7 +46,6 @@ _cleanup()
 # real QA test starts here
 
 # Modify as appropriate.
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/091 b/tests/btrfs/091
index feac551..16b5c16 100755
--- a/tests/btrfs/091
+++ b/tests/btrfs/091
@@ -43,7 +43,6 @@ _cleanup()
 
 # real QA test starts here
 
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/092 b/tests/btrfs/092
index d727493..71fceec 100755
--- a/tests/btrfs/092
+++ b/tests/btrfs/092
@@ -56,7 +56,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_fssum
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/093 b/tests/btrfs/093
index 643c6be..64b7aa2 100755
--- a/tests/btrfs/093
+++ b/tests/btrfs/093
@@ -50,7 +50,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_cloner
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/094 b/tests/btrfs/094
index 45f108d..52b7ed2 100755
--- a/tests/btrfs/094
+++ b/tests/btrfs/094
@@ -56,7 +56,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_cloner
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/095 b/tests/btrfs/095
index dec530c..b477b57 100755
--- a/tests/btrfs/095
+++ b/tests/btrfs/095
@@ -48,7 +48,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/096 b/tests/btrfs/096
index 896a209..039e09d 100755
--- a/tests/btrfs/096
+++ b/tests/btrfs/096
@@ -40,7 +40,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/097 b/tests/btrfs/097
index d1cfff1..4b4dd18 100755
--- a/tests/btrfs/097
+++ b/tests/btrfs/097
@@ -46,7 +46,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_cloner
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/098 b/tests/btrfs/098
index 49f6d16..f916c37 100755
--- a/tests/btrfs/098
+++ b/tests/btrfs/098
@@ -44,7 +44,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/099 b/tests/btrfs/099
index 05e1ad2..70f07b5 100755
--- a/tests/btrfs/099
+++ b/tests/btrfs/099
@@ -46,7 +46,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 # Use big blocksize to ensure there is still enough space left for metadata
 # space reserve.
diff --git a/tests/btrfs/100 b/tests/btrfs/100
index cd385e1..38f53f8 100755
--- a/tests/btrfs/100
+++ b/tests/btrfs/100
@@ -44,7 +44,6 @@ _cleanup()
 
 _supported_fs btrfs
 _supported_os Linux
-_need_to_be_root
 _require_scratch_dev_pool 3
 _require_dm_target error
 
diff --git a/tests/btrfs/101 b/tests/btrfs/101
index 8d7af85..ed91457 100755
--- a/tests/btrfs/101
+++ b/tests/btrfs/101
@@ -44,7 +44,6 @@ _cleanup()
 
 _supported_fs btrfs
 _supported_os Linux
-_need_to_be_root
 _require_scratch_dev_pool 3
 _require_btrfs_dev_del_by_devid
 _require_dm_target error
diff --git a/tests/btrfs/102 b/tests/btrfs/102
index 9f0bea0..7a33c6b 100755
--- a/tests/btrfs/102
+++ b/tests/btrfs/102
@@ -41,7 +41,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/103 b/tests/btrfs/103
index a5a252a..caa979a 100755
--- a/tests/btrfs/103
+++ b/tests/btrfs/103
@@ -41,7 +41,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/104 b/tests/btrfs/104
index efc0d74..6afaa02 100755
--- a/tests/btrfs/104
+++ b/tests/btrfs/104
@@ -58,7 +58,6 @@ rm -f $seqres.full
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/btrfs/105 b/tests/btrfs/105
index be051fe..cdbdb8f 100755
--- a/tests/btrfs/105
+++ b/tests/btrfs/105
@@ -48,7 +48,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
@@ -109,4 +108,4 @@ echo "File digest in the new filesystem:"
 md5sum $SCRATCH_MNT/mysnap2_ro/foo/bar | _filter_scratch
 
 status=0
-exit
\ No newline at end of file
+exit
diff --git a/tests/btrfs/106 b/tests/btrfs/106
index c7e61f7..98f0d08 100755
--- a/tests/btrfs/106
+++ b/tests/btrfs/106
@@ -43,7 +43,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/107 b/tests/btrfs/107
index a5ad71a..e5516e6 100755
--- a/tests/btrfs/107
+++ b/tests/btrfs/107
@@ -50,7 +50,6 @@ rm -f $seqres.full
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 # Use 64K file size to match any sectorsize
 # And with a unaligned tailing range to ensure it will be at least 2 pages
diff --git a/tests/btrfs/108 b/tests/btrfs/108
index 18e5b99..9c6d35d 100755
--- a/tests/btrfs/108
+++ b/tests/btrfs/108
@@ -47,7 +47,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 _require_cp_reflink
 _require_xfs_io_command "fpunch"
 
diff --git a/tests/btrfs/109 b/tests/btrfs/109
index b86336c..8ee1aa1 100755
--- a/tests/btrfs/109
+++ b/tests/btrfs/109
@@ -47,7 +47,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 _require_cp_reflink
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
diff --git a/tests/btrfs/110 b/tests/btrfs/110
index 45c0ce3..7548af4 100755
--- a/tests/btrfs/110
+++ b/tests/btrfs/110
@@ -46,7 +46,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/111 b/tests/btrfs/111
index e597db7..56085dc 100755
--- a/tests/btrfs/111
+++ b/tests/btrfs/111
@@ -46,7 +46,6 @@ _cleanup()
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
-_need_to_be_root
 
 send_files_dir=$TEST_DIR/btrfs-test-$seq
 
diff --git a/tests/btrfs/112 b/tests/btrfs/112
index 45f68fc..a0177f6 100755
--- a/tests/btrfs/112
+++ b/tests/btrfs/112
@@ -42,7 +42,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/113 b/tests/btrfs/113
index 72866aa..93ab47d 100755
--- a/tests/btrfs/113
+++ b/tests/btrfs/113
@@ -44,7 +44,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/116 b/tests/btrfs/116
index c51e135..1ea88c1 100755
--- a/tests/btrfs/116
+++ b/tests/btrfs/116
@@ -44,7 +44,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs btrfs
 _supported_os Linux
 _require_scratch
diff --git a/tests/btrfs/117 b/tests/btrfs/117
index f2e58de..a028da5 100755
--- a/tests/btrfs/117
+++ b/tests/btrfs/117
@@ -49,7 +49,6 @@ _supported_fs btrfs
 _supported_os Linux
 _require_scratch
 _require_cp_reflink
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/ext4/271 b/tests/ext4/271
index 217d0d8..844364f 100755
--- a/tests/ext4/271
+++ b/tests/ext4/271
@@ -38,7 +38,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs ext4
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 
 rm -f $seqres.full
diff --git a/tests/ext4/301 b/tests/ext4/301
index d6547c5..4e21acd 100755
--- a/tests/ext4/301
+++ b/tests/ext4/301
@@ -40,7 +40,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_os Linux
 _supported_fs ext4
-_need_to_be_root
 _require_scratch
 _require_defrag
 
diff --git a/tests/ext4/302 b/tests/ext4/302
index 45cd28c..6ed8ce0 100755
--- a/tests/ext4/302
+++ b/tests/ext4/302
@@ -41,7 +41,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_os Linux
 _supported_fs ext4
-_need_to_be_root
 _require_scratch
 _require_defrag
 
diff --git a/tests/ext4/303 b/tests/ext4/303
index 64a6405..b925aa3 100755
--- a/tests/ext4/303
+++ b/tests/ext4/303
@@ -41,7 +41,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_os Linux
 _supported_fs ext4
-_need_to_be_root
 _require_scratch
 _require_defrag
 
diff --git a/tests/ext4/304 b/tests/ext4/304
index cc03190..ceb82d6 100755
--- a/tests/ext4/304
+++ b/tests/ext4/304
@@ -42,7 +42,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_os Linux
 _supported_fs ext4
-_need_to_be_root
 _require_scratch
 _require_defrag
 
diff --git a/tests/ext4/307 b/tests/ext4/307
index 673b9ce..505737d 100755
--- a/tests/ext4/307
+++ b/tests/ext4/307
@@ -61,7 +61,6 @@ _workout()
 _supported_fs generic
 _supported_fs ext4
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_defrag
 _require_xfs_io_command "falloc"
diff --git a/tests/ext4/308 b/tests/ext4/308
index 948ff3f..74bfc1b 100755
--- a/tests/ext4/308
+++ b/tests/ext4/308
@@ -43,7 +43,6 @@ _cleanup()
 
 # real QA test starts here
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_defrag
 _require_xfs_io_command "falloc"
diff --git a/tests/generic/019 b/tests/generic/019
index 1137ffe..84e62f5 100755
--- a/tests/generic/019
+++ b/tests/generic/019
@@ -37,7 +37,6 @@ status=1	# failure is the default!
 . ./common/filter
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_fail_make_request
 
diff --git a/tests/generic/026 b/tests/generic/026
index ab75839..4d3fac6 100755
--- a/tests/generic/026
+++ b/tests/generic/026
@@ -50,7 +50,6 @@ _supported_fs generic
 _supported_os Linux
 _require_test
 _require_scratch
-_need_to_be_root
 _acl_setup_ids
 _require_acls
 _require_acl_get_max
diff --git a/tests/generic/034 b/tests/generic/034
index 1065c70..6727b98 100755
--- a/tests/generic/034
+++ b/tests/generic/034
@@ -50,7 +50,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/037 b/tests/generic/037
index 76e3bf4..d7dcfe2 100755
--- a/tests/generic/037
+++ b/tests/generic/037
@@ -51,7 +51,6 @@ _cleanup()
 . ./common/attr
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/038 b/tests/generic/038
index 4d3977a..59aed67 100755
--- a/tests/generic/038
+++ b/tests/generic/038
@@ -65,7 +65,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/039 b/tests/generic/039
index 21c04d2..7d62393 100755
--- a/tests/generic/039
+++ b/tests/generic/039
@@ -54,7 +54,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/040 b/tests/generic/040
index 7e90e00..2aeccdd 100755
--- a/tests/generic/040
+++ b/tests/generic/040
@@ -59,7 +59,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/041 b/tests/generic/041
index 7816389..283c305 100755
--- a/tests/generic/041
+++ b/tests/generic/041
@@ -63,7 +63,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/056 b/tests/generic/056
index b720690..6ca3b1a 100755
--- a/tests/generic/056
+++ b/tests/generic/056
@@ -52,7 +52,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/057 b/tests/generic/057
index fa4d17a..76f438e 100755
--- a/tests/generic/057
+++ b/tests/generic/057
@@ -52,7 +52,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/059 b/tests/generic/059
index de4e7ce..c3a6044 100755
--- a/tests/generic/059
+++ b/tests/generic/059
@@ -57,7 +57,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/065 b/tests/generic/065
index 37077d5..935f414 100755
--- a/tests/generic/065
+++ b/tests/generic/065
@@ -53,7 +53,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/066 b/tests/generic/066
index 3c215bd..c42b11b 100755
--- a/tests/generic/066
+++ b/tests/generic/066
@@ -57,7 +57,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_attrs
diff --git a/tests/generic/071 b/tests/generic/071
index 1b0f558..65ed0c7 100755
--- a/tests/generic/071
+++ b/tests/generic/071
@@ -45,7 +45,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_xfs_io_command "falloc"
 
diff --git a/tests/generic/073 b/tests/generic/073
index 1c92c66..9e3794f 100755
--- a/tests/generic/073
+++ b/tests/generic/073
@@ -53,7 +53,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/090 b/tests/generic/090
index 1bc9b16..eeb1831 100755
--- a/tests/generic/090
+++ b/tests/generic/090
@@ -51,7 +51,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/093 b/tests/generic/093
index 8f810a6..af58888 100755
--- a/tests/generic/093
+++ b/tests/generic/093
@@ -65,8 +65,6 @@ _require_attrs
 
 rm -f $seqres.full
 
-_need_to_be_root
-
 echo "QA output created by $seq"
 echo ""
 file=$TEST_DIR/$seq.file
diff --git a/tests/generic/098 b/tests/generic/098
index 4945630..838bb5d 100755
--- a/tests/generic/098
+++ b/tests/generic/098
@@ -46,7 +46,6 @@ _cleanup()
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/101 b/tests/generic/101
index 8771a17..f4f6c36 100755
--- a/tests/generic/101
+++ b/tests/generic/101
@@ -47,7 +47,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/102 b/tests/generic/102
index abc3994..3cdc2ba 100755
--- a/tests/generic/102
+++ b/tests/generic/102
@@ -41,7 +41,6 @@ trap "exit \$status" 0 1 2 3 15
 . ./common/filter
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/104 b/tests/generic/104
index ceab94b..7917199 100755
--- a/tests/generic/104
+++ b/tests/generic/104
@@ -45,7 +45,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/106 b/tests/generic/106
index 9dd2e6b..efad8c8 100755
--- a/tests/generic/106
+++ b/tests/generic/106
@@ -44,7 +44,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/107 b/tests/generic/107
index 6b5f2bb..e0a9245 100755
--- a/tests/generic/107
+++ b/tests/generic/107
@@ -47,7 +47,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/177 b/tests/generic/177
index c11d1c6..0aeb8e4 100755
--- a/tests/generic/177
+++ b/tests/generic/177
@@ -48,7 +48,6 @@ _cleanup()
 . ./common/dmflakey
 
 # real QA test starts here
-_need_to_be_root
 _supported_fs generic
 _supported_os Linux
 _require_scratch
diff --git a/tests/generic/193 b/tests/generic/193
index cd3c0b0..6d0754f 100755
--- a/tests/generic/193
+++ b/tests/generic/193
@@ -72,7 +72,6 @@ _supported_os Linux
 
 _require_test
 _require_user
-_need_to_be_root
 
 test_root=$TEST_DIR/$seq.$$.root
 test_user=$TEST_DIR/$seq.$$.user
diff --git a/tests/generic/230 b/tests/generic/230
index 0b1b3bf..8efa65d 100755
--- a/tests/generic/230
+++ b/tests/generic/230
@@ -45,7 +45,6 @@ _supported_os Linux #IRIX
 _require_scratch
 _require_quota
 _require_user
-_need_to_be_root
 
 test_files()
 {
diff --git a/tests/generic/231 b/tests/generic/231
index feda0c1..3133cfe 100755
--- a/tests/generic/231
+++ b/tests/generic/231
@@ -69,7 +69,6 @@ _supported_os Linux
 _require_scratch
 _require_quota
 _require_user
-_need_to_be_root
 
 _scratch_mkfs >> $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
diff --git a/tests/generic/232 b/tests/generic/232
index 1323809..6b19779 100755
--- a/tests/generic/232
+++ b/tests/generic/232
@@ -69,7 +69,6 @@ _supported_fs generic
 _supported_os Linux
 _require_scratch
 _require_quota
-_need_to_be_root
 
 _scratch_mkfs > $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
diff --git a/tests/generic/233 b/tests/generic/233
index d50d280..1405d0e 100755
--- a/tests/generic/233
+++ b/tests/generic/233
@@ -74,7 +74,6 @@ _supported_os Linux
 _require_scratch
 _require_quota
 _require_user
-_need_to_be_root
 
 _scratch_mkfs > $seqres.full 2>&1
 _scratch_mount "-o usrquota,grpquota"
diff --git a/tests/generic/234 b/tests/generic/234
index 30be0e9..75a2c23 100755
--- a/tests/generic/234
+++ b/tests/generic/234
@@ -91,7 +91,6 @@ _supported_fs generic
 _supported_os Linux #IRIX
 _require_scratch
 _require_quota
-_need_to_be_root
 
 # real QA test starts here
 rm -f $seqres.full
diff --git a/tests/generic/235 b/tests/generic/235
index e27fd3d..59456b6 100755
--- a/tests/generic/235
+++ b/tests/generic/235
@@ -45,7 +45,6 @@ _supported_os Linux #IRIX
 _require_scratch
 _require_quota
 _require_user
-_need_to_be_root
 
 # real QA test starts here
 rm -f $seqres.full
diff --git a/tests/generic/237 b/tests/generic/237
index f2669cd..75b1b55 100755
--- a/tests/generic/237
+++ b/tests/generic/237
@@ -55,7 +55,6 @@ _require_test
 
 rm -f $seqres.full
 
-_need_to_be_root
 _acl_setup_ids
 _require_acls
 
diff --git a/tests/generic/265 b/tests/generic/265
index 607867d..8e9d5bc 100755
--- a/tests/generic/265
+++ b/tests/generic/265
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/266 b/tests/generic/266
index 102df76..4f9816a 100755
--- a/tests/generic/266
+++ b/tests/generic/266
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/267 b/tests/generic/267
index 24b7b7c..e3a6b0c 100755
--- a/tests/generic/267
+++ b/tests/generic/267
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/268 b/tests/generic/268
index c17ea57..c7dcd57 100755
--- a/tests/generic/268
+++ b/tests/generic/268
@@ -47,7 +47,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/269 b/tests/generic/269
index d2043d4..ee353a5 100755
--- a/tests/generic/269
+++ b/tests/generic/269
@@ -64,7 +64,6 @@ _workout()
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 
 rm -f $seqres.full
diff --git a/tests/generic/270 b/tests/generic/270
index 255ebf2..e6874c9 100755
--- a/tests/generic/270
+++ b/tests/generic/270
@@ -78,7 +78,6 @@ _supported_fs generic
 _supported_os Linux
 _require_quota
 _require_user
-_need_to_be_root
 _require_scratch
 
 rm -f $seqres.full
diff --git a/tests/generic/271 b/tests/generic/271
index 955478e..fc3c3c6 100755
--- a/tests/generic/271
+++ b/tests/generic/271
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 _require_odirect
 
diff --git a/tests/generic/272 b/tests/generic/272
index 7560214..feaadae 100755
--- a/tests/generic/272
+++ b/tests/generic/272
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 _require_odirect
 
diff --git a/tests/generic/276 b/tests/generic/276
index 560daba..c6d7a63 100755
--- a/tests/generic/276
+++ b/tests/generic/276
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 _require_odirect
 
diff --git a/tests/generic/278 b/tests/generic/278
index 6d0c828..527356d 100755
--- a/tests/generic/278
+++ b/tests/generic/278
@@ -47,7 +47,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 _require_odirect
 
diff --git a/tests/generic/279 b/tests/generic/279
index 67da34b..2f1ec4f 100755
--- a/tests/generic/279
+++ b/tests/generic/279
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/281 b/tests/generic/281
index 71e3dd7..c95acf2 100755
--- a/tests/generic/281
+++ b/tests/generic/281
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/282 b/tests/generic/282
index 38714e0..6452025 100755
--- a/tests/generic/282
+++ b/tests/generic/282
@@ -46,7 +46,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/283 b/tests/generic/283
index 6d8701f..8d56ac3 100755
--- a/tests/generic/283
+++ b/tests/generic/283
@@ -47,7 +47,6 @@ _cleanup()
 _supported_os Linux
 _require_scratch_reflink
 _require_cp_reflink
-_need_to_be_root
 _require_dm_target error
 
 rm -f $seqres.full
diff --git a/tests/generic/299 b/tests/generic/299
index 4174de0..40265c8 100755
--- a/tests/generic/299
+++ b/tests/generic/299
@@ -41,7 +41,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_odirect
 
diff --git a/tests/generic/300 b/tests/generic/300
index a12aba6..c187f43 100755
--- a/tests/generic/300
+++ b/tests/generic/300
@@ -41,7 +41,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_odirect
 
diff --git a/tests/generic/311 b/tests/generic/311
index 69bc1bf..2d4413b 100755
--- a/tests/generic/311
+++ b/tests/generic/311
@@ -53,7 +53,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch_nocheck
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/314 b/tests/generic/314
index 294fb23..65d3513 100755
--- a/tests/generic/314
+++ b/tests/generic/314
@@ -46,7 +46,6 @@ _supported_fs generic
 _require_test
 _require_acls
 _require_user
-_need_to_be_root
 
 rm -rf $TEST_DIR/$seq-dir
 
diff --git a/tests/generic/317 b/tests/generic/317
index a5d8804..9d9499b 100755
--- a/tests/generic/317
+++ b/tests/generic/317
@@ -58,7 +58,6 @@ _supported_os Linux
 rm -f $seqres.full
 
 _require_scratch
-_need_to_be_root
 _require_user
 _require_ugid_map
 _require_userns
diff --git a/tests/generic/318 b/tests/generic/318
index f850a9b..e284317 100755
--- a/tests/generic/318
+++ b/tests/generic/318
@@ -58,7 +58,6 @@ _supported_os Linux
 rm -f $seqres.full
 
 _require_scratch
-_need_to_be_root
 _acl_setup_ids
 _require_acls
 _require_ugid_map
diff --git a/tests/generic/319 b/tests/generic/319
index 046969f..d1eea4a 100755
--- a/tests/generic/319
+++ b/tests/generic/319
@@ -52,7 +52,6 @@ _supported_os Linux
 _supported_fs generic
 _require_acls
 _require_scratch
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/generic/321 b/tests/generic/321
index 7c6c823..8798503 100755
--- a/tests/generic/321
+++ b/tests/generic/321
@@ -42,7 +42,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch_nocheck
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/322 b/tests/generic/322
index 9c925a4..475a31c 100755
--- a/tests/generic/322
+++ b/tests/generic/322
@@ -42,7 +42,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch_nocheck
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/generic/324 b/tests/generic/324
index 5e642dc..47cb3db 100755
--- a/tests/generic/324
+++ b/tests/generic/324
@@ -41,7 +41,6 @@ _cleanup()
 
 # real QA test starts here
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_defrag
 _require_xfs_io_command "falloc"
diff --git a/tests/generic/325 b/tests/generic/325
index 0994ff6..a0b641a 100755
--- a/tests/generic/325
+++ b/tests/generic/325
@@ -52,7 +52,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # real QA test starts here
 _supported_fs generic
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_metadata_journaling $SCRATCH_DEV
diff --git a/tests/shared/002 b/tests/shared/002
index eb8713b..88b2826 100755
--- a/tests/shared/002
+++ b/tests/shared/002
@@ -57,7 +57,6 @@ trap "_cleanup; exit \$status" 0 1 2 3 15
 # less than 1000 xattrs with very small values.
 _supported_fs btrfs xfs
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 _require_dm_target flakey
 _require_attrs
diff --git a/tests/shared/051 b/tests/shared/051
index 262cef1..1b2d2cf 100755
--- a/tests/shared/051
+++ b/tests/shared/051
@@ -76,7 +76,6 @@ _require_test
 
 rm -f $seqres.full
 
-_need_to_be_root
 _acl_setup_ids
 _require_acls
 
diff --git a/tests/shared/272 b/tests/shared/272
index 11b2a00..8ec2c36 100755
--- a/tests/shared/272
+++ b/tests/shared/272
@@ -84,7 +84,6 @@ chattr_opt: $chattr_opt" >>$seqres.full
 # real QA test starts here
 _supported_fs ext3 ext4
 _supported_os Linux
-_need_to_be_root
 _require_scratch
 
 rm -f $seqres.full
diff --git a/tests/xfs/003 b/tests/xfs/003
index 2eed40f..0fd4cfa 100755
--- a/tests/xfs/003
+++ b/tests/xfs/003
@@ -35,8 +35,6 @@ here=`pwd`
 status=0	# success is the default!
 trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 
-_need_to_be_root
-
 # real QA test starts here
 _supported_fs xfs
 _supported_os IRIX Linux
diff --git a/tests/xfs/004 b/tests/xfs/004
index cf17286..59b8997 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -60,7 +60,6 @@ _populate_scratch()
 _supported_fs xfs
 _supported_os IRIX Linux
 
-_need_to_be_root
 _require_scratch
 _require_no_large_scratch_dev
 
diff --git a/tests/xfs/067 b/tests/xfs/067
index 27f5713..c68ec09 100755
--- a/tests/xfs/067
+++ b/tests/xfs/067
@@ -40,7 +40,6 @@ trap "rm -f $tmp.*; exit \$status" 0 1 2 3 15
 _supported_fs xfs
 _supported_os Linux
 
-_need_to_be_root
 _require_attrs
 _require_acls
 _require_scratch
diff --git a/tests/xfs/114 b/tests/xfs/114
index f8601ec..50cc71b 100755
--- a/tests/xfs/114
+++ b/tests/xfs/114
@@ -309,7 +309,6 @@ _supported_os IRIX
 
 _require_scratch
 _require_attrs
-_need_to_be_root
 
 rm -f $seqres.full
 
diff --git a/tests/xfs/189 b/tests/xfs/189
index 540a0d7..636f6f0 100755
--- a/tests/xfs/189
+++ b/tests/xfs/189
@@ -236,7 +236,6 @@ _putback_scratch_fstab()
 _supported_fs xfs
 _supported_os Linux
 
-_need_to_be_root
 _require_scratch
 _require_noattr2
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [PATCH-v3a 09/16] xfstests: do not unmount tmpfs during remount
  2016-02-13 17:41 ` [PATCH 09/16] xfstests: do not unmount tmpfs during remount Theodore Ts'o
@ 2016-02-16  6:43   ` Theodore Ts'o
  2016-02-17  3:05     ` [PATCH-v3b " Theodore Ts'o
  0 siblings, 1 reply; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-16  6:43 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu

I screwed up the test generic/135 in the previous version of the
commit.  Here is a revised version, which avoids an EBUSY due to CWD
being in SCRATCH_MNT when we attempted to unmount it.

      	 	     	     	       	  	  - Ted

>From a46e47d549f0d43f6c32f54e89817cc1a602b9bf Mon Sep 17 00:00:00 2001
From: Junho Ryu <jayr@google.com>
Date: Wed, 18 Dec 2013 10:16:01 -0800
Subject: [PATCH] xfstests: do not unmount tmpfs during remount

Several tests unmount then re-mount the scratch filesystem, to check
that the content is unchanged; but unmounting a tmpfs is designed to
lose its content, which causes such tests to fail unnecessarily.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc             | 23 ++++++++++++++++++++++-
 tests/generic/003     | 20 ++++++++------------
 tests/generic/135     | 19 +++++--------------
 tests/generic/169     | 20 ++++++--------------
 tests/generic/169.out |  6 ++----
 tests/generic/192     |  3 +--
 tests/generic/226     |  3 +--
 tests/generic/258     |  3 +--
 tests/generic/306     |  3 +--
 tests/generic/317     |  3 +--
 tests/generic/318     |  3 +--
 11 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/common/rc b/common/rc
index 18d1a00..42415a7 100644
--- a/common/rc
+++ b/common/rc
@@ -329,10 +329,28 @@ _scratch_unmount()
 	esac
 }
 
+_scratch_remount()
+{
+    local opts="$1"
+
+    if test -n "$opts"; then
+	mount -o "remount,$opts" $SCRATCH_MNT
+    fi
+}
+
 _scratch_cycle_mount()
 {
+    local opts="$1"
+
+    if [ "$FSTYP" = tmpfs ]; then
+	_scratch_remount "$opts"
+	return
+    fi
+    if test -n "$opts"; then
+	opts="-o $opts"
+    fi
     _scratch_unmount
-    _scratch_mount
+    _scratch_mount "$opts"
 }
 
 _test_mount()
@@ -356,6 +374,9 @@ _test_unmount()
 
 _test_cycle_mount()
 {
+    if [ "$FSTYP" = tmpfs ]; then
+	return
+    fi
     _test_unmount
     _test_mount
 }
diff --git a/tests/generic/003 b/tests/generic/003
index 7ffd09a..710ffc8 100755
--- a/tests/generic/003
+++ b/tests/generic/003
@@ -107,9 +107,8 @@ file1_stat_after_second_access=`_stat $TPATH/dir1/file1`
 _compare_stat_times NNN "$file1_stat_after_first_access" \
 	"$file1_stat_after_second_access" "after accessing file1 second time"
 
-# Remounting with nodiratime option
-_scratch_unmount
-_scratch_mount "-o nodiratime"
+# Mounting with nodiratime option
+_scratch_cycle_mount "nodiratime"
 file1_stat_after_remount=`_stat $TPATH/dir1/file1`
 _compare_stat_times NNN "$file1_stat_after_second_access" \
 	"$file1_stat_after_remount" "for file1 after remount"
@@ -134,9 +133,8 @@ dir2_stat_after_file_access=`_stat $TPATH/dir2`
 _compare_stat_times NNN "$dir2_stat_after_file_creation" \
 	"$dir2_stat_after_file_access" "for dir2 after file access"
 
-# Remounting with noatime option, creating a file and accessing it
-_scratch_unmount
-_scratch_mount "-o noatime"
+# Mounting with noatime option, creating a file and accessing it
+_scratch_cycle_mount "noatime"
 echo "ccc" > $TPATH/dir2/file3
 file3_stat_before_first_access=`_stat $TPATH/dir2/file3`
 sleep 1
@@ -158,10 +156,9 @@ file1_stat_after_change=`_stat $TPATH/dir1/file1_renamed`
 _compare_stat_times NNY "$file1_stat_after_modify" \
 	"$file1_stat_after_change" "after changing file1"
 
-# Remounting with strictatime option and
+# Mounting with strictatime option and
 # accessing a previously created file twice
-_scratch_unmount
-_scratch_mount "-o strictatime"
+_scratch_cycle_mount "strictatime"
 cat $TPATH/dir2/file3 > /dev/null
 file3_stat_after_second_access=`_stat $TPATH/dir2/file3`
 _compare_stat_times YNN "$file3_stat_after_first_access" \
@@ -189,13 +186,12 @@ if [ "$FSTYP" = "btrfs" ]; then
 		"$file3_stat_readonly_after_access" "for file in readonly subvol"
 fi
 
-# Remounting read-only. Access time should never be updated, despite the
+# Mounting read-only. Access time should never be updated, despite the
 # strictatime mount option.
 sleep 1
 dir2_stat_before_ro_mount=`_stat $TPATH/dir2`
 file3_stat_before_ro_mount=`_stat $TPATH/dir2/file3`
-_scratch_unmount
-_scratch_mount "-o ro,strictatime"
+_scratch_cycle_mount "ro,strictatime"
 ls $TPATH/dir2 > /dev/null
 cat $TPATH/dir2/file3 > /dev/null
 dir2_stat_after_ro_mount=`_stat $TPATH/dir2`
diff --git a/tests/generic/135 b/tests/generic/135
index 4400672..52418f6 100755
--- a/tests/generic/135
+++ b/tests/generic/135
@@ -41,19 +41,8 @@ _supported_os Linux IRIX
 
 _require_odirect
 _require_scratch
-_scratch_mkfs >/dev/null 2>&1
-
-_umount_mount()
-{
-    CWD=`pwd`
-    cd /
-    # pipe error into /dev/null, in case not mounted (after _require_scratch)
-    _scratch_unmount 2>/dev/null
-    _scratch_mount
-    cd "$CWD"
-}
-
-_umount_mount
+_scratch_mkfs >/dev/null
+_scratch_mount
 
 cd $SCRATCH_MNT
 
@@ -71,7 +60,9 @@ $XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
 $XFS_IO_PROG -f -c 'truncate 2k' trunc_file > /dev/null
 $XFS_IO_PROG -c 'pwrite 1k 0 1k' trunc_file > /dev/null
 
-_umount_mount
+pushd / > /dev/null
+_scratch_cycle_mount
+popd > /dev/null
 
 # check file size and contents
 od -Ad -x async_file
diff --git a/tests/generic/169 b/tests/generic/169
index 839ff9d..f51f4d1 100755
--- a/tests/generic/169
+++ b/tests/generic/169
@@ -73,13 +73,9 @@ $XFS_IO_PROG -a -c "pwrite 0 5k" -c "fsync" \
 	$SCRATCH_MNT/testfile \
 	| _show_wrote_and_stat_only
 
-echo "# unmounting scratch"
-_scratch_unmount>>$seqres.full 2>&1 \
-    || _fail "unmount failed"
-
-echo "# mounting scratch"
-_scratch_mount >>$seqres.full 2>&1 \
-    || _fail "mount failed: $MOUNT_OPTIONS"
+echo "# remounting scratch"
+_scratch_cycle_mount >>$seqres.full 2>&1 \
+    || _fail "remount failed: $MOUNT_OPTIONS"
 
 echo "# stating file to confirm correct size"
 $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/testfile \
@@ -90,13 +86,9 @@ $XFS_IO_PROG -f -c "pwrite 0 5" -c s -c "pwrite 5 5" \
 	-c "stat" $SCRATCH_MNT/nextfile \
 	| _show_wrote_and_stat_only
 
-echo "# unmounting scratch"
-_scratch_unmount>>$seqres.full 2>&1 \
-    || _fail "unmount failed"
-
-echo "# mounting scratch"
-_scratch_mount >>$seqres.full 2>&1 \
-    || _fail "mount failed: $MOUNT_OPTIONS"
+echo "# remounting scratch"
+_scratch_cycle_mount >>$seqres.full 2>&1 \
+    || _fail "remount failed: $MOUNT_OPTIONS"
 
 echo "# stating file to confirm correct size"
 $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/nextfile \
diff --git a/tests/generic/169.out b/tests/generic/169.out
index 22a5b77..5f7df39 100644
--- a/tests/generic/169.out
+++ b/tests/generic/169.out
@@ -5,15 +5,13 @@ wrote 5120/5120 bytes at offset 0
 wrote 5120/5120 bytes at offset 5120
 wrote 5120/5120 bytes at offset 10240
 stat.size = 15360
-# unmounting scratch
-# mounting scratch
+# remounting scratch
 # stating file to confirm correct size
 stat.size = 15360
 # appending 10 bytes to new file, sync at 5 bytes
 wrote 5/5 bytes at offset 0
 wrote 5/5 bytes at offset 5
 stat.size = 10
-# unmounting scratch
-# mounting scratch
+# remounting scratch
 # stating file to confirm correct size
 stat.size = 10
diff --git a/tests/generic/192 b/tests/generic/192
index ebabea2..6bbc87c 100755
--- a/tests/generic/192
+++ b/tests/generic/192
@@ -78,8 +78,7 @@ cat $testfile
 time2=`_access_time $testfile | tee -a $seqres.full`
 
 cd /
-_test_unmount
-_test_mount
+_test_cycle_mount
 time3=`_access_time $testfile | tee -a $seqres.full`
 
 delta1=`expr $time2 - $time1`
diff --git a/tests/generic/226 b/tests/generic/226
index b12965a..a099ec6 100755
--- a/tests/generic/226
+++ b/tests/generic/226
@@ -61,8 +61,7 @@ for I in `seq 1 $loops`; do
 done
 
 echo
-_scratch_unmount
-_scratch_mount
+_scratch_cycle_mount
 
 echo "--> $loops direct 64m writes in a loop"
 for I in `seq 1 $loops`; do
diff --git a/tests/generic/258 b/tests/generic/258
index 285a422..d28437f 100755
--- a/tests/generic/258
+++ b/tests/generic/258
@@ -62,8 +62,7 @@ fi
 
 # unmount, remount, and check the timestamp
 echo "Remounting to flush cache"
-_test_unmount
-_test_mount
+_test_cycle_mount
 
 # Should yield -315593940 (prior to epoch)
 echo "Testing for negative seconds since epoch"
diff --git a/tests/generic/306 b/tests/generic/306
index 64d8cde..86fd829 100755
--- a/tests/generic/306
+++ b/tests/generic/306
@@ -67,8 +67,7 @@ touch $BINDFILE || _fail "Could not create bind mount file"
 touch $TARGET || _fail "Could not create symlink target"
 ln -s $TARGET $SYMLINK
 
-_scratch_unmount || _fail "Could not unmount scratch device"
-_scratch_mount -o ro || _fail "Could not mount scratch readonly"
+_scratch_remount ro || _fail "Could not remount scratch readonly"
 
 # We should be able to read & write to/from these devices even on an RO fs
 echo "== try to create new file"
diff --git a/tests/generic/317 b/tests/generic/317
index 68f231c..a5d8804 100755
--- a/tests/generic/317
+++ b/tests/generic/317
@@ -96,8 +96,7 @@ echo ""
 echo "*** Remounting ***"
 echo ""
 sync
-_scratch_unmount >>$seqres.full 2>&1
-_scratch_mount      >>$seqres.full 2>&1 || _fail "mount failed"
+_scratch_cycle_mount      >>$seqres.full 2>&1 || _fail "remount failed"
 
 _print_numeric_uid
 
diff --git a/tests/generic/318 b/tests/generic/318
index c730b50..f850a9b 100755
--- a/tests/generic/318
+++ b/tests/generic/318
@@ -109,8 +109,7 @@ _print_getfacls
 echo "*** Remounting ***"
 echo ""
 sync
-_scratch_unmount >>$seqres.full 2>&1
-_scratch_mount      >>$seqres.full 2>&1 || _fail "mount failed"
+_scratch_cycle_mount      >>$seqres.full 2>&1 || _fail "remount failed"
 
 _print_getfacls
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH-v3b 09/16] xfstests: do not unmount tmpfs during remount
  2016-02-16  6:43   ` [PATCH-v3a " Theodore Ts'o
@ 2016-02-17  3:05     ` Theodore Ts'o
  0 siblings, 0 replies; 35+ messages in thread
From: Theodore Ts'o @ 2016-02-17  3:05 UTC (permalink / raw)
  To: fstests; +Cc: hughd, Junho Ryu

Sigh, one more revision.  Previous versions of this patch accidentally
removed 2>&1 from the _scratch_mkfs line, and this caused failures
when using a 1k block size and mke2fs would issue a warning that the
blocksize is smaller than the physical blocksize (which results in
non-optimal performance).

>From a46e47d549f0d43f6c32f54e89817cc1a602b9bf Mon Sep 17 00:00:00 2001
From: Junho Ryu <jayr@google.com>
Date: Wed, 18 Dec 2013 10:16:01 -0800
Subject: [PATCH] xfstests: do not unmount tmpfs during remount

Several tests unmount then re-mount the scratch filesystem, to check
that the content is unchanged; but unmounting a tmpfs is designed to
lose its content, which causes such tests to fail unnecessarily.

Signed-off-by: Hugh Dickins <hughd@google.com>
Signed-off-by: Junho Ryu <jayr@google.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 common/rc             | 23 ++++++++++++++++++++++-
 tests/generic/003     | 20 ++++++++------------
 tests/generic/135     | 19 +++++--------------
 tests/generic/169     | 20 ++++++--------------
 tests/generic/169.out |  6 ++----
 tests/generic/192     |  3 +--
 tests/generic/226     |  3 +--
 tests/generic/258     |  3 +--
 tests/generic/306     |  3 +--
 tests/generic/317     |  3 +--
 tests/generic/318     |  3 +--
 11 files changed, 49 insertions(+), 57 deletions(-)

diff --git a/common/rc b/common/rc
index 18d1a00..42415a7 100644
--- a/common/rc
+++ b/common/rc
@@ -329,10 +329,28 @@ _scratch_unmount()
 	esac
 }
 
+_scratch_remount()
+{
+    local opts="$1"
+
+    if test -n "$opts"; then
+	mount -o "remount,$opts" $SCRATCH_MNT
+    fi
+}
+
 _scratch_cycle_mount()
 {
+    local opts="$1"
+
+    if [ "$FSTYP" = tmpfs ]; then
+	_scratch_remount "$opts"
+	return
+    fi
+    if test -n "$opts"; then
+	opts="-o $opts"
+    fi
     _scratch_unmount
-    _scratch_mount
+    _scratch_mount "$opts"
 }
 
 _test_mount()
@@ -356,6 +374,9 @@ _test_unmount()
 
 _test_cycle_mount()
 {
+    if [ "$FSTYP" = tmpfs ]; then
+	return
+    fi
     _test_unmount
     _test_mount
 }
diff --git a/tests/generic/003 b/tests/generic/003
index 7ffd09a..710ffc8 100755
--- a/tests/generic/003
+++ b/tests/generic/003
@@ -107,9 +107,8 @@ file1_stat_after_second_access=`_stat $TPATH/dir1/file1`
 _compare_stat_times NNN "$file1_stat_after_first_access" \
 	"$file1_stat_after_second_access" "after accessing file1 second time"
 
-# Remounting with nodiratime option
-_scratch_unmount
-_scratch_mount "-o nodiratime"
+# Mounting with nodiratime option
+_scratch_cycle_mount "nodiratime"
 file1_stat_after_remount=`_stat $TPATH/dir1/file1`
 _compare_stat_times NNN "$file1_stat_after_second_access" \
 	"$file1_stat_after_remount" "for file1 after remount"
@@ -134,9 +133,8 @@ dir2_stat_after_file_access=`_stat $TPATH/dir2`
 _compare_stat_times NNN "$dir2_stat_after_file_creation" \
 	"$dir2_stat_after_file_access" "for dir2 after file access"
 
-# Remounting with noatime option, creating a file and accessing it
-_scratch_unmount
-_scratch_mount "-o noatime"
+# Mounting with noatime option, creating a file and accessing it
+_scratch_cycle_mount "noatime"
 echo "ccc" > $TPATH/dir2/file3
 file3_stat_before_first_access=`_stat $TPATH/dir2/file3`
 sleep 1
@@ -158,10 +156,9 @@ file1_stat_after_change=`_stat $TPATH/dir1/file1_renamed`
 _compare_stat_times NNY "$file1_stat_after_modify" \
 	"$file1_stat_after_change" "after changing file1"
 
-# Remounting with strictatime option and
+# Mounting with strictatime option and
 # accessing a previously created file twice
-_scratch_unmount
-_scratch_mount "-o strictatime"
+_scratch_cycle_mount "strictatime"
 cat $TPATH/dir2/file3 > /dev/null
 file3_stat_after_second_access=`_stat $TPATH/dir2/file3`
 _compare_stat_times YNN "$file3_stat_after_first_access" \
@@ -189,13 +186,12 @@ if [ "$FSTYP" = "btrfs" ]; then
 		"$file3_stat_readonly_after_access" "for file in readonly subvol"
 fi
 
-# Remounting read-only. Access time should never be updated, despite the
+# Mounting read-only. Access time should never be updated, despite the
 # strictatime mount option.
 sleep 1
 dir2_stat_before_ro_mount=`_stat $TPATH/dir2`
 file3_stat_before_ro_mount=`_stat $TPATH/dir2/file3`
-_scratch_unmount
-_scratch_mount "-o ro,strictatime"
+_scratch_cycle_mount "ro,strictatime"
 ls $TPATH/dir2 > /dev/null
 cat $TPATH/dir2/file3 > /dev/null
 dir2_stat_after_ro_mount=`_stat $TPATH/dir2`
diff --git a/tests/generic/135 b/tests/generic/135
index 4400672..52418f6 100755
--- a/tests/generic/135
+++ b/tests/generic/135
@@ -41,19 +41,8 @@ _supported_os Linux IRIX
 
 _require_odirect
 _require_scratch
-_scratch_mkfs >/dev/null 2>&1
-
-_umount_mount()
-{
-    CWD=`pwd`
-    cd /
-    # pipe error into /dev/null, in case not mounted (after _require_scratch)
-    _scratch_unmount 2>/dev/null
-    _scratch_mount
-    cd "$CWD"
-}
-
-_umount_mount
+_scratch_mkfs >/dev/null
+_scratch_mount
 
 cd $SCRATCH_MNT
 
@@ -71,7 +60,9 @@ $XFS_IO_PROG -f -c 'pwrite -b 4k -S 0x78 0 4k' trunc_file > /dev/null
 $XFS_IO_PROG -f -c 'truncate 2k' trunc_file > /dev/null
 $XFS_IO_PROG -c 'pwrite 1k 0 1k' trunc_file > /dev/null
 
-_umount_mount
+pushd / > /dev/null
+_scratch_cycle_mount
+popd > /dev/null
 
 # check file size and contents
 od -Ad -x async_file
diff --git a/tests/generic/169 b/tests/generic/169
index 839ff9d..f51f4d1 100755
--- a/tests/generic/169
+++ b/tests/generic/169
@@ -73,13 +73,9 @@ $XFS_IO_PROG -a -c "pwrite 0 5k" -c "fsync" \
 	$SCRATCH_MNT/testfile \
 	| _show_wrote_and_stat_only
 
-echo "# unmounting scratch"
-_scratch_unmount>>$seqres.full 2>&1 \
-    || _fail "unmount failed"
-
-echo "# mounting scratch"
-_scratch_mount >>$seqres.full 2>&1 \
-    || _fail "mount failed: $MOUNT_OPTIONS"
+echo "# remounting scratch"
+_scratch_cycle_mount >>$seqres.full 2>&1 \
+    || _fail "remount failed: $MOUNT_OPTIONS"
 
 echo "# stating file to confirm correct size"
 $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/testfile \
@@ -90,13 +86,9 @@ $XFS_IO_PROG -f -c "pwrite 0 5" -c s -c "pwrite 5 5" \
 	-c "stat" $SCRATCH_MNT/nextfile \
 	| _show_wrote_and_stat_only
 
-echo "# unmounting scratch"
-_scratch_unmount>>$seqres.full 2>&1 \
-    || _fail "unmount failed"
-
-echo "# mounting scratch"
-_scratch_mount >>$seqres.full 2>&1 \
-    || _fail "mount failed: $MOUNT_OPTIONS"
+echo "# remounting scratch"
+_scratch_cycle_mount >>$seqres.full 2>&1 \
+    || _fail "remount failed: $MOUNT_OPTIONS"
 
 echo "# stating file to confirm correct size"
 $XFS_IO_PROG -r -c "stat" $SCRATCH_MNT/nextfile \
diff --git a/tests/generic/169.out b/tests/generic/169.out
index 22a5b77..5f7df39 100644
--- a/tests/generic/169.out
+++ b/tests/generic/169.out
@@ -5,15 +5,13 @@ wrote 5120/5120 bytes at offset 0
 wrote 5120/5120 bytes at offset 5120
 wrote 5120/5120 bytes at offset 10240
 stat.size = 15360
-# unmounting scratch
-# mounting scratch
+# remounting scratch
 # stating file to confirm correct size
 stat.size = 15360
 # appending 10 bytes to new file, sync at 5 bytes
 wrote 5/5 bytes at offset 0
 wrote 5/5 bytes at offset 5
 stat.size = 10
-# unmounting scratch
-# mounting scratch
+# remounting scratch
 # stating file to confirm correct size
 stat.size = 10
diff --git a/tests/generic/192 b/tests/generic/192
index ebabea2..6bbc87c 100755
--- a/tests/generic/192
+++ b/tests/generic/192
@@ -78,8 +78,7 @@ cat $testfile
 time2=`_access_time $testfile | tee -a $seqres.full`
 
 cd /
-_test_unmount
-_test_mount
+_test_cycle_mount
 time3=`_access_time $testfile | tee -a $seqres.full`
 
 delta1=`expr $time2 - $time1`
diff --git a/tests/generic/226 b/tests/generic/226
index b12965a..a099ec6 100755
--- a/tests/generic/226
+++ b/tests/generic/226
@@ -61,8 +61,7 @@ for I in `seq 1 $loops`; do
 done
 
 echo
-_scratch_unmount
-_scratch_mount
+_scratch_cycle_mount
 
 echo "--> $loops direct 64m writes in a loop"
 for I in `seq 1 $loops`; do
diff --git a/tests/generic/258 b/tests/generic/258
index 285a422..d28437f 100755
--- a/tests/generic/258
+++ b/tests/generic/258
@@ -62,8 +62,7 @@ fi
 
 # unmount, remount, and check the timestamp
 echo "Remounting to flush cache"
-_test_unmount
-_test_mount
+_test_cycle_mount
 
 # Should yield -315593940 (prior to epoch)
 echo "Testing for negative seconds since epoch"
diff --git a/tests/generic/306 b/tests/generic/306
index 64d8cde..86fd829 100755
--- a/tests/generic/306
+++ b/tests/generic/306
@@ -67,8 +67,7 @@ touch $BINDFILE || _fail "Could not create bind mount file"
 touch $TARGET || _fail "Could not create symlink target"
 ln -s $TARGET $SYMLINK
 
-_scratch_unmount || _fail "Could not unmount scratch device"
-_scratch_mount -o ro || _fail "Could not mount scratch readonly"
+_scratch_remount ro || _fail "Could not remount scratch readonly"
 
 # We should be able to read & write to/from these devices even on an RO fs
 echo "== try to create new file"
diff --git a/tests/generic/317 b/tests/generic/317
index 68f231c..a5d8804 100755
--- a/tests/generic/317
+++ b/tests/generic/317
@@ -96,8 +96,7 @@ echo ""
 echo "*** Remounting ***"
 echo ""
 sync
-_scratch_unmount >>$seqres.full 2>&1
-_scratch_mount      >>$seqres.full 2>&1 || _fail "mount failed"
+_scratch_cycle_mount      >>$seqres.full 2>&1 || _fail "remount failed"
 
 _print_numeric_uid
 
diff --git a/tests/generic/318 b/tests/generic/318
index c730b50..f850a9b 100755
--- a/tests/generic/318
+++ b/tests/generic/318
@@ -109,8 +109,7 @@ _print_getfacls
 echo "*** Remounting ***"
 echo ""
 sync
-_scratch_unmount >>$seqres.full 2>&1
-_scratch_mount      >>$seqres.full 2>&1 || _fail "mount failed"
+_scratch_cycle_mount      >>$seqres.full 2>&1 || _fail "remount failed"
 
 _print_getfacls
 
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts
  2016-02-13 17:40 ` [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts Theodore Ts'o
@ 2016-02-17  9:58   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17  9:58 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd, Jan Kara

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 02/16] check: avoid spurious complaints that tests/$FSTYP/group does not exist
  2016-02-13 17:40 ` [PATCH 02/16] check: avoid spurious complaints that tests/$FSTYP/group does not exist Theodore Ts'o
@ 2016-02-17  9:59   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17  9:59 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 03/16] common: _scratch_mkfs_sized() for tmpfs
  2016-02-13 17:40 ` [PATCH 03/16] common: _scratch_mkfs_sized() for tmpfs Theodore Ts'o
@ 2016-02-17  9:59   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17  9:59 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd, Junho Ryu

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 04/16] generic: use mount point instead of device name
  2016-02-13 17:40 ` [PATCH 04/16] generic: use mount point instead of device name Theodore Ts'o
@ 2016-02-17 10:00   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:00 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd, Junho Ryu

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 05/16] generic: remove the generic/125 test
  2016-02-13 17:40 ` [PATCH 05/16] generic: remove the generic/125 test Theodore Ts'o
@ 2016-02-17 10:03   ` Christoph Hellwig
  2016-02-21 21:52     ` Dave Chinner
  0 siblings, 1 reply; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:03 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

The pNFS block layout driver works the same way as CXFS here.  I
don't think I ever triggered this test during the development, though.

I'm indifferent on whether we should keep this test or not, but it
defintively makes sense to remove it from the auto group.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 06/16] generic: add _require_odirect to generic/113 and generic/214
  2016-02-13 17:40 ` [PATCH 06/16] generic: add _require_odirect to generic/113 and generic/214 Theodore Ts'o
@ 2016-02-17 10:03   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:03 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 11/16] generic: require fiemap for generic/009
  2016-02-13 17:41 ` [PATCH 11/16] generic: require fiemap for generic/009 Theodore Ts'o
@ 2016-02-17 10:04   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:04 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312
  2016-02-13 17:41 ` [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312 Theodore Ts'o
@ 2016-02-17 10:06   ` Christoph Hellwig
  2016-02-17 10:36     ` Eryu Guan
  0 siblings, 1 reply; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:06 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

> +# We don't need to do this check for tmpfs because _scratch_mkfs_size
> +# will validate the size against the available memory
> +if [ "$FSTYP" != "tmpfs" ]; then
> +   _scratch_mkfs
> +   _scratch_mount
> +   _require_fs_space $SCRATCH_MNT $(($fssize / 1024))
> +   _scratch_unmount
> +fi
>  rm -f $seqres.full
>  _scratch_mkfs_sized $fssize >>$seqres.full 2>&1

_scratch_mkfs_size also validates the available space for other
block based file systems, so I think we should just remove this
code entirely (assuming I didn't miss something important)

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 13/16] xfstests: generic/079 and generic/277 requires chattr, not xattrs
  2016-02-13 17:41 ` [PATCH 13/16] xfstests: generic/079 and generic/277 requires chattr, not xattrs Theodore Ts'o
@ 2016-02-17 10:06   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:06 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

Looks fine,

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 14/16] xfstests: add executable permission to tests
  2016-02-13 17:41 ` [PATCH 14/16] xfstests: add executable permission to tests Theodore Ts'o
@ 2016-02-17 10:07   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:07 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

On Sat, Feb 13, 2016 at 12:41:07PM -0500, Theodore Ts'o wrote:
> From: Hugh Dickins <hughd@google.com>
> 
> Signed-off-by: Hugh Dickins <hughd@google.com>
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>

A little changelog would be nice. But if this fixes the changing
permissions after the tests are actually run I'm all for it!

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 15/16] xfstests: increase tmpfs memory size
  2016-02-13 17:41 ` [PATCH 15/16] xfstests: increase tmpfs memory size Theodore Ts'o
@ 2016-02-17 10:08   ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:08 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd, Junho Ryu

On Sat, Feb 13, 2016 at 12:41:08PM -0500, Theodore Ts'o wrote:
> From: Hugh Dickins <hughd@google.com>
> 
> 512M is not enough for generic/129.  Raise default tmpfs size to 1G.

That also means generic/129 should check for the available space.

Otherwise I'm fine with if if you tmpfs testers think 1G is the proper
default.

Reviewed-by: Christoph Hellwig <hch@lst.de>

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 16/16] xfstests: remove _need_to_be_root
  2016-02-13 17:41 ` [PATCH 16/16] xfstests: remove _need_to_be_root Theodore Ts'o
@ 2016-02-17 10:09   ` Christoph Hellwig
  2016-02-17 12:22     ` Dave Chinner
  0 siblings, 1 reply; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-17 10:09 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: fstests, hughd

Looks good,

Reviewed-by: Christoph Hellwig <hch@lst.de>

While you're at it it would be nice to also remove the odd instruction
of adding the '123456-fsgqa' test user in README.

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312
  2016-02-17 10:06   ` Christoph Hellwig
@ 2016-02-17 10:36     ` Eryu Guan
  0 siblings, 0 replies; 35+ messages in thread
From: Eryu Guan @ 2016-02-17 10:36 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Theodore Ts'o, fstests, hughd

On Wed, Feb 17, 2016 at 02:06:03AM -0800, Christoph Hellwig wrote:
> > +# We don't need to do this check for tmpfs because _scratch_mkfs_size
> > +# will validate the size against the available memory
> > +if [ "$FSTYP" != "tmpfs" ]; then
> > +   _scratch_mkfs
> > +   _scratch_mount
> > +   _require_fs_space $SCRATCH_MNT $(($fssize / 1024))
> > +   _scratch_unmount
> > +fi
> >  rm -f $seqres.full
> >  _scratch_mkfs_sized $fssize >>$seqres.full 2>&1
> 
> _scratch_mkfs_size also validates the available space for other
> block based file systems, so I think we should just remove this
> code entirely (assuming I didn't miss something important)

I agreed, not sure why I wrote this check in the first place..

Thanks,
Eryu

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 16/16] xfstests: remove _need_to_be_root
  2016-02-17 10:09   ` Christoph Hellwig
@ 2016-02-17 12:22     ` Dave Chinner
  0 siblings, 0 replies; 35+ messages in thread
From: Dave Chinner @ 2016-02-17 12:22 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Theodore Ts'o, fstests, hughd

On Wed, Feb 17, 2016 at 02:09:23AM -0800, Christoph Hellwig wrote:
> Looks good,
> 
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> 
> While you're at it it would be nice to also remove the odd instruction
> of adding the '123456-fsgqa' test user in README.

I think that user is actually used for quota testing? Yeah, see
xfs/138.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 05/16] generic: remove the generic/125 test
  2016-02-17 10:03   ` Christoph Hellwig
@ 2016-02-21 21:52     ` Dave Chinner
  2016-02-22  7:36       ` Christoph Hellwig
  0 siblings, 1 reply; 35+ messages in thread
From: Dave Chinner @ 2016-02-21 21:52 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Theodore Ts'o, fstests, hughd

On Wed, Feb 17, 2016 at 02:03:33AM -0800, Christoph Hellwig wrote:
> The pNFS block layout driver works the same way as CXFS here.  I
> don't think I ever triggered this test during the development, though.
> 
> I'm indifferent on whether we should keep this test or not, but it
> defintively makes sense to remove it from the auto group.

Ok, if there's some value to using it for pNFS testing, then lets
leave it in place, remove the auto group but also add a "pnfs" group
tag to it to document what it's useful for.

Sorry to give you the run-around on this one, Ted. Can you resend
it?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

^ permalink raw reply	[flat|nested] 35+ messages in thread

* Re: [PATCH 05/16] generic: remove the generic/125 test
  2016-02-21 21:52     ` Dave Chinner
@ 2016-02-22  7:36       ` Christoph Hellwig
  0 siblings, 0 replies; 35+ messages in thread
From: Christoph Hellwig @ 2016-02-22  7:36 UTC (permalink / raw)
  To: Dave Chinner; +Cc: Christoph Hellwig, Theodore Ts'o, fstests, hughd

On Mon, Feb 22, 2016 at 08:52:30AM +1100, Dave Chinner wrote:
> On Wed, Feb 17, 2016 at 02:03:33AM -0800, Christoph Hellwig wrote:
> > The pNFS block layout driver works the same way as CXFS here.  I
> > don't think I ever triggered this test during the development, though.
> > 
> > I'm indifferent on whether we should keep this test or not, but it
> > defintively makes sense to remove it from the auto group.
> 
> Ok, if there's some value to using it for pNFS testing, then lets
> leave it in place, remove the auto group but also add a "pnfs" group
> tag to it to document what it's useful for.

I think it might only be border line useful.  If you two feel better if
it's gone I'm fine with killing it.

^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2016-02-22  7:36 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-13 17:40 [PATCH-v3 00/16] tmpfs and other misc fixups for xfstests Theodore Ts'o
2016-02-13 17:40 ` [PATCH 01/16] ext4/001: add output variant for nodelalloc mounts Theodore Ts'o
2016-02-17  9:58   ` Christoph Hellwig
2016-02-13 17:40 ` [PATCH 02/16] check: avoid spurious complaints that tests/$FSTYP/group does not exist Theodore Ts'o
2016-02-17  9:59   ` Christoph Hellwig
2016-02-13 17:40 ` [PATCH 03/16] common: _scratch_mkfs_sized() for tmpfs Theodore Ts'o
2016-02-17  9:59   ` Christoph Hellwig
2016-02-13 17:40 ` [PATCH 04/16] generic: use mount point instead of device name Theodore Ts'o
2016-02-17 10:00   ` Christoph Hellwig
2016-02-13 17:40 ` [PATCH 05/16] generic: remove the generic/125 test Theodore Ts'o
2016-02-17 10:03   ` Christoph Hellwig
2016-02-21 21:52     ` Dave Chinner
2016-02-22  7:36       ` Christoph Hellwig
2016-02-13 17:40 ` [PATCH 06/16] generic: add _require_odirect to generic/113 and generic/214 Theodore Ts'o
2016-02-17 10:03   ` Christoph Hellwig
2016-02-13 17:41 ` [PATCH 07/16] Rename _scratch_mount to _scratch_cycle_mount Theodore Ts'o
2016-02-13 17:41 ` [PATCH 08/16] Rename _test_mount to _test_cycle_mount Theodore Ts'o
2016-02-13 17:41 ` [PATCH 09/16] xfstests: do not unmount tmpfs during remount Theodore Ts'o
2016-02-16  6:43   ` [PATCH-v3a " Theodore Ts'o
2016-02-17  3:05     ` [PATCH-v3b " Theodore Ts'o
2016-02-13 17:41 ` [PATCH 10/16] generic: do not unmount before calling _check_scratch_fs() Theodore Ts'o
2016-02-13 17:41 ` [PATCH 11/16] generic: require fiemap for generic/009 Theodore Ts'o
2016-02-17 10:04   ` Christoph Hellwig
2016-02-13 17:41 ` [PATCH 12/16] xfstests: remove dependency on /proc/partitions for generic/312 Theodore Ts'o
2016-02-17 10:06   ` Christoph Hellwig
2016-02-17 10:36     ` Eryu Guan
2016-02-13 17:41 ` [PATCH 13/16] xfstests: generic/079 and generic/277 requires chattr, not xattrs Theodore Ts'o
2016-02-17 10:06   ` Christoph Hellwig
2016-02-13 17:41 ` [PATCH 14/16] xfstests: add executable permission to tests Theodore Ts'o
2016-02-17 10:07   ` Christoph Hellwig
2016-02-13 17:41 ` [PATCH 15/16] xfstests: increase tmpfs memory size Theodore Ts'o
2016-02-17 10:08   ` Christoph Hellwig
2016-02-13 17:41 ` [PATCH 16/16] xfstests: remove _need_to_be_root Theodore Ts'o
2016-02-17 10:09   ` Christoph Hellwig
2016-02-17 12:22     ` Dave Chinner

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.