All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling
@ 2022-02-07  6:55 Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 1/7] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Shin'ichiro Kawasaki
                   ` (6 more replies)
  0 siblings, 7 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

Let me repost again adding CC to ext4 and xfs lists, since the series includes
changes unique to those filesystems. Sorry for repeating same posts to fstests
list and btrfs list. Reviews and comments will be appreciated.


When generic/204 is run for btrfs-zoned filesystem on zoned block devices with
GB size order, it takes very long time to complete. The test case creates 115MiB
filesystem on the scratch device and fills files in it within decent run time.
However, with btrfs-zoned condition, the test case creates filesystem as large
as the device size and it takes very long time to fill it all. Three causes were
identified for the long run time, and this series addresses them.

The first cause is mixed mode option that _scratch_mkfs_sized helper function
adds to mkfs.btrfs. This option was added for both regular btrfs and
zoned-btrfs. However, zoned-btrfs does not support mixed mode. The mkfs with
mixed mode fails and results in _scratch_mkfs_sized failure. The mixed mode
shall not be specified for btrfs-zoned filesystem.

The second cause is no check of return code from _scratch_mkfs_sized. The test
case generic/204 calls both _scratch_mkfs and _scratch_mkfs_sized, and does not
check return code from them. If _scratch_mkfs succeeds and _scratch_mkfs_sized
fails, the scratch device still has valid filesystem created by _scratch_mkfs.
Following test workload can be executed without failure, but the filesystem
does not have the size specified for _scratch_mkfs_sized. The return code of
_scratch_mkfs_sized shall be checked to catch the mkfs failure.

The third cause is unnecessary call of the _scratch_mkfs helper function in the
test case generic/204. This helper function is called together with _filter_mkfs
helper function to obtain block size of the test target filesystem. However, the
_filter_mkfs function works only for xfs, and does nothing for other filesystems
including btrfs. Such preparation unique to xfs shall be done only for xfs.

In this series, the first patch addresses the first cause. Following three
patches address the second cause. They cover not only generic/204 but also
other test cases which have the same problem. The last three patches address the
third problem. Two of them are preparation patches to clarify that the function
_filter_mkfs is xfs unique. And the last patch modifies generic/204 so that xfs
unique test preparation are run only for xfs.

Shin'ichiro Kawasaki (7):
  common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized
  generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code
  ext4/021: check _scratch_mkfs_sized return code
  xfs/015: check _scratch_mkfs_sized return code
  common: rename _filter_mkfs to _xfs_filter_mkfs
  common: move _xfs_filter_mkfs from common/filter to common/xfs
  generic/204: do xfs unique preparation only for xfs

 common/attr       |  2 +-
 common/filter     | 53 -----------------------------------------------
 common/rc         |  8 +++----
 common/xfs        | 45 +++++++++++++++++++++++++++++++++++++++-
 tests/ext4/021    |  2 +-
 tests/generic/171 |  2 +-
 tests/generic/172 |  2 +-
 tests/generic/173 |  2 +-
 tests/generic/174 |  2 +-
 tests/generic/204 | 26 ++++++++++++++---------
 tests/xfs/004     |  2 +-
 tests/xfs/007     |  2 +-
 tests/xfs/010     |  2 +-
 tests/xfs/013     |  2 +-
 tests/xfs/015     |  4 ++--
 tests/xfs/016     |  2 +-
 tests/xfs/029     |  2 +-
 tests/xfs/030     |  2 +-
 tests/xfs/031     |  6 +++---
 tests/xfs/033     |  4 ++--
 tests/xfs/041     |  2 +-
 tests/xfs/044     |  2 +-
 tests/xfs/050     |  2 +-
 tests/xfs/052     |  2 +-
 tests/xfs/058     |  2 +-
 tests/xfs/067     |  2 +-
 tests/xfs/070     |  2 +-
 tests/xfs/071     |  2 +-
 tests/xfs/073     |  2 +-
 tests/xfs/076     |  2 +-
 tests/xfs/078     |  2 +-
 tests/xfs/092     |  2 +-
 tests/xfs/104     |  6 +++---
 tests/xfs/108     |  2 +-
 tests/xfs/109     |  2 +-
 tests/xfs/110     |  2 +-
 tests/xfs/111     |  2 +-
 tests/xfs/144     |  2 +-
 tests/xfs/153     |  2 +-
 tests/xfs/163     |  4 ++--
 tests/xfs/168     |  6 +++---
 tests/xfs/176     |  2 +-
 tests/xfs/178     |  2 +-
 tests/xfs/186     |  2 +-
 tests/xfs/189     |  2 +-
 tests/xfs/250     |  2 +-
 tests/xfs/259     |  2 +-
 tests/xfs/276     |  2 +-
 tests/xfs/279     |  2 +-
 tests/xfs/288     |  2 +-
 tests/xfs/292     |  4 ++--
 tests/xfs/299     |  4 ++--
 tests/xfs/335     |  2 +-
 tests/xfs/336     |  2 +-
 tests/xfs/337     |  2 +-
 tests/xfs/341     |  2 +-
 tests/xfs/342     |  2 +-
 tests/xfs/443     |  2 +-
 tests/xfs/448     |  2 +-
 tests/xfs/490     |  2 +-
 tests/xfs/502     |  2 +-
 tests/xfs/513     |  2 +-
 tests/xfs/530     |  2 +-
 tests/xfs/533     |  2 +-
 64 files changed, 135 insertions(+), 139 deletions(-)

-- 
2.34.1


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

* [PATCH 1/7] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The helper function _scratch_mkfs_sized needs a couple of improvements
for btrfs. At first, the function adds --mixed option to mkfs.btrfs when
the filesystem size is smaller then 256MiB, but this threshold is no
longer correct and it should be 109MiB. Secondly, the --mixed option
shall not be specified to mkfs.btrfs for zoned devices, since zoned
devices does not allow mixing metadata blocks and data blocks.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/rc | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/common/rc b/common/rc
index b3289de9..eb2493d1 100644
--- a/common/rc
+++ b/common/rc
@@ -1075,10 +1075,10 @@ _scratch_mkfs_sized()
 		;;
 	btrfs)
 		local mixed_opt=
-		# minimum size that's needed without the mixed option.
-		# Ref: btrfs-prog: btrfs_min_dev_size()
-		# Non mixed mode is also the default option.
-		(( fssize < $((256 * 1024 *1024)) )) && mixed_opt='--mixed'
+		# Mixed option is required when the filesystem size is small and
+		# the device is not zoned. Ref: btrfs-progs: btrfs_min_dev_size()
+		(( fssize < $((109 * 1024 * 1024)) )) &&
+			! _scratch_btrfs_is_zoned && mixed_opt='--mixed'
 		$MKFS_BTRFS_PROG $MKFS_OPTIONS $mixed_opt -b $fssize $SCRATCH_DEV
 		;;
 	jfs)
-- 
2.34.1


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

* [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 1/7] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  2022-02-09  0:35   ` Darrick J. Wong
  2022-02-07  6:55 ` [PATCH 3/7] ext4/021: " Shin'ichiro Kawasaki
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The test cases generic/{171,172,173,174,204} call _scratch_mkfs before
_scratch_mkfs_sized, and they do not check return code of
_scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount
after it cannot detect the sized mkfs failure because _scratch_mkfs
already created a file system on the device. This results in unexpected
test condition of the test cases.

To avoid the unexpected test condition, check return code of
_scratch_mkfs_sized in the test cases.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/generic/171 | 2 +-
 tests/generic/172 | 2 +-
 tests/generic/173 | 2 +-
 tests/generic/174 | 2 +-
 tests/generic/204 | 3 ++-
 5 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tests/generic/171 b/tests/generic/171
index fb2a6f14..f823a454 100755
--- a/tests/generic/171
+++ b/tests/generic/171
@@ -42,7 +42,7 @@ sz_bytes=$((nr_blks * 8 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
 	sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount >> $seqres.full 2>&1
 rm -rf $testdir
 mkdir $testdir
diff --git a/tests/generic/172 b/tests/generic/172
index ab5122fa..383824b9 100755
--- a/tests/generic/172
+++ b/tests/generic/172
@@ -40,7 +40,7 @@ umount $SCRATCH_MNT
 
 file_size=$((768 * 1024 * 1024))
 fs_size=$((1024 * 1024 * 1024))
-_scratch_mkfs_sized $fs_size >> $seqres.full 2>&1
+_scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount >> $seqres.full 2>&1
 rm -rf $testdir
 mkdir $testdir
diff --git a/tests/generic/173 b/tests/generic/173
index 0eb313e2..e1493278 100755
--- a/tests/generic/173
+++ b/tests/generic/173
@@ -42,7 +42,7 @@ sz_bytes=$((nr_blks * 8 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
 	sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount >> $seqres.full 2>&1
 rm -rf $testdir
 mkdir $testdir
diff --git a/tests/generic/174 b/tests/generic/174
index 1505453e..c7a177b8 100755
--- a/tests/generic/174
+++ b/tests/generic/174
@@ -43,7 +43,7 @@ sz_bytes=$((nr_blks * 8 * blksz))
 if [ $sz_bytes -lt $((32 * 1048576)) ]; then
 	sz_bytes=$((32 * 1048576))
 fi
-_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
+_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed"
 _scratch_mount >> $seqres.full 2>&1
 rm -rf $testdir
 mkdir $testdir
diff --git a/tests/generic/204 b/tests/generic/204
index a3dabb71..b5deb443 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -35,7 +35,8 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
 [ $FSTYP = "xfs" ] && MKFS_OPTIONS="$MKFS_OPTIONS -l size=16m -i maxpct=50"
 
 SIZE=`expr 115 \* 1024 \* 1024`
-_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw
+_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
+	|| _fail "mkfs failed"
 cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
 _scratch_mount
 
-- 
2.34.1


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

* [PATCH 3/7] ext4/021: check _scratch_mkfs_sized return code
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 1/7] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 4/7] xfs/015: " Shin'ichiro Kawasaki
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The test cases ext4/021 calls _scratch_mkfs before _scratch_mkfs_sized,
and does not check return code of _scratch_mkfs_sized. Even if
_scratch_mkfs_sized failed, _scratch_mount after it cannot detect the
sized mkfs failure because _scratch_mkfs already created a file system
on the device. This results in unexpected test condition.

To avoid the unexpected test condition, check return code of
_scratch_mkfs_sized.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/ext4/021 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/ext4/021 b/tests/ext4/021
index 62768c60..a9277abf 100755
--- a/tests/ext4/021
+++ b/tests/ext4/021
@@ -24,7 +24,7 @@ _scratch_unmount
 
 # With 4k block size, this amounts to 10M FS instance.
 fssize=$((2560 * $blocksize))
-_scratch_mkfs_sized $fssize >> $seqres.full 2>&1
+_scratch_mkfs_sized $fssize >> $seqres.full 2>&1 || _fail "mkfs failed"
 _require_metadata_journaling $SCRATCH_DEV
 
 offset=0
-- 
2.34.1


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

* [PATCH 4/7] xfs/015: check _scratch_mkfs_sized return code
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
                   ` (2 preceding siblings ...)
  2022-02-07  6:55 ` [PATCH 3/7] ext4/021: " Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  2022-02-09  0:36   ` Darrick J. Wong
  2022-02-07  6:55 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki
                   ` (2 subsequent siblings)
  6 siblings, 1 reply; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The test cases xfs/015 calls _scratch_mkfs before _scratch_mkfs_sized,
and does not check return code of _scratch_mkfs_sized. Even if
_scratch_mkfs_sized failed, _scratch_mount after it cannot detect the
sized mkfs failure because _scratch_mkfs already created a file system
on the device. This results in unexpected test condition.

To avoid the unexpected test condition, check return code of
_scratch_mkfs_sized.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/xfs/015 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/xfs/015 b/tests/xfs/015
index 86fa6336..2bb7b8d5 100755
--- a/tests/xfs/015
+++ b/tests/xfs/015
@@ -43,7 +43,7 @@ _scratch_mount
 _require_fs_space $SCRATCH_MNT 131072
 _scratch_unmount
 
-_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw
+_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
 cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
 # get original data blocks number and agcount
 . $tmp.mkfs
-- 
2.34.1


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

* [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
                   ` (3 preceding siblings ...)
  2022-02-07  6:55 ` [PATCH 4/7] xfs/015: " Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  2022-02-09  0:43   ` Darrick J. Wong
  2022-02-07  6:55 ` [PATCH 6/7] common: move _xfs_filter_mkfs from common/filter to common/xfs Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 7/7] generic/204: do xfs unique preparation only for xfs Shin'ichiro Kawasaki
  6 siblings, 1 reply; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The helper function works only for xfs and used only for xfs except
generic/204. Rename the function to clearly indicate that the function
is only for xfs.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/attr       | 2 +-
 common/filter     | 2 +-
 common/xfs        | 2 +-
 tests/generic/204 | 4 ++--
 tests/xfs/004     | 2 +-
 tests/xfs/007     | 2 +-
 tests/xfs/010     | 2 +-
 tests/xfs/013     | 2 +-
 tests/xfs/015     | 2 +-
 tests/xfs/016     | 2 +-
 tests/xfs/029     | 2 +-
 tests/xfs/030     | 2 +-
 tests/xfs/031     | 6 +++---
 tests/xfs/033     | 4 ++--
 tests/xfs/041     | 2 +-
 tests/xfs/044     | 2 +-
 tests/xfs/050     | 2 +-
 tests/xfs/052     | 2 +-
 tests/xfs/058     | 2 +-
 tests/xfs/067     | 2 +-
 tests/xfs/070     | 2 +-
 tests/xfs/071     | 2 +-
 tests/xfs/073     | 2 +-
 tests/xfs/076     | 2 +-
 tests/xfs/078     | 2 +-
 tests/xfs/092     | 2 +-
 tests/xfs/104     | 6 +++---
 tests/xfs/108     | 2 +-
 tests/xfs/109     | 2 +-
 tests/xfs/110     | 2 +-
 tests/xfs/111     | 2 +-
 tests/xfs/144     | 2 +-
 tests/xfs/153     | 2 +-
 tests/xfs/163     | 4 ++--
 tests/xfs/168     | 6 +++---
 tests/xfs/176     | 2 +-
 tests/xfs/178     | 2 +-
 tests/xfs/186     | 2 +-
 tests/xfs/189     | 2 +-
 tests/xfs/250     | 2 +-
 tests/xfs/259     | 2 +-
 tests/xfs/276     | 2 +-
 tests/xfs/279     | 2 +-
 tests/xfs/288     | 2 +-
 tests/xfs/292     | 4 ++--
 tests/xfs/299     | 4 ++--
 tests/xfs/335     | 2 +-
 tests/xfs/336     | 2 +-
 tests/xfs/337     | 2 +-
 tests/xfs/341     | 2 +-
 tests/xfs/342     | 2 +-
 tests/xfs/443     | 2 +-
 tests/xfs/448     | 2 +-
 tests/xfs/490     | 2 +-
 tests/xfs/502     | 2 +-
 tests/xfs/513     | 2 +-
 tests/xfs/530     | 2 +-
 tests/xfs/533     | 2 +-
 58 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/common/attr b/common/attr
index 35682d7c..964c790a 100644
--- a/common/attr
+++ b/common/attr
@@ -13,7 +13,7 @@ _acl_get_max()
 		# CRC format filesystems have much larger ACL counts. The actual
 		# number is into the thousands, but testing that meany takes too
 		# long, so just test well past the old limit of 25.
-		$XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
+		$XFS_INFO_PROG $TEST_DIR | _xfs_filter_mkfs > /dev/null 2> $tmp.info
 		. $tmp.info
 		rm $tmp.info
 		if [ $_fs_has_crcs -eq 0 ]; then
diff --git a/common/filter b/common/filter
index c3db7a56..24fd0650 100644
--- a/common/filter
+++ b/common/filter
@@ -117,7 +117,7 @@ _filter_date()
 
 # prints filtered output on stdout, values (use eval) on stderr
 # Non XFS filesystems always return a 4k block size and a 256 byte inode.
-_filter_mkfs()
+_xfs_filter_mkfs()
 {
     case $FSTYP in
     xfs)
diff --git a/common/xfs b/common/xfs
index 713e9fe7..3435c706 100644
--- a/common/xfs
+++ b/common/xfs
@@ -832,7 +832,7 @@ _require_scratch_xfs_shrink()
 	_require_scratch
 	_require_command "$XFS_GROWFS_PROG" xfs_growfs
 
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 	_scratch_mount
 	# here just to check if kernel supports, no need do more extra work
diff --git a/tests/generic/204 b/tests/generic/204
index b5deb443..40d524d1 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -25,7 +25,7 @@ _supported_fs generic
 _require_scratch
 
 # get the block size first
-_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 . $tmp.mkfs
 
 # For xfs, we need to handle the different default log sizes that different
@@ -37,7 +37,7 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
 SIZE=`expr 115 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
 	|| _fail "mkfs failed"
-cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
+cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 _scratch_mount
 
 # Source $tmp.mkfs to get geometry
diff --git a/tests/xfs/004 b/tests/xfs/004
index f18316b3..5e83fff9 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -21,7 +21,7 @@ _cleanup()
 _populate_scratch()
 {
 	echo "=== mkfs output ===" >>$seqres.full
-	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 	_scratch_mount
 	# This test looks at specific behaviors of the xfs_db freesp command,
diff --git a/tests/xfs/007 b/tests/xfs/007
index 4f864100..33a857e8 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -19,7 +19,7 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_quota
 
-_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs
 
 do_test()
diff --git a/tests/xfs/010 b/tests/xfs/010
index 16c08b85..badac7c0 100755
--- a/tests/xfs/010
+++ b/tests/xfs/010
@@ -87,7 +87,7 @@ _require_scratch
 _require_xfs_mkfs_finobt
 _require_xfs_finobt
 
-_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
+_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _xfs_filter_mkfs 2>$seqres.full
 
 # sparsely populate the fs such that we create records with free inodes
 _scratch_mount
diff --git a/tests/xfs/013 b/tests/xfs/013
index 2d005753..dc39ffd6 100755
--- a/tests/xfs/013
+++ b/tests/xfs/013
@@ -89,7 +89,7 @@ _require_xfs_finobt
 _require_command "$KILLALL_PROG" killall
 
 _scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
-	_filter_mkfs 2>> $seqres.full
+	_xfs_filter_mkfs 2>> $seqres.full
 _scratch_mount
 
 COUNT=20000	# number of files per directory
diff --git a/tests/xfs/015 b/tests/xfs/015
index 2bb7b8d5..72842b38 100755
--- a/tests/xfs/015
+++ b/tests/xfs/015
@@ -44,7 +44,7 @@ _require_fs_space $SCRATCH_MNT 131072
 _scratch_unmount
 
 _scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
-cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+cat $tmp.mkfs.raw | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
 # get original data blocks number and agcount
 . $tmp.mkfs
 _scratch_mount
diff --git a/tests/xfs/016 b/tests/xfs/016
index 6337bb1f..e8094476 100755
--- a/tests/xfs/016
+++ b/tests/xfs/016
@@ -66,7 +66,7 @@ _init()
     _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
     [ $? -ne 0 ] && \
         _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
-    _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
+    _xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
     . $tmp.mkfs
     [ $logsunit -ne 0 ] && \
         _notrun "Cannot run this test using log MKFS_OPTIONS specified"
diff --git a/tests/xfs/029 b/tests/xfs/029
index 6e8aa4db..a3fb9cfc 100755
--- a/tests/xfs/029
+++ b/tests/xfs/029
@@ -36,7 +36,7 @@ _supported_fs xfs
 _require_scratch
 
 echo
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 
 echo
 _scratch_xfs_logprint | filter_logprint
diff --git a/tests/xfs/030 b/tests/xfs/030
index 201a9015..62066d06 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -83,7 +83,7 @@ $here/src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
 
 # now kick off the real repair test...
 #
-_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 _check_ag 0
 _check_ag -1
diff --git a/tests/xfs/031 b/tests/xfs/031
index 6e3813da..e6bbc0d4 100755
--- a/tests/xfs/031
+++ b/tests/xfs/031
@@ -82,20 +82,20 @@ echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
 _create_proto 0
 echo "=== one entry (shortform)"
 _scratch_mkfs_xfs -p $tmp.proto >$tmp.mkfs0 2>&1
-_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
+_xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
 . $tmp.mkfs
 _check_repair
 
 # block-form root directory & repeat
 _create_proto 20
 echo "=== twenty entries (block form)"
-_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # leaf-form root directory & repeat
 _create_proto 1000
 echo "=== thousand entries (leaf form)"
-_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # success, all done
diff --git a/tests/xfs/033 b/tests/xfs/033
index d47da0d6..61ae4004 100755
--- a/tests/xfs/033
+++ b/tests/xfs/033
@@ -55,10 +55,10 @@ _require_scratch
 _require_no_large_scratch_dev
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 if [ $isize -lt 512 ]; then
-	_scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	_scratch_mkfs_xfs -isize=512 | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 fi
 
diff --git a/tests/xfs/041 b/tests/xfs/041
index 05de5578..135ed410 100755
--- a/tests/xfs/041
+++ b/tests/xfs/041
@@ -41,7 +41,7 @@ _do_die_on_error=message_only
 agsize=32
 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
 _scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
-bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \
+bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _xfs_filter_mkfs 2>&1 \
 		| perl -ne 'if (/dbsize=(\d+)/) {print $1;}'`
 onemeginblocks=`expr 1048576 / $bsize`
 _scratch_mount
diff --git a/tests/xfs/044 b/tests/xfs/044
index e66c0cb3..8ffd2af4 100755
--- a/tests/xfs/044
+++ b/tests/xfs/044
@@ -79,7 +79,7 @@ lsize=16777216
 _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
 [ $? -ne 0 ] && \
     _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
-_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
+_xfs_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
 . $tmp.mkfs1
 [ $lversion -ne 1 ] && \
     _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
diff --git a/tests/xfs/050 b/tests/xfs/050
index 1847611b..3556c85e 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -65,7 +65,7 @@ _filter_and_check_blks()
 
 _exercise()
 {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/052 b/tests/xfs/052
index 75761022..e4c7ee6c 100755
--- a/tests/xfs/052
+++ b/tests/xfs/052
@@ -34,7 +34,7 @@ _require_nobody
 # setup a default run
 _qmount_option uquota
 
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 chmod a+w $seqres.full     # arbitrary users will write here
 
diff --git a/tests/xfs/058 b/tests/xfs/058
index 8751a7ac..0f87ec3c 100755
--- a/tests/xfs/058
+++ b/tests/xfs/058
@@ -22,7 +22,7 @@ _require_xfs_db_command "fuzz"
 rm -f "$seqres.full"
 
 echo "Format"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
 source $tmp.mkfs
 
 do_xfs_db()
diff --git a/tests/xfs/067 b/tests/xfs/067
index 3dc381bb..c733d761 100755
--- a/tests/xfs/067
+++ b/tests/xfs/067
@@ -22,7 +22,7 @@ _require_scratch
 
 # set up fs for 1K inodes
 isize=0
-_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
 [ $? -eq 0 ] && source $tmp.mkfs
 if [ "$isize" -lt 1024 ]; then
     _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
diff --git a/tests/xfs/070 b/tests/xfs/070
index 43ca7f84..9db518d7 100755
--- a/tests/xfs/070
+++ b/tests/xfs/070
@@ -76,7 +76,7 @@ _supported_fs xfs
 _require_scratch_nocheck
 _require_command "$KILLALL_PROG" killall
 
-_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
 
 . $tmp.mkfs # import agcount
diff --git a/tests/xfs/071 b/tests/xfs/071
index 8373878a..9b425d9f 100755
--- a/tests/xfs/071
+++ b/tests/xfs/071
@@ -81,7 +81,7 @@ _supported_fs xfs
 [ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
 
 _require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 echo
 _scratch_mount
diff --git a/tests/xfs/073 b/tests/xfs/073
index c7616b9e..d1b97313 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -131,7 +131,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
 echo 
 echo === copying scratch device to single target, large ro device
 ${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g \
-	| _filter_mkfs 2>/dev/null
+	| _xfs_filter_mkfs 2>/dev/null
 rmdir $imgs.source_dir 2>/dev/null
 mkdir $imgs.source_dir
 
diff --git a/tests/xfs/076 b/tests/xfs/076
index eac7410e..3cdde79e 100755
--- a/tests/xfs/076
+++ b/tests/xfs/076
@@ -61,7 +61,7 @@ _require_xfs_io_command "fpunch"
 _require_xfs_sparse_inodes
 
 _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
-	_filter_mkfs > /dev/null 2> $tmp.mkfs
+	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 
 _scratch_mount
diff --git a/tests/xfs/078 b/tests/xfs/078
index 1f475c96..a3b75fa6 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -74,7 +74,7 @@ _grow_loop()
 		mkfs_crc_opts="-m crc=0"
 	fi
 	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
-		| _filter_mkfs 2>/dev/null
+		| _xfs_filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
 	_destroy_loop_device $LOOP_DEV
diff --git a/tests/xfs/092 b/tests/xfs/092
index 015149e2..7e7b31fc 100755
--- a/tests/xfs/092
+++ b/tests/xfs/092
@@ -20,7 +20,7 @@ _require_scratch
 _require_no_large_scratch_dev
 
 MOUNT_OPTIONS="$MOUNT_OPTIONS -o inode64"
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 echo Silence is golden
 
 _try_scratch_mount
diff --git a/tests/xfs/104 b/tests/xfs/104
index d16f46d8..c21bd4e0 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -15,7 +15,7 @@ _begin_fstest growfs ioctl prealloc auto stress
 _create_scratch()
 {
 	echo "*** mkfs"
-	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 
 	echo "*** mount"
@@ -50,7 +50,7 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_io_command "falloc"
 
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs	# extract blocksize and data size for scratch device
 
 endsize=`expr 550 \* 1048576`	# stop after growing this big
@@ -89,7 +89,7 @@ while [ $size -le $endsize ]; do
 	echo "*** growing filesystem"
 	echo "*** growing to a ${sizeb} block filesystem" >> $seqres.full
 	xfs_growfs -D ${sizeb} $SCRATCH_MNT \
-		| tee -a $seqres.full | _filter_mkfs 2>$tmp.growfs
+		| tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.growfs
 	. $tmp.growfs
 	[ `expr $size % $modsize` -eq 0 ] && wait	# every 4th iteration
 	echo AGCOUNT=$agcount | tee -a $seqres.full
diff --git a/tests/xfs/108 b/tests/xfs/108
index 46070005..985b989b 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -62,7 +62,7 @@ _require_prjquota $SCRATCH_DEV
 # real QA test starts here
 rm -f $tmp.projects $seqres.full
 _scratch_unmount 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/109 b/tests/xfs/109
index 6cb6917a..e29d4795 100755
--- a/tests/xfs/109
+++ b/tests/xfs/109
@@ -78,7 +78,7 @@ if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
 fi
 _scratch_unmount
 
-_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/110 b/tests/xfs/110
index 596057ef..734d2869 100755
--- a/tests/xfs/110
+++ b/tests/xfs/110
@@ -18,7 +18,7 @@ _require_scratch
 
 # real QA test starts here
 _scratch_unmount 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 
 STR1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 STR2=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
diff --git a/tests/xfs/111 b/tests/xfs/111
index ede28aee..ed5a54c5 100755
--- a/tests/xfs/111
+++ b/tests/xfs/111
@@ -22,7 +22,7 @@ _require_scratch
 _scratch_unmount 2>/dev/null
 MKFS_OPTIONS="-bsize=4096"
 MOUNT_OPTIONS="-o noatime"
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 _scratch_mount
 
 echo Create some files
diff --git a/tests/xfs/144 b/tests/xfs/144
index 5abec9ae..d46eb1e2 100755
--- a/tests/xfs/144
+++ b/tests/xfs/144
@@ -24,7 +24,7 @@ _require_xfs_quota
 _require_scratch
 
 exercise() {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/153 b/tests/xfs/153
index 37303701..d410cbed 100755
--- a/tests/xfs/153
+++ b/tests/xfs/153
@@ -70,7 +70,7 @@ _filter_and_check_blks()
 
 run_tests()
 {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/163 b/tests/xfs/163
index 9f6dbeb8..79f420fa 100755
--- a/tests/xfs/163
+++ b/tests/xfs/163
@@ -24,7 +24,7 @@ test_shrink()
 	_check_scratch_fs
 	_scratch_mount
 
-	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
+	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
 	. $tmp.growfs
 	[ $ret -eq 0 -a $1 -eq $dblocks ]
 }
@@ -38,7 +38,7 @@ echo "Format and mount"
 # agcount = 1 is forbidden on purpose, and need to ensure shrinking to
 # 2 AGs isn't feasible yet. So agcount = 3 is the minimum number now.
 _scratch_mkfs -dsize="$((512 * 1024 * 1024))" -dagcount=3 2>&1 | \
-	tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 t_dblocks=$dblocks
 _scratch_mount >> $seqres.full
diff --git a/tests/xfs/168 b/tests/xfs/168
index ffcd0df8..6b3eee30 100755
--- a/tests/xfs/168
+++ b/tests/xfs/168
@@ -19,7 +19,7 @@ _begin_fstest auto growfs shrinkfs ioctl prealloc stress
 create_scratch()
 {
 	_scratch_mkfs_xfs $@ | tee -a $seqres.full | \
-		_filter_mkfs 2>$tmp.mkfs >/dev/null
+		_xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 
 	_scratch_mount
@@ -48,7 +48,7 @@ _supported_fs xfs
 _require_scratch_xfs_shrink
 _require_xfs_io_command "falloc"
 
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs	# extract blocksize and data size for scratch device
 
 endsize=`expr 125 \* 1048576`	# stop after shrinking this big
@@ -93,7 +93,7 @@ while [ $totalcount -gt 0 ]; do
 		[ $decb -eq 0 ] && break
 
 		# get latest dblocks
-		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
+		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
 		. $tmp.growfs
 
 		size=`expr $dblocks \* $dbsize`
diff --git a/tests/xfs/176 b/tests/xfs/176
index ba4aae59..57e11fd7 100755
--- a/tests/xfs/176
+++ b/tests/xfs/176
@@ -24,7 +24,7 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 
 _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
-	_filter_mkfs > /dev/null 2> $tmp.mkfs
+	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 cat $tmp.mkfs >> $seqres.full
 
diff --git a/tests/xfs/178 b/tests/xfs/178
index a65197cd..5392b9bb 100755
--- a/tests/xfs/178
+++ b/tests/xfs/178
@@ -45,7 +45,7 @@ _supported_fs xfs
 #             fix filesystem, new mkfs.xfs will be fine.
 
 _require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!"
 
 # By executing the followint tmp file, will get on the mkfs options stored in
diff --git a/tests/xfs/186 b/tests/xfs/186
index b54fcf26..8a2a6995 100755
--- a/tests/xfs/186
+++ b/tests/xfs/186
@@ -124,7 +124,7 @@ _require_scratch
 _require_attrs
 _require_attr_v1
 
-_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _filter_mkfs \
+_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _xfs_filter_mkfs \
 	>>$seqres.full 2>$tmp.mkfs
 # import crc status and attr version
 . $tmp.mkfs
diff --git a/tests/xfs/189 b/tests/xfs/189
index e601881a..437243c7 100755
--- a/tests/xfs/189
+++ b/tests/xfs/189
@@ -231,7 +231,7 @@ _require_noattr2
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV
 
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 
 _add_scratch_fstab
 _test_remount_rw
diff --git a/tests/xfs/250 b/tests/xfs/250
index 8af32711..573340bb 100755
--- a/tests/xfs/250
+++ b/tests/xfs/250
@@ -54,7 +54,7 @@ _test_loop()
 
 	echo "*** mkfs loop file (size=$size)"
 	$MKFS_XFS_PROG -d $dparam \
-		| _filter_mkfs 2>/dev/null
+		| _xfs_filter_mkfs 2>/dev/null
 
 	echo "*** mount loop filesystem"
 	mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
diff --git a/tests/xfs/259 b/tests/xfs/259
index 88e2f3ee..7c062c7d 100755
--- a/tests/xfs/259
+++ b/tests/xfs/259
@@ -49,7 +49,7 @@ for del in $sizes_to_check; do
 			>/dev/null 2>&1 || echo "dd failed"
 		lofile=$(losetup -f)
 		losetup $lofile "$testfile"
-		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _filter_mkfs \
+		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _xfs_filter_mkfs \
 			>/dev/null 2> $tmp.mkfs || echo "mkfs failed!"
 		. $tmp.mkfs
 		sync
diff --git a/tests/xfs/276 b/tests/xfs/276
index 8cc48675..6774b819 100755
--- a/tests/xfs/276
+++ b/tests/xfs/276
@@ -29,7 +29,7 @@ _require_test_program "punch-alternating"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2> "$tmp.mkfs" >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2> "$tmp.mkfs" >/dev/null
 . $tmp.mkfs
 cat "$tmp.mkfs" > $seqres.full
 _scratch_mount
diff --git a/tests/xfs/279 b/tests/xfs/279
index 835d187f..64563237 100755
--- a/tests/xfs/279
+++ b/tests/xfs/279
@@ -44,7 +44,7 @@ _check_mkfs()
 		return
 	fi
 	echo "Passed."
-	cat $tmp.mkfs.full | _filter_mkfs >> $seqres.full 2>$tmp.mkfs
+	cat $tmp.mkfs.full | _xfs_filter_mkfs >> $seqres.full 2>$tmp.mkfs
 	. $tmp.mkfs
 	echo "Got sector size: $sectsz"
 	device=`echo $@ | awk '{print $NF}'`
diff --git a/tests/xfs/288 b/tests/xfs/288
index e3d230e9..ec12d0d1 100755
--- a/tests/xfs/288
+++ b/tests/xfs/288
@@ -20,7 +20,7 @@ _require_scratch
 _require_attrs
 
 # get block size ($dbsize) from the mkfs output
-_scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 
 _scratch_mount
diff --git a/tests/xfs/292 b/tests/xfs/292
index cf501571..930504ca 100755
--- a/tests/xfs/292
+++ b/tests/xfs/292
@@ -25,12 +25,12 @@ rm -f $fsfile
 $XFS_IO_PROG -f -c "truncate 256g" $fsfile
 
 echo "mkfs.xfs without geometry"
-mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
+mkfs.xfs -f $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
     sed -e "s:$fsfile:FILENAME:g"
 
 echo "mkfs.xfs with cmdline geometry"
-mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
+mkfs.xfs -f -d su=16k,sw=5 $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
     sed -e "s:$fsfile:FILENAME:g"
 
diff --git a/tests/xfs/299 b/tests/xfs/299
index a3077b0c..e6da413a 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -147,7 +147,7 @@ _exercise()
 
 }
 
-_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 # keep the blocksize and data size for dd later
 . $tmp.mkfs
@@ -184,7 +184,7 @@ _exercise u
 echo "*** unmount"
 _scratch_unmount
 
-_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 # keep the blocksize and data size for dd later
 . $tmp.mkfs
diff --git a/tests/xfs/335 b/tests/xfs/335
index ccc508e7..c2bb1bde 100755
--- a/tests/xfs/335
+++ b/tests/xfs/335
@@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/336 b/tests/xfs/336
index 279830b5..19ed8cc6 100755
--- a/tests/xfs/336
+++ b/tests/xfs/336
@@ -29,7 +29,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/337 b/tests/xfs/337
index a2515e36..ca476e28 100755
--- a/tests/xfs/337
+++ b/tests/xfs/337
@@ -23,7 +23,7 @@ _disable_dmesg_check
 rm -f "$seqres.full"
 
 echo "+ create scratch fs"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 
diff --git a/tests/xfs/341 b/tests/xfs/341
index f026aa37..dad1e0af 100755
--- a/tests/xfs/341
+++ b/tests/xfs/341
@@ -23,7 +23,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/342 b/tests/xfs/342
index 1ae414eb..0922b3fe 100755
--- a/tests/xfs/342
+++ b/tests/xfs/342
@@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/443 b/tests/xfs/443
index f2390bf3..a236c8f8 100755
--- a/tests/xfs/443
+++ b/tests/xfs/443
@@ -31,7 +31,7 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 _require_xfs_io_command "swapext"
 
-_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 _scratch_mount
 
 # get fs block size
diff --git a/tests/xfs/448 b/tests/xfs/448
index 815f56cb..3cd56d4d 100755
--- a/tests/xfs/448
+++ b/tests/xfs/448
@@ -34,7 +34,7 @@ _require_no_xfs_bug_on_assert
 rm -f "$seqres.full"
 
 # Format and mount
-_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs > $seqres.full 2> $tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
 _scratch_mount
 
diff --git a/tests/xfs/490 b/tests/xfs/490
index 8c3b0684..08a03261 100755
--- a/tests/xfs/490
+++ b/tests/xfs/490
@@ -37,7 +37,7 @@ filter_dmesg()
 # If enable free inode B+tree, this case will fail on xfs_dialloc_ag_update_inobt,
 # that's not what we want to test. Due to finobt feature is not necessary for this
 # test, so disable it directly.
-_scratch_mkfs_xfs -m finobt=0 | _filter_mkfs 2>$tmp.mkfs >> $seqres.full
+_scratch_mkfs_xfs -m finobt=0 | _xfs_filter_mkfs 2>$tmp.mkfs >> $seqres.full
 
 # On V5 filesystem, this case can't trigger bug because it doesn't read inodes
 # we are allocating from disk - it simply overwrites them with new inode
diff --git a/tests/xfs/502 b/tests/xfs/502
index fb9a82c1..464326cc 100755
--- a/tests/xfs/502
+++ b/tests/xfs/502
@@ -25,7 +25,7 @@ _require_xfs_io_error_injection "iunlink_fallback"
 _require_scratch
 _require_test_program "t_open_tmpfiles"
 
-_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 cat $tmp.mkfs >> $seqres.full
 . $tmp.mkfs
 
diff --git a/tests/xfs/513 b/tests/xfs/513
index bfdfd4f6..a13f0a03 100755
--- a/tests/xfs/513
+++ b/tests/xfs/513
@@ -68,7 +68,7 @@ MKFS_OPTIONS=""
 do_mkfs()
 {
 	echo "FORMAT: $@" | filter_loop | tee -a $seqres.full
-	$MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >>$seqres.full 2>$tmp.mkfs
+	$MKFS_XFS_PROG -f $* $LOOP_DEV | _xfs_filter_mkfs >>$seqres.full 2>$tmp.mkfs
 	if [ "${PIPESTATUS[0]}" -ne 0 ]; then
 		_fail "Fails on _mkfs_dev $* $LOOP_DEV"
 	fi
diff --git a/tests/xfs/530 b/tests/xfs/530
index 9c6f44d7..925a7b49 100755
--- a/tests/xfs/530
+++ b/tests/xfs/530
@@ -38,7 +38,7 @@ _require_scratch_nocheck
 
 echo "* Test extending rt inodes"
 
-_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 . $tmp.mkfs
 
 echo "Create fake rt volume"
diff --git a/tests/xfs/533 b/tests/xfs/533
index b85b5298..c7d470c9 100755
--- a/tests/xfs/533
+++ b/tests/xfs/533
@@ -23,7 +23,7 @@ _require_test_program "punch-alternating"
 _require_xfs_io_error_injection "reduce_max_iextents"
 _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
 
-_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 . $tmp.mkfs
 
 # Filesystems with directory block size greater than one FSB will not be tested,
-- 
2.34.1


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

* [PATCH 6/7] common: move _xfs_filter_mkfs from common/filter to common/xfs
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
                   ` (4 preceding siblings ...)
  2022-02-07  6:55 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  2022-02-07  6:55 ` [PATCH 7/7] generic/204: do xfs unique preparation only for xfs Shin'ichiro Kawasaki
  6 siblings, 0 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The helper function _xfs_filter_mkfs works only for xfs. Move it from
common/filter to common/xfs. Also remove useless lines for other
filesystems.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/filter | 53 ---------------------------------------------------
 common/xfs    | 43 +++++++++++++++++++++++++++++++++++++++++
 2 files changed, 43 insertions(+), 53 deletions(-)

diff --git a/common/filter b/common/filter
index 24fd0650..7c71be4f 100644
--- a/common/filter
+++ b/common/filter
@@ -115,59 +115,6 @@ _filter_date()
 	-e 's/[A-Z][a-z][a-z] [A-z][a-z][a-z]  *[0-9][0-9]* [0-9][0-9]:[0-9][0-9]:[0-9][0-9] [0-9][0-9][0-9][0-9]$/DATE/'
 }
 
-# prints filtered output on stdout, values (use eval) on stderr
-# Non XFS filesystems always return a 4k block size and a 256 byte inode.
-_xfs_filter_mkfs()
-{
-    case $FSTYP in
-    xfs)
-	;;
-    *)
-	cat - >/dev/null
-	perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
-	return ;;
-    esac
-
-    echo "_fs_has_crcs=0" >&2
-    set -
-    perl -ne '
-    if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) {
-	print STDERR "ddev=$1\nisize=$2\nagcount=$3\nagsize=$4\n";
-	print STDOUT "meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks\n";
-    }
-    if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) {
-        print STDERR "sectsz=$1\nattr=$2\n";
-    }
-    if (/^\s+=\s+crc=(\d)/) {
-        print STDERR "_fs_has_crcs=$1\n";
-    }
-    if (/^data\s+=\s+bsize=(\d+)\s+blocks=(\d+), imaxpct=(\d+)/) {
-	print STDERR "dbsize=$1\ndblocks=$2\nimaxpct=$3\n";
-	print STDOUT "data     = bsize=XXX blocks=XXX, imaxpct=PCT\n";
-    }
-    if (/^\s+=\s+sunit=(\d+)\s+swidth=(\d+) blks/) {
-        print STDERR "sunit=$1\nswidth=$2\nunwritten=1\n";
-	print STDOUT "         = sunit=XXX swidth=XXX, unwritten=X\n";
-    }
-    if (/^naming\s+=version\s+(\d+)\s+bsize=(\d+)/) {
-	print STDERR "dirversion=$1\ndirbsize=$2\n";
-	print STDOUT "naming   =VERN bsize=XXX\n";
-    }
-    if (/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+),\s+version=(\d+)/ ||
-	/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+)/) {
-	print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n";
-	print STDOUT "log      =LDEV bsize=XXX blocks=XXX\n";
-    }
-    if (/^\s+=\s+sectsz=(\d+)\s+sunit=(\d+) blks/) {
-	print STDERR "logsectsz=$1\nlogsunit=$2\n\n";
-    }
-    if (/^realtime\s+=([\w|\/.-]+)\s+extsz=(\d+)\s+blocks=(\d+), rtextents=(\d+)/) {
-	print STDERR "rtdev=$1\nrtextsz=$2\nrtblocks=$3\nrtextents=$4\n";
-	print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n";
-    }'
-}
-
-
 # prints the bits we care about in growfs
 # 
 _filter_growfs()
diff --git a/common/xfs b/common/xfs
index 3435c706..a3da25dd 100644
--- a/common/xfs
+++ b/common/xfs
@@ -1275,3 +1275,46 @@ _require_scratch_xfs_bigtime()
 		_notrun "bigtime feature not advertised on mount?"
 	_scratch_unmount
 }
+
+# prints filtered output on stdout, values (use eval) on stderr
+# Non XFS filesystems always return a 4k block size and a 256 byte inode.
+_xfs_filter_mkfs()
+{
+    echo "_fs_has_crcs=0" >&2
+    set -
+    perl -ne '
+    if (/^meta-data=([\w,|\/.-]+)\s+isize=(\d+)\s+agcount=(\d+), agsize=(\d+) blks/) {
+	print STDERR "ddev=$1\nisize=$2\nagcount=$3\nagsize=$4\n";
+	print STDOUT "meta-data=DDEV isize=XXX agcount=N, agsize=XXX blks\n";
+    }
+    if (/^\s+=\s+sectsz=(\d+)\s+attr=(\d+)/) {
+        print STDERR "sectsz=$1\nattr=$2\n";
+    }
+    if (/^\s+=\s+crc=(\d)/) {
+        print STDERR "_fs_has_crcs=$1\n";
+    }
+    if (/^data\s+=\s+bsize=(\d+)\s+blocks=(\d+), imaxpct=(\d+)/) {
+	print STDERR "dbsize=$1\ndblocks=$2\nimaxpct=$3\n";
+	print STDOUT "data     = bsize=XXX blocks=XXX, imaxpct=PCT\n";
+    }
+    if (/^\s+=\s+sunit=(\d+)\s+swidth=(\d+) blks/) {
+        print STDERR "sunit=$1\nswidth=$2\nunwritten=1\n";
+	print STDOUT "         = sunit=XXX swidth=XXX, unwritten=X\n";
+    }
+    if (/^naming\s+=version\s+(\d+)\s+bsize=(\d+)/) {
+	print STDERR "dirversion=$1\ndirbsize=$2\n";
+	print STDOUT "naming   =VERN bsize=XXX\n";
+    }
+    if (/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+),\s+version=(\d+)/ ||
+	/^log\s+=(internal log|[\w|\/.-]+)\s+bsize=(\d+)\s+blocks=(\d+)/) {
+	print STDERR "ldev=\"$1\"\nlbsize=$2\nlblocks=$3\nlversion=$4\n";
+	print STDOUT "log      =LDEV bsize=XXX blocks=XXX\n";
+    }
+    if (/^\s+=\s+sectsz=(\d+)\s+sunit=(\d+) blks/) {
+	print STDERR "logsectsz=$1\nlogsunit=$2\n\n";
+    }
+    if (/^realtime\s+=([\w|\/.-]+)\s+extsz=(\d+)\s+blocks=(\d+), rtextents=(\d+)/) {
+	print STDERR "rtdev=$1\nrtextsz=$2\nrtblocks=$3\nrtextents=$4\n";
+	print STDOUT "realtime =RDEV extsz=XXX blocks=XXX, rtextents=XXX\n";
+    }'
+}
-- 
2.34.1


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

* [PATCH 7/7] generic/204: do xfs unique preparation only for xfs
  2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
                   ` (5 preceding siblings ...)
  2022-02-07  6:55 ` [PATCH 6/7] common: move _xfs_filter_mkfs from common/filter to common/xfs Shin'ichiro Kawasaki
@ 2022-02-07  6:55 ` Shin'ichiro Kawasaki
  6 siblings, 0 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  6:55 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: linux-xfs, linux-ext4, Naohiro Aota, Johannes Thumshirn,
	Damien Le Moal, Shin'ichiro Kawasaki

The test case generic/204 formats the scratch device to get block size
as a part of preparation. However, this preparation is required only for
xfs. To simplify preparation for other filesystems, do the preparation
only for xfs.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/generic/204 | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/generic/204 b/tests/generic/204
index 40d524d1..ea267760 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -16,17 +16,18 @@ _cleanup()
 	sync
 }
 
-# Import common functions.
-. ./common/filter
-
 # real QA test starts here
 _supported_fs generic
 
 _require_scratch
 
-# get the block size first
-_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
-. $tmp.mkfs
+dbsize=4096
+isize=256
+if [ $FSTYP = "xfs" ]; then
+	# get the block size first
+	_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
+	. $tmp.mkfs
+fi
 
 # For xfs, we need to handle the different default log sizes that different
 # versions of mkfs create. All should be valid with a 16MB log, so use that.
@@ -37,11 +38,15 @@ _scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 SIZE=`expr 115 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
 	|| _fail "mkfs failed"
-cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
+
+if [ $FSTYP = "xfs" ]; then
+	cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
+	# Source $tmp.mkfs to get geometry
+	. $tmp.mkfs
+fi
+
 _scratch_mount
 
-# Source $tmp.mkfs to get geometry
-. $tmp.mkfs
 
 # fix the reserve block pool to a known size so that the enospc calculations
 # work out correctly. Space usages is based 22500 files and 1024 reserved blocks
-- 
2.34.1


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

* Re: [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code
  2022-02-07  6:55 ` [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
@ 2022-02-09  0:35   ` Darrick J. Wong
  2022-02-09  8:09     ` Shinichiro Kawasaki
  0 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2022-02-09  0:35 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki
  Cc: fstests, linux-btrfs, linux-xfs, linux-ext4, Naohiro Aota,
	Johannes Thumshirn, Damien Le Moal

On Mon, Feb 07, 2022 at 03:55:36PM +0900, Shin'ichiro Kawasaki wrote:
> The test cases generic/{171,172,173,174,204} call _scratch_mkfs before
> _scratch_mkfs_sized, and they do not check return code of
> _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount
> after it cannot detect the sized mkfs failure because _scratch_mkfs
> already created a file system on the device. This results in unexpected
> test condition of the test cases.
> 
> To avoid the unexpected test condition, check return code of
> _scratch_mkfs_sized in the test cases.
> 
> Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

Hm.  I wonder, are there other tests that employ this _scratch_mkfs ->
scratch_mkfs_sized sequence and need patching?

$ git grep -l _scratch_mkfs_sized | while read f; do grep -q
'_scratch_mkfs[[:space:]]' $f && echo $f; done
common/encrypt
common/rc
tests/ext4/021
tests/generic/171
tests/generic/172
tests/generic/173
tests/generic/174
tests/generic/204
tests/generic/520
tests/generic/525
tests/xfs/015

generic/520 is a false positive, and you patched the rest.  OK, good.

I wonder if the maintainer will ask for the _scratch_mkfs_sized in the
failure output, but as far as I'm concerned:

Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/generic/171 | 2 +-
>  tests/generic/172 | 2 +-
>  tests/generic/173 | 2 +-
>  tests/generic/174 | 2 +-
>  tests/generic/204 | 3 ++-
>  5 files changed, 6 insertions(+), 5 deletions(-)
> 
> diff --git a/tests/generic/171 b/tests/generic/171
> index fb2a6f14..f823a454 100755
> --- a/tests/generic/171
> +++ b/tests/generic/171
> @@ -42,7 +42,7 @@ sz_bytes=$((nr_blks * 8 * blksz))
>  if [ $sz_bytes -lt $((32 * 1048576)) ]; then
>  	sz_bytes=$((32 * 1048576))
>  fi
> -_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
> +_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed"
>  _scratch_mount >> $seqres.full 2>&1
>  rm -rf $testdir
>  mkdir $testdir
> diff --git a/tests/generic/172 b/tests/generic/172
> index ab5122fa..383824b9 100755
> --- a/tests/generic/172
> +++ b/tests/generic/172
> @@ -40,7 +40,7 @@ umount $SCRATCH_MNT
>  
>  file_size=$((768 * 1024 * 1024))
>  fs_size=$((1024 * 1024 * 1024))
> -_scratch_mkfs_sized $fs_size >> $seqres.full 2>&1
> +_scratch_mkfs_sized $fs_size >> $seqres.full 2>&1 || _fail "mkfs failed"
>  _scratch_mount >> $seqres.full 2>&1
>  rm -rf $testdir
>  mkdir $testdir
> diff --git a/tests/generic/173 b/tests/generic/173
> index 0eb313e2..e1493278 100755
> --- a/tests/generic/173
> +++ b/tests/generic/173
> @@ -42,7 +42,7 @@ sz_bytes=$((nr_blks * 8 * blksz))
>  if [ $sz_bytes -lt $((32 * 1048576)) ]; then
>  	sz_bytes=$((32 * 1048576))
>  fi
> -_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
> +_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed"
>  _scratch_mount >> $seqres.full 2>&1
>  rm -rf $testdir
>  mkdir $testdir
> diff --git a/tests/generic/174 b/tests/generic/174
> index 1505453e..c7a177b8 100755
> --- a/tests/generic/174
> +++ b/tests/generic/174
> @@ -43,7 +43,7 @@ sz_bytes=$((nr_blks * 8 * blksz))
>  if [ $sz_bytes -lt $((32 * 1048576)) ]; then
>  	sz_bytes=$((32 * 1048576))
>  fi
> -_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1
> +_scratch_mkfs_sized $sz_bytes >> $seqres.full 2>&1 || _fail "mkfs failed"
>  _scratch_mount >> $seqres.full 2>&1
>  rm -rf $testdir
>  mkdir $testdir
> diff --git a/tests/generic/204 b/tests/generic/204
> index a3dabb71..b5deb443 100755
> --- a/tests/generic/204
> +++ b/tests/generic/204
> @@ -35,7 +35,8 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
>  [ $FSTYP = "xfs" ] && MKFS_OPTIONS="$MKFS_OPTIONS -l size=16m -i maxpct=50"
>  
>  SIZE=`expr 115 \* 1024 \* 1024`
> -_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw
> +_scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
> +	|| _fail "mkfs failed"
>  cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
>  _scratch_mount
>  
> -- 
> 2.34.1
> 

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

* Re: [PATCH 4/7] xfs/015: check _scratch_mkfs_sized return code
  2022-02-07  6:55 ` [PATCH 4/7] xfs/015: " Shin'ichiro Kawasaki
@ 2022-02-09  0:36   ` Darrick J. Wong
  0 siblings, 0 replies; 16+ messages in thread
From: Darrick J. Wong @ 2022-02-09  0:36 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki
  Cc: fstests, linux-btrfs, linux-xfs, linux-ext4, Naohiro Aota,
	Johannes Thumshirn, Damien Le Moal

On Mon, Feb 07, 2022 at 03:55:38PM +0900, Shin'ichiro Kawasaki wrote:
> The test cases xfs/015 calls _scratch_mkfs before _scratch_mkfs_sized,
> and does not check return code of _scratch_mkfs_sized. Even if
> _scratch_mkfs_sized failed, _scratch_mount after it cannot detect the
> sized mkfs failure because _scratch_mkfs already created a file system
> on the device. This results in unexpected test condition.
> 
> To avoid the unexpected test condition, check return code of
> _scratch_mkfs_sized.
> 
> Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

Looks good,
Reviewed-by: Darrick J. Wong <djwong@kernel.org>

--D

> ---
>  tests/xfs/015 | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tests/xfs/015 b/tests/xfs/015
> index 86fa6336..2bb7b8d5 100755
> --- a/tests/xfs/015
> +++ b/tests/xfs/015
> @@ -43,7 +43,7 @@ _scratch_mount
>  _require_fs_space $SCRATCH_MNT 131072
>  _scratch_unmount
>  
> -_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw
> +_scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
>  cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
>  # get original data blocks number and agcount
>  . $tmp.mkfs
> -- 
> 2.34.1
> 

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

* Re: [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs
  2022-02-07  6:55 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki
@ 2022-02-09  0:43   ` Darrick J. Wong
  2022-02-09  0:53     ` Darrick J. Wong
  0 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2022-02-09  0:43 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki
  Cc: fstests, linux-btrfs, linux-xfs, linux-ext4, Naohiro Aota,
	Johannes Thumshirn, Damien Le Moal

On Mon, Feb 07, 2022 at 03:55:39PM +0900, Shin'ichiro Kawasaki wrote:
> The helper function works only for xfs and used only for xfs except
> generic/204. Rename the function to clearly indicate that the function
> is only for xfs.
> 
> Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>

<snip the diffstat>

> diff --git a/common/attr b/common/attr
> index 35682d7c..964c790a 100644
> --- a/common/attr
> +++ b/common/attr
> @@ -13,7 +13,7 @@ _acl_get_max()
>  		# CRC format filesystems have much larger ACL counts. The actual
>  		# number is into the thousands, but testing that meany takes too
>  		# long, so just test well past the old limit of 25.
> -		$XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
> +		$XFS_INFO_PROG $TEST_DIR | _xfs_filter_mkfs > /dev/null 2> $tmp.info
>  		. $tmp.info
>  		rm $tmp.info
>  		if [ $_fs_has_crcs -eq 0 ]; then
> diff --git a/common/filter b/common/filter
> index c3db7a56..24fd0650 100644
> --- a/common/filter
> +++ b/common/filter
> @@ -117,7 +117,7 @@ _filter_date()
>  
>  # prints filtered output on stdout, values (use eval) on stderr
>  # Non XFS filesystems always return a 4k block size and a 256 byte inode.
> -_filter_mkfs()
> +_xfs_filter_mkfs()
>  {
>      case $FSTYP in
>      xfs)
> diff --git a/common/xfs b/common/xfs

This renames the generic function to be "only for xfs" but it leaves the
non-XFS bits.  Those bits are /really/ problematic (hardcoded
isize=256 and dbsize=4096?  Seriously??) and themselves were introduced
in commit a4d5b247 ("xfstests: Make 204 work with different block and
inode sizes.") oh wow.

I'm sorry that someone left this a mess, but let's try to make it easy
to clean up all the other filesystems, please.  Specifically, could you
please:

1. Hoist the XFS-specific code from _filter_mkfs into a new
   helper _xfs_filter_mkfs() in common/xfs?

--D

> index 713e9fe7..3435c706 100644
> --- a/common/xfs
> +++ b/common/xfs
> @@ -832,7 +832,7 @@ _require_scratch_xfs_shrink()
>  	_require_scratch
>  	_require_command "$XFS_GROWFS_PROG" xfs_growfs
>  
> -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  	. $tmp.mkfs
>  	_scratch_mount
>  	# here just to check if kernel supports, no need do more extra work
> diff --git a/tests/generic/204 b/tests/generic/204
> index b5deb443..40d524d1 100755
> --- a/tests/generic/204
> +++ b/tests/generic/204
> @@ -25,7 +25,7 @@ _supported_fs generic
>  _require_scratch
>  
>  # get the block size first
> -_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
>  . $tmp.mkfs
>  
>  # For xfs, we need to handle the different default log sizes that different
> @@ -37,7 +37,7 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
>  SIZE=`expr 115 \* 1024 \* 1024`
>  _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
>  	|| _fail "mkfs failed"
> -cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
>  _scratch_mount
>  
>  # Source $tmp.mkfs to get geometry
> diff --git a/tests/xfs/004 b/tests/xfs/004
> index f18316b3..5e83fff9 100755
> --- a/tests/xfs/004
> +++ b/tests/xfs/004
> @@ -21,7 +21,7 @@ _cleanup()
>  _populate_scratch()
>  {
>  	echo "=== mkfs output ===" >>$seqres.full
> -	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
> +	_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
>  	. $tmp.mkfs
>  	_scratch_mount
>  	# This test looks at specific behaviors of the xfs_db freesp command,
> diff --git a/tests/xfs/007 b/tests/xfs/007
> index 4f864100..33a857e8 100755
> --- a/tests/xfs/007
> +++ b/tests/xfs/007
> @@ -19,7 +19,7 @@ _supported_fs xfs
>  _require_scratch
>  _require_xfs_quota
>  
> -_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
>  . $tmp.mkfs
>  
>  do_test()
> diff --git a/tests/xfs/010 b/tests/xfs/010
> index 16c08b85..badac7c0 100755
> --- a/tests/xfs/010
> +++ b/tests/xfs/010
> @@ -87,7 +87,7 @@ _require_scratch
>  _require_xfs_mkfs_finobt
>  _require_xfs_finobt
>  
> -_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
> +_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _xfs_filter_mkfs 2>$seqres.full
>  
>  # sparsely populate the fs such that we create records with free inodes
>  _scratch_mount
> diff --git a/tests/xfs/013 b/tests/xfs/013
> index 2d005753..dc39ffd6 100755
> --- a/tests/xfs/013
> +++ b/tests/xfs/013
> @@ -89,7 +89,7 @@ _require_xfs_finobt
>  _require_command "$KILLALL_PROG" killall
>  
>  _scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
> -	_filter_mkfs 2>> $seqres.full
> +	_xfs_filter_mkfs 2>> $seqres.full
>  _scratch_mount
>  
>  COUNT=20000	# number of files per directory
> diff --git a/tests/xfs/015 b/tests/xfs/015
> index 2bb7b8d5..72842b38 100755
> --- a/tests/xfs/015
> +++ b/tests/xfs/015
> @@ -44,7 +44,7 @@ _require_fs_space $SCRATCH_MNT 131072
>  _scratch_unmount
>  
>  _scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
> -cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
> +cat $tmp.mkfs.raw | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
>  # get original data blocks number and agcount
>  . $tmp.mkfs
>  _scratch_mount
> diff --git a/tests/xfs/016 b/tests/xfs/016
> index 6337bb1f..e8094476 100755
> --- a/tests/xfs/016
> +++ b/tests/xfs/016
> @@ -66,7 +66,7 @@ _init()
>      _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
>      [ $? -ne 0 ] && \
>          _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
> -    _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
> +    _xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
>      . $tmp.mkfs
>      [ $logsunit -ne 0 ] && \
>          _notrun "Cannot run this test using log MKFS_OPTIONS specified"
> diff --git a/tests/xfs/029 b/tests/xfs/029
> index 6e8aa4db..a3fb9cfc 100755
> --- a/tests/xfs/029
> +++ b/tests/xfs/029
> @@ -36,7 +36,7 @@ _supported_fs xfs
>  _require_scratch
>  
>  echo
> -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
>  
>  echo
>  _scratch_xfs_logprint | filter_logprint
> diff --git a/tests/xfs/030 b/tests/xfs/030
> index 201a9015..62066d06 100755
> --- a/tests/xfs/030
> +++ b/tests/xfs/030
> @@ -83,7 +83,7 @@ $here/src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
>  
>  # now kick off the real repair test...
>  #
> -_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs $DSIZE | _xfs_filter_mkfs 2>$tmp.mkfs
>  . $tmp.mkfs
>  _check_ag 0
>  _check_ag -1
> diff --git a/tests/xfs/031 b/tests/xfs/031
> index 6e3813da..e6bbc0d4 100755
> --- a/tests/xfs/031
> +++ b/tests/xfs/031
> @@ -82,20 +82,20 @@ echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
>  _create_proto 0
>  echo "=== one entry (shortform)"
>  _scratch_mkfs_xfs -p $tmp.proto >$tmp.mkfs0 2>&1
> -_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
> +_xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
>  . $tmp.mkfs
>  _check_repair
>  
>  # block-form root directory & repeat
>  _create_proto 20
>  echo "=== twenty entries (block form)"
> -_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
> +_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
>  _check_repair
>  
>  # leaf-form root directory & repeat
>  _create_proto 1000
>  echo "=== thousand entries (leaf form)"
> -_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
> +_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
>  _check_repair
>  
>  # success, all done
> diff --git a/tests/xfs/033 b/tests/xfs/033
> index d47da0d6..61ae4004 100755
> --- a/tests/xfs/033
> +++ b/tests/xfs/033
> @@ -55,10 +55,10 @@ _require_scratch
>  _require_no_large_scratch_dev
>  
>  # devzero blows away 512byte blocks, so make 512byte inodes (at least)
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  if [ $isize -lt 512 ]; then
> -	_scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +	_scratch_mkfs_xfs -isize=512 | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  	. $tmp.mkfs
>  fi
>  
> diff --git a/tests/xfs/041 b/tests/xfs/041
> index 05de5578..135ed410 100755
> --- a/tests/xfs/041
> +++ b/tests/xfs/041
> @@ -41,7 +41,7 @@ _do_die_on_error=message_only
>  agsize=32
>  echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
>  _scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
> -bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \
> +bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _xfs_filter_mkfs 2>&1 \
>  		| perl -ne 'if (/dbsize=(\d+)/) {print $1;}'`
>  onemeginblocks=`expr 1048576 / $bsize`
>  _scratch_mount
> diff --git a/tests/xfs/044 b/tests/xfs/044
> index e66c0cb3..8ffd2af4 100755
> --- a/tests/xfs/044
> +++ b/tests/xfs/044
> @@ -79,7 +79,7 @@ lsize=16777216
>  _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
>  [ $? -ne 0 ] && \
>      _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
> -_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
> +_xfs_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
>  . $tmp.mkfs1
>  [ $lversion -ne 1 ] && \
>      _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
> diff --git a/tests/xfs/050 b/tests/xfs/050
> index 1847611b..3556c85e 100755
> --- a/tests/xfs/050
> +++ b/tests/xfs/050
> @@ -65,7 +65,7 @@ _filter_and_check_blks()
>  
>  _exercise()
>  {
> -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  	cat $tmp.mkfs >>$seqres.full
>  
>  	# keep the blocksize and data size for dd later
> diff --git a/tests/xfs/052 b/tests/xfs/052
> index 75761022..e4c7ee6c 100755
> --- a/tests/xfs/052
> +++ b/tests/xfs/052
> @@ -34,7 +34,7 @@ _require_nobody
>  # setup a default run
>  _qmount_option uquota
>  
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  cat $tmp.mkfs >>$seqres.full
>  chmod a+w $seqres.full     # arbitrary users will write here
>  
> diff --git a/tests/xfs/058 b/tests/xfs/058
> index 8751a7ac..0f87ec3c 100755
> --- a/tests/xfs/058
> +++ b/tests/xfs/058
> @@ -22,7 +22,7 @@ _require_xfs_db_command "fuzz"
>  rm -f "$seqres.full"
>  
>  echo "Format"
> -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
> +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
>  source $tmp.mkfs
>  
>  do_xfs_db()
> diff --git a/tests/xfs/067 b/tests/xfs/067
> index 3dc381bb..c733d761 100755
> --- a/tests/xfs/067
> +++ b/tests/xfs/067
> @@ -22,7 +22,7 @@ _require_scratch
>  
>  # set up fs for 1K inodes
>  isize=0
> -_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
>  [ $? -eq 0 ] && source $tmp.mkfs
>  if [ "$isize" -lt 1024 ]; then
>      _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
> diff --git a/tests/xfs/070 b/tests/xfs/070
> index 43ca7f84..9db518d7 100755
> --- a/tests/xfs/070
> +++ b/tests/xfs/070
> @@ -76,7 +76,7 @@ _supported_fs xfs
>  _require_scratch_nocheck
>  _require_command "$KILLALL_PROG" killall
>  
> -_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
> +_scratch_mkfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
>  test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
>  
>  . $tmp.mkfs # import agcount
> diff --git a/tests/xfs/071 b/tests/xfs/071
> index 8373878a..9b425d9f 100755
> --- a/tests/xfs/071
> +++ b/tests/xfs/071
> @@ -81,7 +81,7 @@ _supported_fs xfs
>  [ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
>  
>  _require_scratch
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  . $tmp.mkfs
>  echo
>  _scratch_mount
> diff --git a/tests/xfs/073 b/tests/xfs/073
> index c7616b9e..d1b97313 100755
> --- a/tests/xfs/073
> +++ b/tests/xfs/073
> @@ -131,7 +131,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
>  echo 
>  echo === copying scratch device to single target, large ro device
>  ${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g \
> -	| _filter_mkfs 2>/dev/null
> +	| _xfs_filter_mkfs 2>/dev/null
>  rmdir $imgs.source_dir 2>/dev/null
>  mkdir $imgs.source_dir
>  
> diff --git a/tests/xfs/076 b/tests/xfs/076
> index eac7410e..3cdde79e 100755
> --- a/tests/xfs/076
> +++ b/tests/xfs/076
> @@ -61,7 +61,7 @@ _require_xfs_io_command "fpunch"
>  _require_xfs_sparse_inodes
>  
>  _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
> -	_filter_mkfs > /dev/null 2> $tmp.mkfs
> +	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
>  . $tmp.mkfs	# for isize
>  
>  _scratch_mount
> diff --git a/tests/xfs/078 b/tests/xfs/078
> index 1f475c96..a3b75fa6 100755
> --- a/tests/xfs/078
> +++ b/tests/xfs/078
> @@ -74,7 +74,7 @@ _grow_loop()
>  		mkfs_crc_opts="-m crc=0"
>  	fi
>  	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
> -		| _filter_mkfs 2>/dev/null
> +		| _xfs_filter_mkfs 2>/dev/null
>  
>  	echo "*** extend loop file"
>  	_destroy_loop_device $LOOP_DEV
> diff --git a/tests/xfs/092 b/tests/xfs/092
> index 015149e2..7e7b31fc 100755
> --- a/tests/xfs/092
> +++ b/tests/xfs/092
> @@ -20,7 +20,7 @@ _require_scratch
>  _require_no_large_scratch_dev
>  
>  MOUNT_OPTIONS="$MOUNT_OPTIONS -o inode64"
> -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
>  echo Silence is golden
>  
>  _try_scratch_mount
> diff --git a/tests/xfs/104 b/tests/xfs/104
> index d16f46d8..c21bd4e0 100755
> --- a/tests/xfs/104
> +++ b/tests/xfs/104
> @@ -15,7 +15,7 @@ _begin_fstest growfs ioctl prealloc auto stress
>  _create_scratch()
>  {
>  	echo "*** mkfs"
> -	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
> +	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
>  	. $tmp.mkfs
>  
>  	echo "*** mount"
> @@ -50,7 +50,7 @@ _supported_fs xfs
>  _require_scratch
>  _require_xfs_io_command "falloc"
>  
> -_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
>  . $tmp.mkfs	# extract blocksize and data size for scratch device
>  
>  endsize=`expr 550 \* 1048576`	# stop after growing this big
> @@ -89,7 +89,7 @@ while [ $size -le $endsize ]; do
>  	echo "*** growing filesystem"
>  	echo "*** growing to a ${sizeb} block filesystem" >> $seqres.full
>  	xfs_growfs -D ${sizeb} $SCRATCH_MNT \
> -		| tee -a $seqres.full | _filter_mkfs 2>$tmp.growfs
> +		| tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.growfs
>  	. $tmp.growfs
>  	[ `expr $size % $modsize` -eq 0 ] && wait	# every 4th iteration
>  	echo AGCOUNT=$agcount | tee -a $seqres.full
> diff --git a/tests/xfs/108 b/tests/xfs/108
> index 46070005..985b989b 100755
> --- a/tests/xfs/108
> +++ b/tests/xfs/108
> @@ -62,7 +62,7 @@ _require_prjquota $SCRATCH_DEV
>  # real QA test starts here
>  rm -f $tmp.projects $seqres.full
>  _scratch_unmount 2>/dev/null
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  cat $tmp.mkfs >>$seqres.full
>  _scratch_mount
>  
> diff --git a/tests/xfs/109 b/tests/xfs/109
> index 6cb6917a..e29d4795 100755
> --- a/tests/xfs/109
> +++ b/tests/xfs/109
> @@ -78,7 +78,7 @@ if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
>  fi
>  _scratch_unmount
>  
> -_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _xfs_filter_mkfs 2>$tmp.mkfs
>  cat $tmp.mkfs >>$seqres.full
>  _scratch_mount
>  
> diff --git a/tests/xfs/110 b/tests/xfs/110
> index 596057ef..734d2869 100755
> --- a/tests/xfs/110
> +++ b/tests/xfs/110
> @@ -18,7 +18,7 @@ _require_scratch
>  
>  # real QA test starts here
>  _scratch_unmount 2>/dev/null
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  
>  STR1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
>  STR2=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
> diff --git a/tests/xfs/111 b/tests/xfs/111
> index ede28aee..ed5a54c5 100755
> --- a/tests/xfs/111
> +++ b/tests/xfs/111
> @@ -22,7 +22,7 @@ _require_scratch
>  _scratch_unmount 2>/dev/null
>  MKFS_OPTIONS="-bsize=4096"
>  MOUNT_OPTIONS="-o noatime"
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  _scratch_mount
>  
>  echo Create some files
> diff --git a/tests/xfs/144 b/tests/xfs/144
> index 5abec9ae..d46eb1e2 100755
> --- a/tests/xfs/144
> +++ b/tests/xfs/144
> @@ -24,7 +24,7 @@ _require_xfs_quota
>  _require_scratch
>  
>  exercise() {
> -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  	cat $tmp.mkfs >>$seqres.full
>  
>  	# keep the blocksize and data size for dd later
> diff --git a/tests/xfs/153 b/tests/xfs/153
> index 37303701..d410cbed 100755
> --- a/tests/xfs/153
> +++ b/tests/xfs/153
> @@ -70,7 +70,7 @@ _filter_and_check_blks()
>  
>  run_tests()
>  {
> -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  	cat $tmp.mkfs >>$seqres.full
>  
>  	# keep the blocksize and data size for dd later
> diff --git a/tests/xfs/163 b/tests/xfs/163
> index 9f6dbeb8..79f420fa 100755
> --- a/tests/xfs/163
> +++ b/tests/xfs/163
> @@ -24,7 +24,7 @@ test_shrink()
>  	_check_scratch_fs
>  	_scratch_mount
>  
> -	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
> +	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
>  	. $tmp.growfs
>  	[ $ret -eq 0 -a $1 -eq $dblocks ]
>  }
> @@ -38,7 +38,7 @@ echo "Format and mount"
>  # agcount = 1 is forbidden on purpose, and need to ensure shrinking to
>  # 2 AGs isn't feasible yet. So agcount = 3 is the minimum number now.
>  _scratch_mkfs -dsize="$((512 * 1024 * 1024))" -dagcount=3 2>&1 | \
> -	tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +	tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  t_dblocks=$dblocks
>  _scratch_mount >> $seqres.full
> diff --git a/tests/xfs/168 b/tests/xfs/168
> index ffcd0df8..6b3eee30 100755
> --- a/tests/xfs/168
> +++ b/tests/xfs/168
> @@ -19,7 +19,7 @@ _begin_fstest auto growfs shrinkfs ioctl prealloc stress
>  create_scratch()
>  {
>  	_scratch_mkfs_xfs $@ | tee -a $seqres.full | \
> -		_filter_mkfs 2>$tmp.mkfs >/dev/null
> +		_xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  	. $tmp.mkfs
>  
>  	_scratch_mount
> @@ -48,7 +48,7 @@ _supported_fs xfs
>  _require_scratch_xfs_shrink
>  _require_xfs_io_command "falloc"
>  
> -_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs	# extract blocksize and data size for scratch device
>  
>  endsize=`expr 125 \* 1048576`	# stop after shrinking this big
> @@ -93,7 +93,7 @@ while [ $totalcount -gt 0 ]; do
>  		[ $decb -eq 0 ] && break
>  
>  		# get latest dblocks
> -		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
> +		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
>  		. $tmp.growfs
>  
>  		size=`expr $dblocks \* $dbsize`
> diff --git a/tests/xfs/176 b/tests/xfs/176
> index ba4aae59..57e11fd7 100755
> --- a/tests/xfs/176
> +++ b/tests/xfs/176
> @@ -24,7 +24,7 @@ _require_xfs_io_command "falloc"
>  _require_xfs_io_command "fpunch"
>  
>  _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
> -	_filter_mkfs > /dev/null 2> $tmp.mkfs
> +	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
>  . $tmp.mkfs	# for isize
>  cat $tmp.mkfs >> $seqres.full
>  
> diff --git a/tests/xfs/178 b/tests/xfs/178
> index a65197cd..5392b9bb 100755
> --- a/tests/xfs/178
> +++ b/tests/xfs/178
> @@ -45,7 +45,7 @@ _supported_fs xfs
>  #             fix filesystem, new mkfs.xfs will be fine.
>  
>  _require_scratch
> -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
>  test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!"
>  
>  # By executing the followint tmp file, will get on the mkfs options stored in
> diff --git a/tests/xfs/186 b/tests/xfs/186
> index b54fcf26..8a2a6995 100755
> --- a/tests/xfs/186
> +++ b/tests/xfs/186
> @@ -124,7 +124,7 @@ _require_scratch
>  _require_attrs
>  _require_attr_v1
>  
> -_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _filter_mkfs \
> +_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _xfs_filter_mkfs \
>  	>>$seqres.full 2>$tmp.mkfs
>  # import crc status and attr version
>  . $tmp.mkfs
> diff --git a/tests/xfs/189 b/tests/xfs/189
> index e601881a..437243c7 100755
> --- a/tests/xfs/189
> +++ b/tests/xfs/189
> @@ -231,7 +231,7 @@ _require_noattr2
>  unset SCRATCH_RTDEV
>  unset SCRATCH_LOGDEV
>  
> -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
>  
>  _add_scratch_fstab
>  _test_remount_rw
> diff --git a/tests/xfs/250 b/tests/xfs/250
> index 8af32711..573340bb 100755
> --- a/tests/xfs/250
> +++ b/tests/xfs/250
> @@ -54,7 +54,7 @@ _test_loop()
>  
>  	echo "*** mkfs loop file (size=$size)"
>  	$MKFS_XFS_PROG -d $dparam \
> -		| _filter_mkfs 2>/dev/null
> +		| _xfs_filter_mkfs 2>/dev/null
>  
>  	echo "*** mount loop filesystem"
>  	mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
> diff --git a/tests/xfs/259 b/tests/xfs/259
> index 88e2f3ee..7c062c7d 100755
> --- a/tests/xfs/259
> +++ b/tests/xfs/259
> @@ -49,7 +49,7 @@ for del in $sizes_to_check; do
>  			>/dev/null 2>&1 || echo "dd failed"
>  		lofile=$(losetup -f)
>  		losetup $lofile "$testfile"
> -		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _filter_mkfs \
> +		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _xfs_filter_mkfs \
>  			>/dev/null 2> $tmp.mkfs || echo "mkfs failed!"
>  		. $tmp.mkfs
>  		sync
> diff --git a/tests/xfs/276 b/tests/xfs/276
> index 8cc48675..6774b819 100755
> --- a/tests/xfs/276
> +++ b/tests/xfs/276
> @@ -29,7 +29,7 @@ _require_test_program "punch-alternating"
>  rm -f "$seqres.full"
>  
>  echo "Format and mount"
> -_scratch_mkfs | _filter_mkfs 2> "$tmp.mkfs" >/dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2> "$tmp.mkfs" >/dev/null
>  . $tmp.mkfs
>  cat "$tmp.mkfs" > $seqres.full
>  _scratch_mount
> diff --git a/tests/xfs/279 b/tests/xfs/279
> index 835d187f..64563237 100755
> --- a/tests/xfs/279
> +++ b/tests/xfs/279
> @@ -44,7 +44,7 @@ _check_mkfs()
>  		return
>  	fi
>  	echo "Passed."
> -	cat $tmp.mkfs.full | _filter_mkfs >> $seqres.full 2>$tmp.mkfs
> +	cat $tmp.mkfs.full | _xfs_filter_mkfs >> $seqres.full 2>$tmp.mkfs
>  	. $tmp.mkfs
>  	echo "Got sector size: $sectsz"
>  	device=`echo $@ | awk '{print $NF}'`
> diff --git a/tests/xfs/288 b/tests/xfs/288
> index e3d230e9..ec12d0d1 100755
> --- a/tests/xfs/288
> +++ b/tests/xfs/288
> @@ -20,7 +20,7 @@ _require_scratch
>  _require_attrs
>  
>  # get block size ($dbsize) from the mkfs output
> -_scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs_xfs 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  
>  _scratch_mount
> diff --git a/tests/xfs/292 b/tests/xfs/292
> index cf501571..930504ca 100755
> --- a/tests/xfs/292
> +++ b/tests/xfs/292
> @@ -25,12 +25,12 @@ rm -f $fsfile
>  $XFS_IO_PROG -f -c "truncate 256g" $fsfile
>  
>  echo "mkfs.xfs without geometry"
> -mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +mkfs.xfs -f $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
>  grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
>      sed -e "s:$fsfile:FILENAME:g"
>  
>  echo "mkfs.xfs with cmdline geometry"
> -mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +mkfs.xfs -f -d su=16k,sw=5 $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
>  grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
>      sed -e "s:$fsfile:FILENAME:g"
>  
> diff --git a/tests/xfs/299 b/tests/xfs/299
> index a3077b0c..e6da413a 100755
> --- a/tests/xfs/299
> +++ b/tests/xfs/299
> @@ -147,7 +147,7 @@ _exercise()
>  
>  }
>  
> -_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
>  cat $tmp.mkfs >>$seqres.full
>  # keep the blocksize and data size for dd later
>  . $tmp.mkfs
> @@ -184,7 +184,7 @@ _exercise u
>  echo "*** unmount"
>  _scratch_unmount
>  
> -_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
> +_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
>  cat $tmp.mkfs >>$seqres.full
>  # keep the blocksize and data size for dd later
>  . $tmp.mkfs
> diff --git a/tests/xfs/335 b/tests/xfs/335
> index ccc508e7..c2bb1bde 100755
> --- a/tests/xfs/335
> +++ b/tests/xfs/335
> @@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
>  rm -f "$seqres.full"
>  
>  echo "Format and mount"
> -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  cat $tmp.mkfs > "$seqres.full" 2>&1
>  _scratch_mount
> diff --git a/tests/xfs/336 b/tests/xfs/336
> index 279830b5..19ed8cc6 100755
> --- a/tests/xfs/336
> +++ b/tests/xfs/336
> @@ -29,7 +29,7 @@ _require_xfs_io_command "falloc"
>  rm -f "$seqres.full"
>  
>  echo "Format and mount"
> -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  cat $tmp.mkfs > "$seqres.full" 2>&1
>  _scratch_mount
> diff --git a/tests/xfs/337 b/tests/xfs/337
> index a2515e36..ca476e28 100755
> --- a/tests/xfs/337
> +++ b/tests/xfs/337
> @@ -23,7 +23,7 @@ _disable_dmesg_check
>  rm -f "$seqres.full"
>  
>  echo "+ create scratch fs"
> -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  cat $tmp.mkfs > "$seqres.full" 2>&1
>  
> diff --git a/tests/xfs/341 b/tests/xfs/341
> index f026aa37..dad1e0af 100755
> --- a/tests/xfs/341
> +++ b/tests/xfs/341
> @@ -23,7 +23,7 @@ _require_xfs_io_command "falloc"
>  rm -f "$seqres.full"
>  
>  echo "Format and mount"
> -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  cat $tmp.mkfs > "$seqres.full" 2>&1
>  _scratch_mount
> diff --git a/tests/xfs/342 b/tests/xfs/342
> index 1ae414eb..0922b3fe 100755
> --- a/tests/xfs/342
> +++ b/tests/xfs/342
> @@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
>  rm -f "$seqres.full"
>  
>  echo "Format and mount"
> -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
>  . $tmp.mkfs
>  cat $tmp.mkfs > "$seqres.full" 2>&1
>  _scratch_mount
> diff --git a/tests/xfs/443 b/tests/xfs/443
> index f2390bf3..a236c8f8 100755
> --- a/tests/xfs/443
> +++ b/tests/xfs/443
> @@ -31,7 +31,7 @@ _require_xfs_io_command "falloc"
>  _require_xfs_io_command "fpunch"
>  _require_xfs_io_command "swapext"
>  
> -_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> +_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
>  _scratch_mount
>  
>  # get fs block size
> diff --git a/tests/xfs/448 b/tests/xfs/448
> index 815f56cb..3cd56d4d 100755
> --- a/tests/xfs/448
> +++ b/tests/xfs/448
> @@ -34,7 +34,7 @@ _require_no_xfs_bug_on_assert
>  rm -f "$seqres.full"
>  
>  # Format and mount
> -_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs
> +_scratch_mkfs | _xfs_filter_mkfs > $seqres.full 2> $tmp.mkfs
>  test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
>  _scratch_mount
>  
> diff --git a/tests/xfs/490 b/tests/xfs/490
> index 8c3b0684..08a03261 100755
> --- a/tests/xfs/490
> +++ b/tests/xfs/490
> @@ -37,7 +37,7 @@ filter_dmesg()
>  # If enable free inode B+tree, this case will fail on xfs_dialloc_ag_update_inobt,
>  # that's not what we want to test. Due to finobt feature is not necessary for this
>  # test, so disable it directly.
> -_scratch_mkfs_xfs -m finobt=0 | _filter_mkfs 2>$tmp.mkfs >> $seqres.full
> +_scratch_mkfs_xfs -m finobt=0 | _xfs_filter_mkfs 2>$tmp.mkfs >> $seqres.full
>  
>  # On V5 filesystem, this case can't trigger bug because it doesn't read inodes
>  # we are allocating from disk - it simply overwrites them with new inode
> diff --git a/tests/xfs/502 b/tests/xfs/502
> index fb9a82c1..464326cc 100755
> --- a/tests/xfs/502
> +++ b/tests/xfs/502
> @@ -25,7 +25,7 @@ _require_xfs_io_error_injection "iunlink_fallback"
>  _require_scratch
>  _require_test_program "t_open_tmpfiles"
>  
> -_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
> +_scratch_mkfs | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
>  cat $tmp.mkfs >> $seqres.full
>  . $tmp.mkfs
>  
> diff --git a/tests/xfs/513 b/tests/xfs/513
> index bfdfd4f6..a13f0a03 100755
> --- a/tests/xfs/513
> +++ b/tests/xfs/513
> @@ -68,7 +68,7 @@ MKFS_OPTIONS=""
>  do_mkfs()
>  {
>  	echo "FORMAT: $@" | filter_loop | tee -a $seqres.full
> -	$MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >>$seqres.full 2>$tmp.mkfs
> +	$MKFS_XFS_PROG -f $* $LOOP_DEV | _xfs_filter_mkfs >>$seqres.full 2>$tmp.mkfs
>  	if [ "${PIPESTATUS[0]}" -ne 0 ]; then
>  		_fail "Fails on _mkfs_dev $* $LOOP_DEV"
>  	fi
> diff --git a/tests/xfs/530 b/tests/xfs/530
> index 9c6f44d7..925a7b49 100755
> --- a/tests/xfs/530
> +++ b/tests/xfs/530
> @@ -38,7 +38,7 @@ _require_scratch_nocheck
>  
>  echo "* Test extending rt inodes"
>  
> -_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> +_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
>  . $tmp.mkfs
>  
>  echo "Create fake rt volume"
> diff --git a/tests/xfs/533 b/tests/xfs/533
> index b85b5298..c7d470c9 100755
> --- a/tests/xfs/533
> +++ b/tests/xfs/533
> @@ -23,7 +23,7 @@ _require_test_program "punch-alternating"
>  _require_xfs_io_error_injection "reduce_max_iextents"
>  _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
>  
> -_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> +_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
>  . $tmp.mkfs
>  
>  # Filesystems with directory block size greater than one FSB will not be tested,
> -- 
> 2.34.1
> 

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

* Re: [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs
  2022-02-09  0:43   ` Darrick J. Wong
@ 2022-02-09  0:53     ` Darrick J. Wong
  2022-02-09  8:18       ` Shinichiro Kawasaki
  0 siblings, 1 reply; 16+ messages in thread
From: Darrick J. Wong @ 2022-02-09  0:53 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki
  Cc: fstests, linux-btrfs, linux-xfs, linux-ext4, Naohiro Aota,
	Johannes Thumshirn, Damien Le Moal

On Tue, Feb 08, 2022 at 04:43:16PM -0800, Darrick J. Wong wrote:
> On Mon, Feb 07, 2022 at 03:55:39PM +0900, Shin'ichiro Kawasaki wrote:
> > The helper function works only for xfs and used only for xfs except
> > generic/204. Rename the function to clearly indicate that the function
> > is only for xfs.
> > 
> > Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> 
> <snip the diffstat>
> 
> > diff --git a/common/attr b/common/attr
> > index 35682d7c..964c790a 100644
> > --- a/common/attr
> > +++ b/common/attr
> > @@ -13,7 +13,7 @@ _acl_get_max()
> >  		# CRC format filesystems have much larger ACL counts. The actual
> >  		# number is into the thousands, but testing that meany takes too
> >  		# long, so just test well past the old limit of 25.
> > -		$XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
> > +		$XFS_INFO_PROG $TEST_DIR | _xfs_filter_mkfs > /dev/null 2> $tmp.info
> >  		. $tmp.info
> >  		rm $tmp.info
> >  		if [ $_fs_has_crcs -eq 0 ]; then
> > diff --git a/common/filter b/common/filter
> > index c3db7a56..24fd0650 100644
> > --- a/common/filter
> > +++ b/common/filter
> > @@ -117,7 +117,7 @@ _filter_date()
> >  
> >  # prints filtered output on stdout, values (use eval) on stderr
> >  # Non XFS filesystems always return a 4k block size and a 256 byte inode.
> > -_filter_mkfs()
> > +_xfs_filter_mkfs()
> >  {
> >      case $FSTYP in
> >      xfs)
> > diff --git a/common/xfs b/common/xfs
> 
> This renames the generic function to be "only for xfs" but it leaves the
> non-XFS bits.  Those bits are /really/ problematic (hardcoded
> isize=256 and dbsize=4096?  Seriously??) and themselves were introduced
> in commit a4d5b247 ("xfstests: Make 204 work with different block and
> inode sizes.") oh wow.
> 
> I'm sorry that someone left this a mess, but let's try to make it easy
> to clean up all the other filesystems, please.  Specifically, could you
> please:
> 
> 1. Hoist the XFS-specific code from _filter_mkfs into a new
>    helper _xfs_filter_mkfs() in common/xfs?

UGH.  I pressed <Send>, not <Save>.  Picking up from where I left off:

2. Make the generic _filter_mkfs function call the XFS-specific one,
ala:

_filter_mkfs()
{
    case $FSTYP in
    xfs)
	_xfs_filter_mkfs "$@"
	;;
    *)
	cat - >/dev/null
	perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
	return ;;
    esac
}

This way you don't have to make a gigantic treewide change, and we can
start to make this function work properly for filesystems that have the
ability to do an offline geometry dump (aka dumpe2fs for ext*).

As for calling mkfs twice in generic/204... I'll address that in my
reply to the last patch.

--D

> --D
> 
> > index 713e9fe7..3435c706 100644
> > --- a/common/xfs
> > +++ b/common/xfs
> > @@ -832,7 +832,7 @@ _require_scratch_xfs_shrink()
> >  	_require_scratch
> >  	_require_command "$XFS_GROWFS_PROG" xfs_growfs
> >  
> > -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  	. $tmp.mkfs
> >  	_scratch_mount
> >  	# here just to check if kernel supports, no need do more extra work
> > diff --git a/tests/generic/204 b/tests/generic/204
> > index b5deb443..40d524d1 100755
> > --- a/tests/generic/204
> > +++ b/tests/generic/204
> > @@ -25,7 +25,7 @@ _supported_fs generic
> >  _require_scratch
> >  
> >  # get the block size first
> > -_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
> > +_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
> >  . $tmp.mkfs
> >  
> >  # For xfs, we need to handle the different default log sizes that different
> > @@ -37,7 +37,7 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
> >  SIZE=`expr 115 \* 1024 \* 1024`
> >  _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
> >  	|| _fail "mkfs failed"
> > -cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
> > +cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
> >  _scratch_mount
> >  
> >  # Source $tmp.mkfs to get geometry
> > diff --git a/tests/xfs/004 b/tests/xfs/004
> > index f18316b3..5e83fff9 100755
> > --- a/tests/xfs/004
> > +++ b/tests/xfs/004
> > @@ -21,7 +21,7 @@ _cleanup()
> >  _populate_scratch()
> >  {
> >  	echo "=== mkfs output ===" >>$seqres.full
> > -	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
> > +	_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
> >  	. $tmp.mkfs
> >  	_scratch_mount
> >  	# This test looks at specific behaviors of the xfs_db freesp command,
> > diff --git a/tests/xfs/007 b/tests/xfs/007
> > index 4f864100..33a857e8 100755
> > --- a/tests/xfs/007
> > +++ b/tests/xfs/007
> > @@ -19,7 +19,7 @@ _supported_fs xfs
> >  _require_scratch
> >  _require_xfs_quota
> >  
> > -_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
> >  . $tmp.mkfs
> >  
> >  do_test()
> > diff --git a/tests/xfs/010 b/tests/xfs/010
> > index 16c08b85..badac7c0 100755
> > --- a/tests/xfs/010
> > +++ b/tests/xfs/010
> > @@ -87,7 +87,7 @@ _require_scratch
> >  _require_xfs_mkfs_finobt
> >  _require_xfs_finobt
> >  
> > -_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
> > +_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _xfs_filter_mkfs 2>$seqres.full
> >  
> >  # sparsely populate the fs such that we create records with free inodes
> >  _scratch_mount
> > diff --git a/tests/xfs/013 b/tests/xfs/013
> > index 2d005753..dc39ffd6 100755
> > --- a/tests/xfs/013
> > +++ b/tests/xfs/013
> > @@ -89,7 +89,7 @@ _require_xfs_finobt
> >  _require_command "$KILLALL_PROG" killall
> >  
> >  _scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
> > -	_filter_mkfs 2>> $seqres.full
> > +	_xfs_filter_mkfs 2>> $seqres.full
> >  _scratch_mount
> >  
> >  COUNT=20000	# number of files per directory
> > diff --git a/tests/xfs/015 b/tests/xfs/015
> > index 2bb7b8d5..72842b38 100755
> > --- a/tests/xfs/015
> > +++ b/tests/xfs/015
> > @@ -44,7 +44,7 @@ _require_fs_space $SCRATCH_MNT 131072
> >  _scratch_unmount
> >  
> >  _scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
> > -cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
> > +cat $tmp.mkfs.raw | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
> >  # get original data blocks number and agcount
> >  . $tmp.mkfs
> >  _scratch_mount
> > diff --git a/tests/xfs/016 b/tests/xfs/016
> > index 6337bb1f..e8094476 100755
> > --- a/tests/xfs/016
> > +++ b/tests/xfs/016
> > @@ -66,7 +66,7 @@ _init()
> >      _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
> >      [ $? -ne 0 ] && \
> >          _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
> > -    _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
> > +    _xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
> >      . $tmp.mkfs
> >      [ $logsunit -ne 0 ] && \
> >          _notrun "Cannot run this test using log MKFS_OPTIONS specified"
> > diff --git a/tests/xfs/029 b/tests/xfs/029
> > index 6e8aa4db..a3fb9cfc 100755
> > --- a/tests/xfs/029
> > +++ b/tests/xfs/029
> > @@ -36,7 +36,7 @@ _supported_fs xfs
> >  _require_scratch
> >  
> >  echo
> > -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
> >  
> >  echo
> >  _scratch_xfs_logprint | filter_logprint
> > diff --git a/tests/xfs/030 b/tests/xfs/030
> > index 201a9015..62066d06 100755
> > --- a/tests/xfs/030
> > +++ b/tests/xfs/030
> > @@ -83,7 +83,7 @@ $here/src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
> >  
> >  # now kick off the real repair test...
> >  #
> > -_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs $DSIZE | _xfs_filter_mkfs 2>$tmp.mkfs
> >  . $tmp.mkfs
> >  _check_ag 0
> >  _check_ag -1
> > diff --git a/tests/xfs/031 b/tests/xfs/031
> > index 6e3813da..e6bbc0d4 100755
> > --- a/tests/xfs/031
> > +++ b/tests/xfs/031
> > @@ -82,20 +82,20 @@ echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
> >  _create_proto 0
> >  echo "=== one entry (shortform)"
> >  _scratch_mkfs_xfs -p $tmp.proto >$tmp.mkfs0 2>&1
> > -_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
> > +_xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
> >  . $tmp.mkfs
> >  _check_repair
> >  
> >  # block-form root directory & repeat
> >  _create_proto 20
> >  echo "=== twenty entries (block form)"
> > -_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
> > +_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
> >  _check_repair
> >  
> >  # leaf-form root directory & repeat
> >  _create_proto 1000
> >  echo "=== thousand entries (leaf form)"
> > -_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
> > +_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
> >  _check_repair
> >  
> >  # success, all done
> > diff --git a/tests/xfs/033 b/tests/xfs/033
> > index d47da0d6..61ae4004 100755
> > --- a/tests/xfs/033
> > +++ b/tests/xfs/033
> > @@ -55,10 +55,10 @@ _require_scratch
> >  _require_no_large_scratch_dev
> >  
> >  # devzero blows away 512byte blocks, so make 512byte inodes (at least)
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  if [ $isize -lt 512 ]; then
> > -	_scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +	_scratch_mkfs_xfs -isize=512 | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  	. $tmp.mkfs
> >  fi
> >  
> > diff --git a/tests/xfs/041 b/tests/xfs/041
> > index 05de5578..135ed410 100755
> > --- a/tests/xfs/041
> > +++ b/tests/xfs/041
> > @@ -41,7 +41,7 @@ _do_die_on_error=message_only
> >  agsize=32
> >  echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
> >  _scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
> > -bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \
> > +bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _xfs_filter_mkfs 2>&1 \
> >  		| perl -ne 'if (/dbsize=(\d+)/) {print $1;}'`
> >  onemeginblocks=`expr 1048576 / $bsize`
> >  _scratch_mount
> > diff --git a/tests/xfs/044 b/tests/xfs/044
> > index e66c0cb3..8ffd2af4 100755
> > --- a/tests/xfs/044
> > +++ b/tests/xfs/044
> > @@ -79,7 +79,7 @@ lsize=16777216
> >  _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
> >  [ $? -ne 0 ] && \
> >      _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
> > -_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
> > +_xfs_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
> >  . $tmp.mkfs1
> >  [ $lversion -ne 1 ] && \
> >      _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
> > diff --git a/tests/xfs/050 b/tests/xfs/050
> > index 1847611b..3556c85e 100755
> > --- a/tests/xfs/050
> > +++ b/tests/xfs/050
> > @@ -65,7 +65,7 @@ _filter_and_check_blks()
> >  
> >  _exercise()
> >  {
> > -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  	cat $tmp.mkfs >>$seqres.full
> >  
> >  	# keep the blocksize and data size for dd later
> > diff --git a/tests/xfs/052 b/tests/xfs/052
> > index 75761022..e4c7ee6c 100755
> > --- a/tests/xfs/052
> > +++ b/tests/xfs/052
> > @@ -34,7 +34,7 @@ _require_nobody
> >  # setup a default run
> >  _qmount_option uquota
> >  
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  cat $tmp.mkfs >>$seqres.full
> >  chmod a+w $seqres.full     # arbitrary users will write here
> >  
> > diff --git a/tests/xfs/058 b/tests/xfs/058
> > index 8751a7ac..0f87ec3c 100755
> > --- a/tests/xfs/058
> > +++ b/tests/xfs/058
> > @@ -22,7 +22,7 @@ _require_xfs_db_command "fuzz"
> >  rm -f "$seqres.full"
> >  
> >  echo "Format"
> > -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
> > +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
> >  source $tmp.mkfs
> >  
> >  do_xfs_db()
> > diff --git a/tests/xfs/067 b/tests/xfs/067
> > index 3dc381bb..c733d761 100755
> > --- a/tests/xfs/067
> > +++ b/tests/xfs/067
> > @@ -22,7 +22,7 @@ _require_scratch
> >  
> >  # set up fs for 1K inodes
> >  isize=0
> > -_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
> >  [ $? -eq 0 ] && source $tmp.mkfs
> >  if [ "$isize" -lt 1024 ]; then
> >      _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
> > diff --git a/tests/xfs/070 b/tests/xfs/070
> > index 43ca7f84..9db518d7 100755
> > --- a/tests/xfs/070
> > +++ b/tests/xfs/070
> > @@ -76,7 +76,7 @@ _supported_fs xfs
> >  _require_scratch_nocheck
> >  _require_command "$KILLALL_PROG" killall
> >  
> > -_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
> > +_scratch_mkfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
> >  test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
> >  
> >  . $tmp.mkfs # import agcount
> > diff --git a/tests/xfs/071 b/tests/xfs/071
> > index 8373878a..9b425d9f 100755
> > --- a/tests/xfs/071
> > +++ b/tests/xfs/071
> > @@ -81,7 +81,7 @@ _supported_fs xfs
> >  [ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
> >  
> >  _require_scratch
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  . $tmp.mkfs
> >  echo
> >  _scratch_mount
> > diff --git a/tests/xfs/073 b/tests/xfs/073
> > index c7616b9e..d1b97313 100755
> > --- a/tests/xfs/073
> > +++ b/tests/xfs/073
> > @@ -131,7 +131,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
> >  echo 
> >  echo === copying scratch device to single target, large ro device
> >  ${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g \
> > -	| _filter_mkfs 2>/dev/null
> > +	| _xfs_filter_mkfs 2>/dev/null
> >  rmdir $imgs.source_dir 2>/dev/null
> >  mkdir $imgs.source_dir
> >  
> > diff --git a/tests/xfs/076 b/tests/xfs/076
> > index eac7410e..3cdde79e 100755
> > --- a/tests/xfs/076
> > +++ b/tests/xfs/076
> > @@ -61,7 +61,7 @@ _require_xfs_io_command "fpunch"
> >  _require_xfs_sparse_inodes
> >  
> >  _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
> > -	_filter_mkfs > /dev/null 2> $tmp.mkfs
> > +	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
> >  . $tmp.mkfs	# for isize
> >  
> >  _scratch_mount
> > diff --git a/tests/xfs/078 b/tests/xfs/078
> > index 1f475c96..a3b75fa6 100755
> > --- a/tests/xfs/078
> > +++ b/tests/xfs/078
> > @@ -74,7 +74,7 @@ _grow_loop()
> >  		mkfs_crc_opts="-m crc=0"
> >  	fi
> >  	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
> > -		| _filter_mkfs 2>/dev/null
> > +		| _xfs_filter_mkfs 2>/dev/null
> >  
> >  	echo "*** extend loop file"
> >  	_destroy_loop_device $LOOP_DEV
> > diff --git a/tests/xfs/092 b/tests/xfs/092
> > index 015149e2..7e7b31fc 100755
> > --- a/tests/xfs/092
> > +++ b/tests/xfs/092
> > @@ -20,7 +20,7 @@ _require_scratch
> >  _require_no_large_scratch_dev
> >  
> >  MOUNT_OPTIONS="$MOUNT_OPTIONS -o inode64"
> > -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
> >  echo Silence is golden
> >  
> >  _try_scratch_mount
> > diff --git a/tests/xfs/104 b/tests/xfs/104
> > index d16f46d8..c21bd4e0 100755
> > --- a/tests/xfs/104
> > +++ b/tests/xfs/104
> > @@ -15,7 +15,7 @@ _begin_fstest growfs ioctl prealloc auto stress
> >  _create_scratch()
> >  {
> >  	echo "*** mkfs"
> > -	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
> > +	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
> >  	. $tmp.mkfs
> >  
> >  	echo "*** mount"
> > @@ -50,7 +50,7 @@ _supported_fs xfs
> >  _require_scratch
> >  _require_xfs_io_command "falloc"
> >  
> > -_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
> >  . $tmp.mkfs	# extract blocksize and data size for scratch device
> >  
> >  endsize=`expr 550 \* 1048576`	# stop after growing this big
> > @@ -89,7 +89,7 @@ while [ $size -le $endsize ]; do
> >  	echo "*** growing filesystem"
> >  	echo "*** growing to a ${sizeb} block filesystem" >> $seqres.full
> >  	xfs_growfs -D ${sizeb} $SCRATCH_MNT \
> > -		| tee -a $seqres.full | _filter_mkfs 2>$tmp.growfs
> > +		| tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.growfs
> >  	. $tmp.growfs
> >  	[ `expr $size % $modsize` -eq 0 ] && wait	# every 4th iteration
> >  	echo AGCOUNT=$agcount | tee -a $seqres.full
> > diff --git a/tests/xfs/108 b/tests/xfs/108
> > index 46070005..985b989b 100755
> > --- a/tests/xfs/108
> > +++ b/tests/xfs/108
> > @@ -62,7 +62,7 @@ _require_prjquota $SCRATCH_DEV
> >  # real QA test starts here
> >  rm -f $tmp.projects $seqres.full
> >  _scratch_unmount 2>/dev/null
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  cat $tmp.mkfs >>$seqres.full
> >  _scratch_mount
> >  
> > diff --git a/tests/xfs/109 b/tests/xfs/109
> > index 6cb6917a..e29d4795 100755
> > --- a/tests/xfs/109
> > +++ b/tests/xfs/109
> > @@ -78,7 +78,7 @@ if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
> >  fi
> >  _scratch_unmount
> >  
> > -_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _xfs_filter_mkfs 2>$tmp.mkfs
> >  cat $tmp.mkfs >>$seqres.full
> >  _scratch_mount
> >  
> > diff --git a/tests/xfs/110 b/tests/xfs/110
> > index 596057ef..734d2869 100755
> > --- a/tests/xfs/110
> > +++ b/tests/xfs/110
> > @@ -18,7 +18,7 @@ _require_scratch
> >  
> >  # real QA test starts here
> >  _scratch_unmount 2>/dev/null
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  
> >  STR1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
> >  STR2=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
> > diff --git a/tests/xfs/111 b/tests/xfs/111
> > index ede28aee..ed5a54c5 100755
> > --- a/tests/xfs/111
> > +++ b/tests/xfs/111
> > @@ -22,7 +22,7 @@ _require_scratch
> >  _scratch_unmount 2>/dev/null
> >  MKFS_OPTIONS="-bsize=4096"
> >  MOUNT_OPTIONS="-o noatime"
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  _scratch_mount
> >  
> >  echo Create some files
> > diff --git a/tests/xfs/144 b/tests/xfs/144
> > index 5abec9ae..d46eb1e2 100755
> > --- a/tests/xfs/144
> > +++ b/tests/xfs/144
> > @@ -24,7 +24,7 @@ _require_xfs_quota
> >  _require_scratch
> >  
> >  exercise() {
> > -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  	cat $tmp.mkfs >>$seqres.full
> >  
> >  	# keep the blocksize and data size for dd later
> > diff --git a/tests/xfs/153 b/tests/xfs/153
> > index 37303701..d410cbed 100755
> > --- a/tests/xfs/153
> > +++ b/tests/xfs/153
> > @@ -70,7 +70,7 @@ _filter_and_check_blks()
> >  
> >  run_tests()
> >  {
> > -	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  	cat $tmp.mkfs >>$seqres.full
> >  
> >  	# keep the blocksize and data size for dd later
> > diff --git a/tests/xfs/163 b/tests/xfs/163
> > index 9f6dbeb8..79f420fa 100755
> > --- a/tests/xfs/163
> > +++ b/tests/xfs/163
> > @@ -24,7 +24,7 @@ test_shrink()
> >  	_check_scratch_fs
> >  	_scratch_mount
> >  
> > -	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
> > +	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
> >  	. $tmp.growfs
> >  	[ $ret -eq 0 -a $1 -eq $dblocks ]
> >  }
> > @@ -38,7 +38,7 @@ echo "Format and mount"
> >  # agcount = 1 is forbidden on purpose, and need to ensure shrinking to
> >  # 2 AGs isn't feasible yet. So agcount = 3 is the minimum number now.
> >  _scratch_mkfs -dsize="$((512 * 1024 * 1024))" -dagcount=3 2>&1 | \
> > -	tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +	tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  t_dblocks=$dblocks
> >  _scratch_mount >> $seqres.full
> > diff --git a/tests/xfs/168 b/tests/xfs/168
> > index ffcd0df8..6b3eee30 100755
> > --- a/tests/xfs/168
> > +++ b/tests/xfs/168
> > @@ -19,7 +19,7 @@ _begin_fstest auto growfs shrinkfs ioctl prealloc stress
> >  create_scratch()
> >  {
> >  	_scratch_mkfs_xfs $@ | tee -a $seqres.full | \
> > -		_filter_mkfs 2>$tmp.mkfs >/dev/null
> > +		_xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  	. $tmp.mkfs
> >  
> >  	_scratch_mount
> > @@ -48,7 +48,7 @@ _supported_fs xfs
> >  _require_scratch_xfs_shrink
> >  _require_xfs_io_command "falloc"
> >  
> > -_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs	# extract blocksize and data size for scratch device
> >  
> >  endsize=`expr 125 \* 1048576`	# stop after shrinking this big
> > @@ -93,7 +93,7 @@ while [ $totalcount -gt 0 ]; do
> >  		[ $decb -eq 0 ] && break
> >  
> >  		# get latest dblocks
> > -		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
> > +		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
> >  		. $tmp.growfs
> >  
> >  		size=`expr $dblocks \* $dbsize`
> > diff --git a/tests/xfs/176 b/tests/xfs/176
> > index ba4aae59..57e11fd7 100755
> > --- a/tests/xfs/176
> > +++ b/tests/xfs/176
> > @@ -24,7 +24,7 @@ _require_xfs_io_command "falloc"
> >  _require_xfs_io_command "fpunch"
> >  
> >  _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
> > -	_filter_mkfs > /dev/null 2> $tmp.mkfs
> > +	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
> >  . $tmp.mkfs	# for isize
> >  cat $tmp.mkfs >> $seqres.full
> >  
> > diff --git a/tests/xfs/178 b/tests/xfs/178
> > index a65197cd..5392b9bb 100755
> > --- a/tests/xfs/178
> > +++ b/tests/xfs/178
> > @@ -45,7 +45,7 @@ _supported_fs xfs
> >  #             fix filesystem, new mkfs.xfs will be fine.
> >  
> >  _require_scratch
> > -_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
> >  test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!"
> >  
> >  # By executing the followint tmp file, will get on the mkfs options stored in
> > diff --git a/tests/xfs/186 b/tests/xfs/186
> > index b54fcf26..8a2a6995 100755
> > --- a/tests/xfs/186
> > +++ b/tests/xfs/186
> > @@ -124,7 +124,7 @@ _require_scratch
> >  _require_attrs
> >  _require_attr_v1
> >  
> > -_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _filter_mkfs \
> > +_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _xfs_filter_mkfs \
> >  	>>$seqres.full 2>$tmp.mkfs
> >  # import crc status and attr version
> >  . $tmp.mkfs
> > diff --git a/tests/xfs/189 b/tests/xfs/189
> > index e601881a..437243c7 100755
> > --- a/tests/xfs/189
> > +++ b/tests/xfs/189
> > @@ -231,7 +231,7 @@ _require_noattr2
> >  unset SCRATCH_RTDEV
> >  unset SCRATCH_LOGDEV
> >  
> > -_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
> > +_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
> >  
> >  _add_scratch_fstab
> >  _test_remount_rw
> > diff --git a/tests/xfs/250 b/tests/xfs/250
> > index 8af32711..573340bb 100755
> > --- a/tests/xfs/250
> > +++ b/tests/xfs/250
> > @@ -54,7 +54,7 @@ _test_loop()
> >  
> >  	echo "*** mkfs loop file (size=$size)"
> >  	$MKFS_XFS_PROG -d $dparam \
> > -		| _filter_mkfs 2>/dev/null
> > +		| _xfs_filter_mkfs 2>/dev/null
> >  
> >  	echo "*** mount loop filesystem"
> >  	mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
> > diff --git a/tests/xfs/259 b/tests/xfs/259
> > index 88e2f3ee..7c062c7d 100755
> > --- a/tests/xfs/259
> > +++ b/tests/xfs/259
> > @@ -49,7 +49,7 @@ for del in $sizes_to_check; do
> >  			>/dev/null 2>&1 || echo "dd failed"
> >  		lofile=$(losetup -f)
> >  		losetup $lofile "$testfile"
> > -		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _filter_mkfs \
> > +		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _xfs_filter_mkfs \
> >  			>/dev/null 2> $tmp.mkfs || echo "mkfs failed!"
> >  		. $tmp.mkfs
> >  		sync
> > diff --git a/tests/xfs/276 b/tests/xfs/276
> > index 8cc48675..6774b819 100755
> > --- a/tests/xfs/276
> > +++ b/tests/xfs/276
> > @@ -29,7 +29,7 @@ _require_test_program "punch-alternating"
> >  rm -f "$seqres.full"
> >  
> >  echo "Format and mount"
> > -_scratch_mkfs | _filter_mkfs 2> "$tmp.mkfs" >/dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2> "$tmp.mkfs" >/dev/null
> >  . $tmp.mkfs
> >  cat "$tmp.mkfs" > $seqres.full
> >  _scratch_mount
> > diff --git a/tests/xfs/279 b/tests/xfs/279
> > index 835d187f..64563237 100755
> > --- a/tests/xfs/279
> > +++ b/tests/xfs/279
> > @@ -44,7 +44,7 @@ _check_mkfs()
> >  		return
> >  	fi
> >  	echo "Passed."
> > -	cat $tmp.mkfs.full | _filter_mkfs >> $seqres.full 2>$tmp.mkfs
> > +	cat $tmp.mkfs.full | _xfs_filter_mkfs >> $seqres.full 2>$tmp.mkfs
> >  	. $tmp.mkfs
> >  	echo "Got sector size: $sectsz"
> >  	device=`echo $@ | awk '{print $NF}'`
> > diff --git a/tests/xfs/288 b/tests/xfs/288
> > index e3d230e9..ec12d0d1 100755
> > --- a/tests/xfs/288
> > +++ b/tests/xfs/288
> > @@ -20,7 +20,7 @@ _require_scratch
> >  _require_attrs
> >  
> >  # get block size ($dbsize) from the mkfs output
> > -_scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs_xfs 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  
> >  _scratch_mount
> > diff --git a/tests/xfs/292 b/tests/xfs/292
> > index cf501571..930504ca 100755
> > --- a/tests/xfs/292
> > +++ b/tests/xfs/292
> > @@ -25,12 +25,12 @@ rm -f $fsfile
> >  $XFS_IO_PROG -f -c "truncate 256g" $fsfile
> >  
> >  echo "mkfs.xfs without geometry"
> > -mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> > +mkfs.xfs -f $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
> >  grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
> >      sed -e "s:$fsfile:FILENAME:g"
> >  
> >  echo "mkfs.xfs with cmdline geometry"
> > -mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
> > +mkfs.xfs -f -d su=16k,sw=5 $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
> >  grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
> >      sed -e "s:$fsfile:FILENAME:g"
> >  
> > diff --git a/tests/xfs/299 b/tests/xfs/299
> > index a3077b0c..e6da413a 100755
> > --- a/tests/xfs/299
> > +++ b/tests/xfs/299
> > @@ -147,7 +147,7 @@ _exercise()
> >  
> >  }
> >  
> > -_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
> >  cat $tmp.mkfs >>$seqres.full
> >  # keep the blocksize and data size for dd later
> >  . $tmp.mkfs
> > @@ -184,7 +184,7 @@ _exercise u
> >  echo "*** unmount"
> >  _scratch_unmount
> >  
> > -_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
> > +_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
> >  cat $tmp.mkfs >>$seqres.full
> >  # keep the blocksize and data size for dd later
> >  . $tmp.mkfs
> > diff --git a/tests/xfs/335 b/tests/xfs/335
> > index ccc508e7..c2bb1bde 100755
> > --- a/tests/xfs/335
> > +++ b/tests/xfs/335
> > @@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
> >  rm -f "$seqres.full"
> >  
> >  echo "Format and mount"
> > -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  cat $tmp.mkfs > "$seqres.full" 2>&1
> >  _scratch_mount
> > diff --git a/tests/xfs/336 b/tests/xfs/336
> > index 279830b5..19ed8cc6 100755
> > --- a/tests/xfs/336
> > +++ b/tests/xfs/336
> > @@ -29,7 +29,7 @@ _require_xfs_io_command "falloc"
> >  rm -f "$seqres.full"
> >  
> >  echo "Format and mount"
> > -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  cat $tmp.mkfs > "$seqres.full" 2>&1
> >  _scratch_mount
> > diff --git a/tests/xfs/337 b/tests/xfs/337
> > index a2515e36..ca476e28 100755
> > --- a/tests/xfs/337
> > +++ b/tests/xfs/337
> > @@ -23,7 +23,7 @@ _disable_dmesg_check
> >  rm -f "$seqres.full"
> >  
> >  echo "+ create scratch fs"
> > -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  cat $tmp.mkfs > "$seqres.full" 2>&1
> >  
> > diff --git a/tests/xfs/341 b/tests/xfs/341
> > index f026aa37..dad1e0af 100755
> > --- a/tests/xfs/341
> > +++ b/tests/xfs/341
> > @@ -23,7 +23,7 @@ _require_xfs_io_command "falloc"
> >  rm -f "$seqres.full"
> >  
> >  echo "Format and mount"
> > -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  cat $tmp.mkfs > "$seqres.full" 2>&1
> >  _scratch_mount
> > diff --git a/tests/xfs/342 b/tests/xfs/342
> > index 1ae414eb..0922b3fe 100755
> > --- a/tests/xfs/342
> > +++ b/tests/xfs/342
> > @@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
> >  rm -f "$seqres.full"
> >  
> >  echo "Format and mount"
> > -_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
> >  . $tmp.mkfs
> >  cat $tmp.mkfs > "$seqres.full" 2>&1
> >  _scratch_mount
> > diff --git a/tests/xfs/443 b/tests/xfs/443
> > index f2390bf3..a236c8f8 100755
> > --- a/tests/xfs/443
> > +++ b/tests/xfs/443
> > @@ -31,7 +31,7 @@ _require_xfs_io_command "falloc"
> >  _require_xfs_io_command "fpunch"
> >  _require_xfs_io_command "swapext"
> >  
> > -_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> > +_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
> >  _scratch_mount
> >  
> >  # get fs block size
> > diff --git a/tests/xfs/448 b/tests/xfs/448
> > index 815f56cb..3cd56d4d 100755
> > --- a/tests/xfs/448
> > +++ b/tests/xfs/448
> > @@ -34,7 +34,7 @@ _require_no_xfs_bug_on_assert
> >  rm -f "$seqres.full"
> >  
> >  # Format and mount
> > -_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs
> > +_scratch_mkfs | _xfs_filter_mkfs > $seqres.full 2> $tmp.mkfs
> >  test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
> >  _scratch_mount
> >  
> > diff --git a/tests/xfs/490 b/tests/xfs/490
> > index 8c3b0684..08a03261 100755
> > --- a/tests/xfs/490
> > +++ b/tests/xfs/490
> > @@ -37,7 +37,7 @@ filter_dmesg()
> >  # If enable free inode B+tree, this case will fail on xfs_dialloc_ag_update_inobt,
> >  # that's not what we want to test. Due to finobt feature is not necessary for this
> >  # test, so disable it directly.
> > -_scratch_mkfs_xfs -m finobt=0 | _filter_mkfs 2>$tmp.mkfs >> $seqres.full
> > +_scratch_mkfs_xfs -m finobt=0 | _xfs_filter_mkfs 2>$tmp.mkfs >> $seqres.full
> >  
> >  # On V5 filesystem, this case can't trigger bug because it doesn't read inodes
> >  # we are allocating from disk - it simply overwrites them with new inode
> > diff --git a/tests/xfs/502 b/tests/xfs/502
> > index fb9a82c1..464326cc 100755
> > --- a/tests/xfs/502
> > +++ b/tests/xfs/502
> > @@ -25,7 +25,7 @@ _require_xfs_io_error_injection "iunlink_fallback"
> >  _require_scratch
> >  _require_test_program "t_open_tmpfiles"
> >  
> > -_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
> > +_scratch_mkfs | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
> >  cat $tmp.mkfs >> $seqres.full
> >  . $tmp.mkfs
> >  
> > diff --git a/tests/xfs/513 b/tests/xfs/513
> > index bfdfd4f6..a13f0a03 100755
> > --- a/tests/xfs/513
> > +++ b/tests/xfs/513
> > @@ -68,7 +68,7 @@ MKFS_OPTIONS=""
> >  do_mkfs()
> >  {
> >  	echo "FORMAT: $@" | filter_loop | tee -a $seqres.full
> > -	$MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >>$seqres.full 2>$tmp.mkfs
> > +	$MKFS_XFS_PROG -f $* $LOOP_DEV | _xfs_filter_mkfs >>$seqres.full 2>$tmp.mkfs
> >  	if [ "${PIPESTATUS[0]}" -ne 0 ]; then
> >  		_fail "Fails on _mkfs_dev $* $LOOP_DEV"
> >  	fi
> > diff --git a/tests/xfs/530 b/tests/xfs/530
> > index 9c6f44d7..925a7b49 100755
> > --- a/tests/xfs/530
> > +++ b/tests/xfs/530
> > @@ -38,7 +38,7 @@ _require_scratch_nocheck
> >  
> >  echo "* Test extending rt inodes"
> >  
> > -_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> > +_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
> >  . $tmp.mkfs
> >  
> >  echo "Create fake rt volume"
> > diff --git a/tests/xfs/533 b/tests/xfs/533
> > index b85b5298..c7d470c9 100755
> > --- a/tests/xfs/533
> > +++ b/tests/xfs/533
> > @@ -23,7 +23,7 @@ _require_test_program "punch-alternating"
> >  _require_xfs_io_error_injection "reduce_max_iextents"
> >  _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
> >  
> > -_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
> > +_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
> >  . $tmp.mkfs
> >  
> >  # Filesystems with directory block size greater than one FSB will not be tested,
> > -- 
> > 2.34.1
> > 

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

* Re: [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code
  2022-02-09  0:35   ` Darrick J. Wong
@ 2022-02-09  8:09     ` Shinichiro Kawasaki
  0 siblings, 0 replies; 16+ messages in thread
From: Shinichiro Kawasaki @ 2022-02-09  8:09 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: fstests, linux-btrfs, linux-xfs, linux-ext4, Naohiro Aota,
	Johannes Thumshirn, Damien Le Moal

On Feb 08, 2022 / 16:35, Darrick J. Wong wrote:
> On Mon, Feb 07, 2022 at 03:55:36PM +0900, Shin'ichiro Kawasaki wrote:
> > The test cases generic/{171,172,173,174,204} call _scratch_mkfs before
> > _scratch_mkfs_sized, and they do not check return code of
> > _scratch_mkfs_sized. Even if _scratch_mkfs_sized failed, _scratch_mount
> > after it cannot detect the sized mkfs failure because _scratch_mkfs
> > already created a file system on the device. This results in unexpected
> > test condition of the test cases.
> > 
> > To avoid the unexpected test condition, check return code of
> > _scratch_mkfs_sized in the test cases.
> > 
> > Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> 
> Hm.  I wonder, are there other tests that employ this _scratch_mkfs ->
> scratch_mkfs_sized sequence and need patching?
> 
> $ git grep -l _scratch_mkfs_sized | while read f; do grep -q
> '_scratch_mkfs[[:space:]]' $f && echo $f; done
> common/encrypt
> common/rc
> tests/ext4/021
> tests/generic/171
> tests/generic/172
> tests/generic/173
> tests/generic/174
> tests/generic/204
> tests/generic/520
> tests/generic/525
> tests/xfs/015
> 
> generic/520 is a false positive, and you patched the rest.  OK, good.
> 
> I wonder if the maintainer will ask for the _scratch_mkfs_sized in the
> failure output, but as far as I'm concerned:
> 
> Reviewed-by: Darrick J. Wong <djwong@kernel.org>

Thank you for reviewing. As for g/204, I will remove _scratch_mkfs call as you
suggested in other e-mail. So, I think this error check addition is no longer
required for g/204, and will drop the g/204 hunk from this patch. I wonder if
I can add your Reviewed-by tag with this change, but to be strict, I plan not
to add the tag for v2 post.

-- 
Best Regards,
Shin'ichiro Kawasaki

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

* Re: [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs
  2022-02-09  0:53     ` Darrick J. Wong
@ 2022-02-09  8:18       ` Shinichiro Kawasaki
  0 siblings, 0 replies; 16+ messages in thread
From: Shinichiro Kawasaki @ 2022-02-09  8:18 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: fstests, linux-btrfs, linux-xfs, linux-ext4, Naohiro Aota,
	Johannes Thumshirn, Damien Le Moal

On Feb 08, 2022 / 16:53, Darrick J. Wong wrote:
> On Tue, Feb 08, 2022 at 04:43:16PM -0800, Darrick J. Wong wrote:
> > On Mon, Feb 07, 2022 at 03:55:39PM +0900, Shin'ichiro Kawasaki wrote:
> > > The helper function works only for xfs and used only for xfs except
> > > generic/204. Rename the function to clearly indicate that the function
> > > is only for xfs.
> > > 
> > > Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
> > > Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
> > 
> > <snip the diffstat>
> > 
> > > diff --git a/common/attr b/common/attr
> > > index 35682d7c..964c790a 100644
> > > --- a/common/attr
> > > +++ b/common/attr
> > > @@ -13,7 +13,7 @@ _acl_get_max()
> > >  		# CRC format filesystems have much larger ACL counts. The actual
> > >  		# number is into the thousands, but testing that meany takes too
> > >  		# long, so just test well past the old limit of 25.
> > > -		$XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
> > > +		$XFS_INFO_PROG $TEST_DIR | _xfs_filter_mkfs > /dev/null 2> $tmp.info
> > >  		. $tmp.info
> > >  		rm $tmp.info
> > >  		if [ $_fs_has_crcs -eq 0 ]; then
> > > diff --git a/common/filter b/common/filter
> > > index c3db7a56..24fd0650 100644
> > > --- a/common/filter
> > > +++ b/common/filter
> > > @@ -117,7 +117,7 @@ _filter_date()
> > >  
> > >  # prints filtered output on stdout, values (use eval) on stderr
> > >  # Non XFS filesystems always return a 4k block size and a 256 byte inode.
> > > -_filter_mkfs()
> > > +_xfs_filter_mkfs()
> > >  {
> > >      case $FSTYP in
> > >      xfs)
> > > diff --git a/common/xfs b/common/xfs
> > 
> > This renames the generic function to be "only for xfs" but it leaves the
> > non-XFS bits.  Those bits are /really/ problematic (hardcoded
> > isize=256 and dbsize=4096?  Seriously??) and themselves were introduced
> > in commit a4d5b247 ("xfstests: Make 204 work with different block and
> > inode sizes.") oh wow.
> > 
> > I'm sorry that someone left this a mess, but let's try to make it easy
> > to clean up all the other filesystems, please.  Specifically, could you
> > please:
> > 
> > 1. Hoist the XFS-specific code from _filter_mkfs into a new
> >    helper _xfs_filter_mkfs() in common/xfs?
> 
> UGH.  I pressed <Send>, not <Save>.  Picking up from where I left off:
> 
> 2. Make the generic _filter_mkfs function call the XFS-specific one,
> ala:
> 
> _filter_mkfs()
> {
>     case $FSTYP in
>     xfs)
> 	_xfs_filter_mkfs "$@"
> 	;;
>     *)
> 	cat - >/dev/null
> 	perl -e 'print STDERR "dbsize=4096\nisize=256\n"'
> 	return ;;
>     esac
> }
> 
> This way you don't have to make a gigantic treewide change, and we can
> start to make this function work properly for filesystems that have the
> ability to do an offline geometry dump (aka dumpe2fs for ext*).

Thank you for the comment. My thought was a rather negative one: I assumed that
_filter_mkfs would not support other filesystems than xfs. I will add a patch
in v2 series based on your suggestion above, expecting that _filter_mkfs will
support other filesystems in the future.

-- 
Best Regards,
Shin'ichiro Kawasaki

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

* [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs
  2022-02-07  3:09 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
@ 2022-02-07  3:09 ` Shin'ichiro Kawasaki
  0 siblings, 0 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-02-07  3:09 UTC (permalink / raw)
  To: fstests, linux-btrfs
  Cc: Naohiro Aota, Johannes Thumshirn, Damien Le Moal,
	Shin'ichiro Kawasaki

The helper function works only for xfs and used only for xfs except
generic/204. Rename the function to clearly indicate that the function
is only for xfs.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/attr       | 2 +-
 common/filter     | 2 +-
 common/xfs        | 2 +-
 tests/generic/204 | 4 ++--
 tests/xfs/004     | 2 +-
 tests/xfs/007     | 2 +-
 tests/xfs/010     | 2 +-
 tests/xfs/013     | 2 +-
 tests/xfs/015     | 2 +-
 tests/xfs/016     | 2 +-
 tests/xfs/029     | 2 +-
 tests/xfs/030     | 2 +-
 tests/xfs/031     | 6 +++---
 tests/xfs/033     | 4 ++--
 tests/xfs/041     | 2 +-
 tests/xfs/044     | 2 +-
 tests/xfs/050     | 2 +-
 tests/xfs/052     | 2 +-
 tests/xfs/058     | 2 +-
 tests/xfs/067     | 2 +-
 tests/xfs/070     | 2 +-
 tests/xfs/071     | 2 +-
 tests/xfs/073     | 2 +-
 tests/xfs/076     | 2 +-
 tests/xfs/078     | 2 +-
 tests/xfs/092     | 2 +-
 tests/xfs/104     | 6 +++---
 tests/xfs/108     | 2 +-
 tests/xfs/109     | 2 +-
 tests/xfs/110     | 2 +-
 tests/xfs/111     | 2 +-
 tests/xfs/144     | 2 +-
 tests/xfs/153     | 2 +-
 tests/xfs/163     | 4 ++--
 tests/xfs/168     | 6 +++---
 tests/xfs/176     | 2 +-
 tests/xfs/178     | 2 +-
 tests/xfs/186     | 2 +-
 tests/xfs/189     | 2 +-
 tests/xfs/250     | 2 +-
 tests/xfs/259     | 2 +-
 tests/xfs/276     | 2 +-
 tests/xfs/279     | 2 +-
 tests/xfs/288     | 2 +-
 tests/xfs/292     | 4 ++--
 tests/xfs/299     | 4 ++--
 tests/xfs/335     | 2 +-
 tests/xfs/336     | 2 +-
 tests/xfs/337     | 2 +-
 tests/xfs/341     | 2 +-
 tests/xfs/342     | 2 +-
 tests/xfs/443     | 2 +-
 tests/xfs/448     | 2 +-
 tests/xfs/490     | 2 +-
 tests/xfs/502     | 2 +-
 tests/xfs/513     | 2 +-
 tests/xfs/530     | 2 +-
 tests/xfs/533     | 2 +-
 58 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/common/attr b/common/attr
index 35682d7c..964c790a 100644
--- a/common/attr
+++ b/common/attr
@@ -13,7 +13,7 @@ _acl_get_max()
 		# CRC format filesystems have much larger ACL counts. The actual
 		# number is into the thousands, but testing that meany takes too
 		# long, so just test well past the old limit of 25.
-		$XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
+		$XFS_INFO_PROG $TEST_DIR | _xfs_filter_mkfs > /dev/null 2> $tmp.info
 		. $tmp.info
 		rm $tmp.info
 		if [ $_fs_has_crcs -eq 0 ]; then
diff --git a/common/filter b/common/filter
index c3db7a56..24fd0650 100644
--- a/common/filter
+++ b/common/filter
@@ -117,7 +117,7 @@ _filter_date()
 
 # prints filtered output on stdout, values (use eval) on stderr
 # Non XFS filesystems always return a 4k block size and a 256 byte inode.
-_filter_mkfs()
+_xfs_filter_mkfs()
 {
     case $FSTYP in
     xfs)
diff --git a/common/xfs b/common/xfs
index 713e9fe7..3435c706 100644
--- a/common/xfs
+++ b/common/xfs
@@ -832,7 +832,7 @@ _require_scratch_xfs_shrink()
 	_require_scratch
 	_require_command "$XFS_GROWFS_PROG" xfs_growfs
 
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 	_scratch_mount
 	# here just to check if kernel supports, no need do more extra work
diff --git a/tests/generic/204 b/tests/generic/204
index b5deb443..40d524d1 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -25,7 +25,7 @@ _supported_fs generic
 _require_scratch
 
 # get the block size first
-_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 . $tmp.mkfs
 
 # For xfs, we need to handle the different default log sizes that different
@@ -37,7 +37,7 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
 SIZE=`expr 115 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
 	|| _fail "mkfs failed"
-cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
+cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 _scratch_mount
 
 # Source $tmp.mkfs to get geometry
diff --git a/tests/xfs/004 b/tests/xfs/004
index f18316b3..5e83fff9 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -21,7 +21,7 @@ _cleanup()
 _populate_scratch()
 {
 	echo "=== mkfs output ===" >>$seqres.full
-	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 	_scratch_mount
 	# This test looks at specific behaviors of the xfs_db freesp command,
diff --git a/tests/xfs/007 b/tests/xfs/007
index 4f864100..33a857e8 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -19,7 +19,7 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_quota
 
-_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs
 
 do_test()
diff --git a/tests/xfs/010 b/tests/xfs/010
index 16c08b85..badac7c0 100755
--- a/tests/xfs/010
+++ b/tests/xfs/010
@@ -87,7 +87,7 @@ _require_scratch
 _require_xfs_mkfs_finobt
 _require_xfs_finobt
 
-_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
+_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _xfs_filter_mkfs 2>$seqres.full
 
 # sparsely populate the fs such that we create records with free inodes
 _scratch_mount
diff --git a/tests/xfs/013 b/tests/xfs/013
index 2d005753..dc39ffd6 100755
--- a/tests/xfs/013
+++ b/tests/xfs/013
@@ -89,7 +89,7 @@ _require_xfs_finobt
 _require_command "$KILLALL_PROG" killall
 
 _scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
-	_filter_mkfs 2>> $seqres.full
+	_xfs_filter_mkfs 2>> $seqres.full
 _scratch_mount
 
 COUNT=20000	# number of files per directory
diff --git a/tests/xfs/015 b/tests/xfs/015
index 2bb7b8d5..72842b38 100755
--- a/tests/xfs/015
+++ b/tests/xfs/015
@@ -44,7 +44,7 @@ _require_fs_space $SCRATCH_MNT 131072
 _scratch_unmount
 
 _scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
-cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+cat $tmp.mkfs.raw | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
 # get original data blocks number and agcount
 . $tmp.mkfs
 _scratch_mount
diff --git a/tests/xfs/016 b/tests/xfs/016
index 6337bb1f..e8094476 100755
--- a/tests/xfs/016
+++ b/tests/xfs/016
@@ -66,7 +66,7 @@ _init()
     _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
     [ $? -ne 0 ] && \
         _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
-    _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
+    _xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
     . $tmp.mkfs
     [ $logsunit -ne 0 ] && \
         _notrun "Cannot run this test using log MKFS_OPTIONS specified"
diff --git a/tests/xfs/029 b/tests/xfs/029
index 6e8aa4db..a3fb9cfc 100755
--- a/tests/xfs/029
+++ b/tests/xfs/029
@@ -36,7 +36,7 @@ _supported_fs xfs
 _require_scratch
 
 echo
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 
 echo
 _scratch_xfs_logprint | filter_logprint
diff --git a/tests/xfs/030 b/tests/xfs/030
index 201a9015..62066d06 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -83,7 +83,7 @@ $here/src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
 
 # now kick off the real repair test...
 #
-_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 _check_ag 0
 _check_ag -1
diff --git a/tests/xfs/031 b/tests/xfs/031
index 6e3813da..e6bbc0d4 100755
--- a/tests/xfs/031
+++ b/tests/xfs/031
@@ -82,20 +82,20 @@ echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
 _create_proto 0
 echo "=== one entry (shortform)"
 _scratch_mkfs_xfs -p $tmp.proto >$tmp.mkfs0 2>&1
-_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
+_xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
 . $tmp.mkfs
 _check_repair
 
 # block-form root directory & repeat
 _create_proto 20
 echo "=== twenty entries (block form)"
-_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # leaf-form root directory & repeat
 _create_proto 1000
 echo "=== thousand entries (leaf form)"
-_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # success, all done
diff --git a/tests/xfs/033 b/tests/xfs/033
index d47da0d6..61ae4004 100755
--- a/tests/xfs/033
+++ b/tests/xfs/033
@@ -55,10 +55,10 @@ _require_scratch
 _require_no_large_scratch_dev
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 if [ $isize -lt 512 ]; then
-	_scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	_scratch_mkfs_xfs -isize=512 | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 fi
 
diff --git a/tests/xfs/041 b/tests/xfs/041
index 05de5578..135ed410 100755
--- a/tests/xfs/041
+++ b/tests/xfs/041
@@ -41,7 +41,7 @@ _do_die_on_error=message_only
 agsize=32
 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
 _scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
-bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \
+bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _xfs_filter_mkfs 2>&1 \
 		| perl -ne 'if (/dbsize=(\d+)/) {print $1;}'`
 onemeginblocks=`expr 1048576 / $bsize`
 _scratch_mount
diff --git a/tests/xfs/044 b/tests/xfs/044
index e66c0cb3..8ffd2af4 100755
--- a/tests/xfs/044
+++ b/tests/xfs/044
@@ -79,7 +79,7 @@ lsize=16777216
 _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
 [ $? -ne 0 ] && \
     _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
-_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
+_xfs_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
 . $tmp.mkfs1
 [ $lversion -ne 1 ] && \
     _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
diff --git a/tests/xfs/050 b/tests/xfs/050
index 1847611b..3556c85e 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -65,7 +65,7 @@ _filter_and_check_blks()
 
 _exercise()
 {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/052 b/tests/xfs/052
index 75761022..e4c7ee6c 100755
--- a/tests/xfs/052
+++ b/tests/xfs/052
@@ -34,7 +34,7 @@ _require_nobody
 # setup a default run
 _qmount_option uquota
 
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 chmod a+w $seqres.full     # arbitrary users will write here
 
diff --git a/tests/xfs/058 b/tests/xfs/058
index 8751a7ac..0f87ec3c 100755
--- a/tests/xfs/058
+++ b/tests/xfs/058
@@ -22,7 +22,7 @@ _require_xfs_db_command "fuzz"
 rm -f "$seqres.full"
 
 echo "Format"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
 source $tmp.mkfs
 
 do_xfs_db()
diff --git a/tests/xfs/067 b/tests/xfs/067
index 3dc381bb..c733d761 100755
--- a/tests/xfs/067
+++ b/tests/xfs/067
@@ -22,7 +22,7 @@ _require_scratch
 
 # set up fs for 1K inodes
 isize=0
-_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
 [ $? -eq 0 ] && source $tmp.mkfs
 if [ "$isize" -lt 1024 ]; then
     _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
diff --git a/tests/xfs/070 b/tests/xfs/070
index 43ca7f84..9db518d7 100755
--- a/tests/xfs/070
+++ b/tests/xfs/070
@@ -76,7 +76,7 @@ _supported_fs xfs
 _require_scratch_nocheck
 _require_command "$KILLALL_PROG" killall
 
-_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
 
 . $tmp.mkfs # import agcount
diff --git a/tests/xfs/071 b/tests/xfs/071
index 8373878a..9b425d9f 100755
--- a/tests/xfs/071
+++ b/tests/xfs/071
@@ -81,7 +81,7 @@ _supported_fs xfs
 [ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
 
 _require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 echo
 _scratch_mount
diff --git a/tests/xfs/073 b/tests/xfs/073
index c7616b9e..d1b97313 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -131,7 +131,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
 echo 
 echo === copying scratch device to single target, large ro device
 ${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g \
-	| _filter_mkfs 2>/dev/null
+	| _xfs_filter_mkfs 2>/dev/null
 rmdir $imgs.source_dir 2>/dev/null
 mkdir $imgs.source_dir
 
diff --git a/tests/xfs/076 b/tests/xfs/076
index eac7410e..3cdde79e 100755
--- a/tests/xfs/076
+++ b/tests/xfs/076
@@ -61,7 +61,7 @@ _require_xfs_io_command "fpunch"
 _require_xfs_sparse_inodes
 
 _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
-	_filter_mkfs > /dev/null 2> $tmp.mkfs
+	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 
 _scratch_mount
diff --git a/tests/xfs/078 b/tests/xfs/078
index 1f475c96..a3b75fa6 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -74,7 +74,7 @@ _grow_loop()
 		mkfs_crc_opts="-m crc=0"
 	fi
 	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
-		| _filter_mkfs 2>/dev/null
+		| _xfs_filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
 	_destroy_loop_device $LOOP_DEV
diff --git a/tests/xfs/092 b/tests/xfs/092
index 015149e2..7e7b31fc 100755
--- a/tests/xfs/092
+++ b/tests/xfs/092
@@ -20,7 +20,7 @@ _require_scratch
 _require_no_large_scratch_dev
 
 MOUNT_OPTIONS="$MOUNT_OPTIONS -o inode64"
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 echo Silence is golden
 
 _try_scratch_mount
diff --git a/tests/xfs/104 b/tests/xfs/104
index d16f46d8..c21bd4e0 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -15,7 +15,7 @@ _begin_fstest growfs ioctl prealloc auto stress
 _create_scratch()
 {
 	echo "*** mkfs"
-	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 
 	echo "*** mount"
@@ -50,7 +50,7 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_io_command "falloc"
 
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs	# extract blocksize and data size for scratch device
 
 endsize=`expr 550 \* 1048576`	# stop after growing this big
@@ -89,7 +89,7 @@ while [ $size -le $endsize ]; do
 	echo "*** growing filesystem"
 	echo "*** growing to a ${sizeb} block filesystem" >> $seqres.full
 	xfs_growfs -D ${sizeb} $SCRATCH_MNT \
-		| tee -a $seqres.full | _filter_mkfs 2>$tmp.growfs
+		| tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.growfs
 	. $tmp.growfs
 	[ `expr $size % $modsize` -eq 0 ] && wait	# every 4th iteration
 	echo AGCOUNT=$agcount | tee -a $seqres.full
diff --git a/tests/xfs/108 b/tests/xfs/108
index 46070005..985b989b 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -62,7 +62,7 @@ _require_prjquota $SCRATCH_DEV
 # real QA test starts here
 rm -f $tmp.projects $seqres.full
 _scratch_unmount 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/109 b/tests/xfs/109
index 6cb6917a..e29d4795 100755
--- a/tests/xfs/109
+++ b/tests/xfs/109
@@ -78,7 +78,7 @@ if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
 fi
 _scratch_unmount
 
-_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/110 b/tests/xfs/110
index 596057ef..734d2869 100755
--- a/tests/xfs/110
+++ b/tests/xfs/110
@@ -18,7 +18,7 @@ _require_scratch
 
 # real QA test starts here
 _scratch_unmount 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 
 STR1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 STR2=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
diff --git a/tests/xfs/111 b/tests/xfs/111
index ede28aee..ed5a54c5 100755
--- a/tests/xfs/111
+++ b/tests/xfs/111
@@ -22,7 +22,7 @@ _require_scratch
 _scratch_unmount 2>/dev/null
 MKFS_OPTIONS="-bsize=4096"
 MOUNT_OPTIONS="-o noatime"
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 _scratch_mount
 
 echo Create some files
diff --git a/tests/xfs/144 b/tests/xfs/144
index 5abec9ae..d46eb1e2 100755
--- a/tests/xfs/144
+++ b/tests/xfs/144
@@ -24,7 +24,7 @@ _require_xfs_quota
 _require_scratch
 
 exercise() {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/153 b/tests/xfs/153
index 37303701..d410cbed 100755
--- a/tests/xfs/153
+++ b/tests/xfs/153
@@ -70,7 +70,7 @@ _filter_and_check_blks()
 
 run_tests()
 {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/163 b/tests/xfs/163
index 9f6dbeb8..79f420fa 100755
--- a/tests/xfs/163
+++ b/tests/xfs/163
@@ -24,7 +24,7 @@ test_shrink()
 	_check_scratch_fs
 	_scratch_mount
 
-	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
+	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
 	. $tmp.growfs
 	[ $ret -eq 0 -a $1 -eq $dblocks ]
 }
@@ -38,7 +38,7 @@ echo "Format and mount"
 # agcount = 1 is forbidden on purpose, and need to ensure shrinking to
 # 2 AGs isn't feasible yet. So agcount = 3 is the minimum number now.
 _scratch_mkfs -dsize="$((512 * 1024 * 1024))" -dagcount=3 2>&1 | \
-	tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 t_dblocks=$dblocks
 _scratch_mount >> $seqres.full
diff --git a/tests/xfs/168 b/tests/xfs/168
index ffcd0df8..6b3eee30 100755
--- a/tests/xfs/168
+++ b/tests/xfs/168
@@ -19,7 +19,7 @@ _begin_fstest auto growfs shrinkfs ioctl prealloc stress
 create_scratch()
 {
 	_scratch_mkfs_xfs $@ | tee -a $seqres.full | \
-		_filter_mkfs 2>$tmp.mkfs >/dev/null
+		_xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 
 	_scratch_mount
@@ -48,7 +48,7 @@ _supported_fs xfs
 _require_scratch_xfs_shrink
 _require_xfs_io_command "falloc"
 
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs	# extract blocksize and data size for scratch device
 
 endsize=`expr 125 \* 1048576`	# stop after shrinking this big
@@ -93,7 +93,7 @@ while [ $totalcount -gt 0 ]; do
 		[ $decb -eq 0 ] && break
 
 		# get latest dblocks
-		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
+		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
 		. $tmp.growfs
 
 		size=`expr $dblocks \* $dbsize`
diff --git a/tests/xfs/176 b/tests/xfs/176
index ba4aae59..57e11fd7 100755
--- a/tests/xfs/176
+++ b/tests/xfs/176
@@ -24,7 +24,7 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 
 _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
-	_filter_mkfs > /dev/null 2> $tmp.mkfs
+	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 cat $tmp.mkfs >> $seqres.full
 
diff --git a/tests/xfs/178 b/tests/xfs/178
index a65197cd..5392b9bb 100755
--- a/tests/xfs/178
+++ b/tests/xfs/178
@@ -45,7 +45,7 @@ _supported_fs xfs
 #             fix filesystem, new mkfs.xfs will be fine.
 
 _require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!"
 
 # By executing the followint tmp file, will get on the mkfs options stored in
diff --git a/tests/xfs/186 b/tests/xfs/186
index b54fcf26..8a2a6995 100755
--- a/tests/xfs/186
+++ b/tests/xfs/186
@@ -124,7 +124,7 @@ _require_scratch
 _require_attrs
 _require_attr_v1
 
-_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _filter_mkfs \
+_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _xfs_filter_mkfs \
 	>>$seqres.full 2>$tmp.mkfs
 # import crc status and attr version
 . $tmp.mkfs
diff --git a/tests/xfs/189 b/tests/xfs/189
index e601881a..437243c7 100755
--- a/tests/xfs/189
+++ b/tests/xfs/189
@@ -231,7 +231,7 @@ _require_noattr2
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV
 
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 
 _add_scratch_fstab
 _test_remount_rw
diff --git a/tests/xfs/250 b/tests/xfs/250
index 8af32711..573340bb 100755
--- a/tests/xfs/250
+++ b/tests/xfs/250
@@ -54,7 +54,7 @@ _test_loop()
 
 	echo "*** mkfs loop file (size=$size)"
 	$MKFS_XFS_PROG -d $dparam \
-		| _filter_mkfs 2>/dev/null
+		| _xfs_filter_mkfs 2>/dev/null
 
 	echo "*** mount loop filesystem"
 	mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
diff --git a/tests/xfs/259 b/tests/xfs/259
index 88e2f3ee..7c062c7d 100755
--- a/tests/xfs/259
+++ b/tests/xfs/259
@@ -49,7 +49,7 @@ for del in $sizes_to_check; do
 			>/dev/null 2>&1 || echo "dd failed"
 		lofile=$(losetup -f)
 		losetup $lofile "$testfile"
-		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _filter_mkfs \
+		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _xfs_filter_mkfs \
 			>/dev/null 2> $tmp.mkfs || echo "mkfs failed!"
 		. $tmp.mkfs
 		sync
diff --git a/tests/xfs/276 b/tests/xfs/276
index 8cc48675..6774b819 100755
--- a/tests/xfs/276
+++ b/tests/xfs/276
@@ -29,7 +29,7 @@ _require_test_program "punch-alternating"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2> "$tmp.mkfs" >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2> "$tmp.mkfs" >/dev/null
 . $tmp.mkfs
 cat "$tmp.mkfs" > $seqres.full
 _scratch_mount
diff --git a/tests/xfs/279 b/tests/xfs/279
index 835d187f..64563237 100755
--- a/tests/xfs/279
+++ b/tests/xfs/279
@@ -44,7 +44,7 @@ _check_mkfs()
 		return
 	fi
 	echo "Passed."
-	cat $tmp.mkfs.full | _filter_mkfs >> $seqres.full 2>$tmp.mkfs
+	cat $tmp.mkfs.full | _xfs_filter_mkfs >> $seqres.full 2>$tmp.mkfs
 	. $tmp.mkfs
 	echo "Got sector size: $sectsz"
 	device=`echo $@ | awk '{print $NF}'`
diff --git a/tests/xfs/288 b/tests/xfs/288
index e3d230e9..ec12d0d1 100755
--- a/tests/xfs/288
+++ b/tests/xfs/288
@@ -20,7 +20,7 @@ _require_scratch
 _require_attrs
 
 # get block size ($dbsize) from the mkfs output
-_scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 
 _scratch_mount
diff --git a/tests/xfs/292 b/tests/xfs/292
index cf501571..930504ca 100755
--- a/tests/xfs/292
+++ b/tests/xfs/292
@@ -25,12 +25,12 @@ rm -f $fsfile
 $XFS_IO_PROG -f -c "truncate 256g" $fsfile
 
 echo "mkfs.xfs without geometry"
-mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
+mkfs.xfs -f $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
     sed -e "s:$fsfile:FILENAME:g"
 
 echo "mkfs.xfs with cmdline geometry"
-mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
+mkfs.xfs -f -d su=16k,sw=5 $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
     sed -e "s:$fsfile:FILENAME:g"
 
diff --git a/tests/xfs/299 b/tests/xfs/299
index a3077b0c..e6da413a 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -147,7 +147,7 @@ _exercise()
 
 }
 
-_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 # keep the blocksize and data size for dd later
 . $tmp.mkfs
@@ -184,7 +184,7 @@ _exercise u
 echo "*** unmount"
 _scratch_unmount
 
-_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 # keep the blocksize and data size for dd later
 . $tmp.mkfs
diff --git a/tests/xfs/335 b/tests/xfs/335
index ccc508e7..c2bb1bde 100755
--- a/tests/xfs/335
+++ b/tests/xfs/335
@@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/336 b/tests/xfs/336
index 279830b5..19ed8cc6 100755
--- a/tests/xfs/336
+++ b/tests/xfs/336
@@ -29,7 +29,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/337 b/tests/xfs/337
index a2515e36..ca476e28 100755
--- a/tests/xfs/337
+++ b/tests/xfs/337
@@ -23,7 +23,7 @@ _disable_dmesg_check
 rm -f "$seqres.full"
 
 echo "+ create scratch fs"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 
diff --git a/tests/xfs/341 b/tests/xfs/341
index f026aa37..dad1e0af 100755
--- a/tests/xfs/341
+++ b/tests/xfs/341
@@ -23,7 +23,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/342 b/tests/xfs/342
index 1ae414eb..0922b3fe 100755
--- a/tests/xfs/342
+++ b/tests/xfs/342
@@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/443 b/tests/xfs/443
index f2390bf3..a236c8f8 100755
--- a/tests/xfs/443
+++ b/tests/xfs/443
@@ -31,7 +31,7 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 _require_xfs_io_command "swapext"
 
-_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 _scratch_mount
 
 # get fs block size
diff --git a/tests/xfs/448 b/tests/xfs/448
index 815f56cb..3cd56d4d 100755
--- a/tests/xfs/448
+++ b/tests/xfs/448
@@ -34,7 +34,7 @@ _require_no_xfs_bug_on_assert
 rm -f "$seqres.full"
 
 # Format and mount
-_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs > $seqres.full 2> $tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
 _scratch_mount
 
diff --git a/tests/xfs/490 b/tests/xfs/490
index 8c3b0684..08a03261 100755
--- a/tests/xfs/490
+++ b/tests/xfs/490
@@ -37,7 +37,7 @@ filter_dmesg()
 # If enable free inode B+tree, this case will fail on xfs_dialloc_ag_update_inobt,
 # that's not what we want to test. Due to finobt feature is not necessary for this
 # test, so disable it directly.
-_scratch_mkfs_xfs -m finobt=0 | _filter_mkfs 2>$tmp.mkfs >> $seqres.full
+_scratch_mkfs_xfs -m finobt=0 | _xfs_filter_mkfs 2>$tmp.mkfs >> $seqres.full
 
 # On V5 filesystem, this case can't trigger bug because it doesn't read inodes
 # we are allocating from disk - it simply overwrites them with new inode
diff --git a/tests/xfs/502 b/tests/xfs/502
index fb9a82c1..464326cc 100755
--- a/tests/xfs/502
+++ b/tests/xfs/502
@@ -25,7 +25,7 @@ _require_xfs_io_error_injection "iunlink_fallback"
 _require_scratch
 _require_test_program "t_open_tmpfiles"
 
-_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 cat $tmp.mkfs >> $seqres.full
 . $tmp.mkfs
 
diff --git a/tests/xfs/513 b/tests/xfs/513
index bfdfd4f6..a13f0a03 100755
--- a/tests/xfs/513
+++ b/tests/xfs/513
@@ -68,7 +68,7 @@ MKFS_OPTIONS=""
 do_mkfs()
 {
 	echo "FORMAT: $@" | filter_loop | tee -a $seqres.full
-	$MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >>$seqres.full 2>$tmp.mkfs
+	$MKFS_XFS_PROG -f $* $LOOP_DEV | _xfs_filter_mkfs >>$seqres.full 2>$tmp.mkfs
 	if [ "${PIPESTATUS[0]}" -ne 0 ]; then
 		_fail "Fails on _mkfs_dev $* $LOOP_DEV"
 	fi
diff --git a/tests/xfs/530 b/tests/xfs/530
index 9c6f44d7..925a7b49 100755
--- a/tests/xfs/530
+++ b/tests/xfs/530
@@ -38,7 +38,7 @@ _require_scratch_nocheck
 
 echo "* Test extending rt inodes"
 
-_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 . $tmp.mkfs
 
 echo "Create fake rt volume"
diff --git a/tests/xfs/533 b/tests/xfs/533
index b85b5298..c7d470c9 100755
--- a/tests/xfs/533
+++ b/tests/xfs/533
@@ -23,7 +23,7 @@ _require_test_program "punch-alternating"
 _require_xfs_io_error_injection "reduce_max_iextents"
 _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
 
-_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 . $tmp.mkfs
 
 # Filesystems with directory block size greater than one FSB will not be tested,
-- 
2.34.1


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

* [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs
  2022-01-24 11:10 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
@ 2022-01-24 11:10 ` Shin'ichiro Kawasaki
  0 siblings, 0 replies; 16+ messages in thread
From: Shin'ichiro Kawasaki @ 2022-01-24 11:10 UTC (permalink / raw)
  To: fstests
  Cc: Naohiro Aota, Johannes Thumshirn, Damien Le Moal,
	Shin'ichiro Kawasaki

The helper function works only for xfs and used only for xfs except
generic/204. Rename the function to clearly indicate that the function
is only for xfs.

Suggested-by: Naohiro Aota <naohiro.aota@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 common/attr       | 2 +-
 common/filter     | 2 +-
 common/xfs        | 2 +-
 tests/generic/204 | 4 ++--
 tests/xfs/004     | 2 +-
 tests/xfs/007     | 2 +-
 tests/xfs/010     | 2 +-
 tests/xfs/013     | 2 +-
 tests/xfs/015     | 2 +-
 tests/xfs/016     | 2 +-
 tests/xfs/029     | 2 +-
 tests/xfs/030     | 2 +-
 tests/xfs/031     | 6 +++---
 tests/xfs/033     | 4 ++--
 tests/xfs/041     | 2 +-
 tests/xfs/044     | 2 +-
 tests/xfs/050     | 2 +-
 tests/xfs/052     | 2 +-
 tests/xfs/058     | 2 +-
 tests/xfs/067     | 2 +-
 tests/xfs/070     | 2 +-
 tests/xfs/071     | 2 +-
 tests/xfs/073     | 2 +-
 tests/xfs/076     | 2 +-
 tests/xfs/078     | 2 +-
 tests/xfs/092     | 2 +-
 tests/xfs/104     | 6 +++---
 tests/xfs/108     | 2 +-
 tests/xfs/109     | 2 +-
 tests/xfs/110     | 2 +-
 tests/xfs/111     | 2 +-
 tests/xfs/144     | 2 +-
 tests/xfs/153     | 2 +-
 tests/xfs/163     | 4 ++--
 tests/xfs/168     | 6 +++---
 tests/xfs/176     | 2 +-
 tests/xfs/178     | 2 +-
 tests/xfs/186     | 2 +-
 tests/xfs/189     | 2 +-
 tests/xfs/250     | 2 +-
 tests/xfs/259     | 2 +-
 tests/xfs/276     | 2 +-
 tests/xfs/279     | 2 +-
 tests/xfs/288     | 2 +-
 tests/xfs/292     | 4 ++--
 tests/xfs/299     | 4 ++--
 tests/xfs/335     | 2 +-
 tests/xfs/336     | 2 +-
 tests/xfs/337     | 2 +-
 tests/xfs/341     | 2 +-
 tests/xfs/342     | 2 +-
 tests/xfs/443     | 2 +-
 tests/xfs/448     | 2 +-
 tests/xfs/490     | 2 +-
 tests/xfs/502     | 2 +-
 tests/xfs/513     | 2 +-
 tests/xfs/530     | 2 +-
 tests/xfs/533     | 2 +-
 58 files changed, 69 insertions(+), 69 deletions(-)

diff --git a/common/attr b/common/attr
index 35682d7c..964c790a 100644
--- a/common/attr
+++ b/common/attr
@@ -13,7 +13,7 @@ _acl_get_max()
 		# CRC format filesystems have much larger ACL counts. The actual
 		# number is into the thousands, but testing that meany takes too
 		# long, so just test well past the old limit of 25.
-		$XFS_INFO_PROG $TEST_DIR | _filter_mkfs > /dev/null 2> $tmp.info
+		$XFS_INFO_PROG $TEST_DIR | _xfs_filter_mkfs > /dev/null 2> $tmp.info
 		. $tmp.info
 		rm $tmp.info
 		if [ $_fs_has_crcs -eq 0 ]; then
diff --git a/common/filter b/common/filter
index c3db7a56..24fd0650 100644
--- a/common/filter
+++ b/common/filter
@@ -117,7 +117,7 @@ _filter_date()
 
 # prints filtered output on stdout, values (use eval) on stderr
 # Non XFS filesystems always return a 4k block size and a 256 byte inode.
-_filter_mkfs()
+_xfs_filter_mkfs()
 {
     case $FSTYP in
     xfs)
diff --git a/common/xfs b/common/xfs
index 713e9fe7..3435c706 100644
--- a/common/xfs
+++ b/common/xfs
@@ -832,7 +832,7 @@ _require_scratch_xfs_shrink()
 	_require_scratch
 	_require_command "$XFS_GROWFS_PROG" xfs_growfs
 
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 	_scratch_mount
 	# here just to check if kernel supports, no need do more extra work
diff --git a/tests/generic/204 b/tests/generic/204
index b5deb443..40d524d1 100755
--- a/tests/generic/204
+++ b/tests/generic/204
@@ -25,7 +25,7 @@ _supported_fs generic
 _require_scratch
 
 # get the block size first
-_scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mkfs 2> /dev/null | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 . $tmp.mkfs
 
 # For xfs, we need to handle the different default log sizes that different
@@ -37,7 +37,7 @@ _scratch_mkfs 2> /dev/null | _filter_mkfs 2> $tmp.mkfs > /dev/null
 SIZE=`expr 115 \* 1024 \* 1024`
 _scratch_mkfs_sized $SIZE $dbsize 2> /dev/null > $tmp.mkfs.raw \
 	|| _fail "mkfs failed"
-cat $tmp.mkfs.raw | _filter_mkfs 2> $tmp.mkfs > /dev/null
+cat $tmp.mkfs.raw | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 _scratch_mount
 
 # Source $tmp.mkfs to get geometry
diff --git a/tests/xfs/004 b/tests/xfs/004
index f18316b3..5e83fff9 100755
--- a/tests/xfs/004
+++ b/tests/xfs/004
@@ -21,7 +21,7 @@ _cleanup()
 _populate_scratch()
 {
 	echo "=== mkfs output ===" >>$seqres.full
-	_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 	_scratch_mount
 	# This test looks at specific behaviors of the xfs_db freesp command,
diff --git a/tests/xfs/007 b/tests/xfs/007
index 4f864100..33a857e8 100755
--- a/tests/xfs/007
+++ b/tests/xfs/007
@@ -19,7 +19,7 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_quota
 
-_scratch_mkfs_xfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs
 
 do_test()
diff --git a/tests/xfs/010 b/tests/xfs/010
index 16c08b85..badac7c0 100755
--- a/tests/xfs/010
+++ b/tests/xfs/010
@@ -87,7 +87,7 @@ _require_scratch
 _require_xfs_mkfs_finobt
 _require_xfs_finobt
 
-_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _filter_mkfs 2>$seqres.full
+_scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | _xfs_filter_mkfs 2>$seqres.full
 
 # sparsely populate the fs such that we create records with free inodes
 _scratch_mount
diff --git a/tests/xfs/013 b/tests/xfs/013
index 2d005753..dc39ffd6 100755
--- a/tests/xfs/013
+++ b/tests/xfs/013
@@ -89,7 +89,7 @@ _require_xfs_finobt
 _require_command "$KILLALL_PROG" killall
 
 _scratch_mkfs_xfs "-m crc=1,finobt=1 -d agcount=2" | \
-	_filter_mkfs 2>> $seqres.full
+	_xfs_filter_mkfs 2>> $seqres.full
 _scratch_mount
 
 COUNT=20000	# number of files per directory
diff --git a/tests/xfs/015 b/tests/xfs/015
index 2bb7b8d5..72842b38 100755
--- a/tests/xfs/015
+++ b/tests/xfs/015
@@ -44,7 +44,7 @@ _require_fs_space $SCRATCH_MNT 131072
 _scratch_unmount
 
 _scratch_mkfs_sized $((32 * 1024 * 1024)) > $tmp.mkfs.raw || _fail "mkfs failed"
-cat $tmp.mkfs.raw | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+cat $tmp.mkfs.raw | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
 # get original data blocks number and agcount
 . $tmp.mkfs
 _scratch_mount
diff --git a/tests/xfs/016 b/tests/xfs/016
index 6337bb1f..e8094476 100755
--- a/tests/xfs/016
+++ b/tests/xfs/016
@@ -66,7 +66,7 @@ _init()
     _scratch_mkfs_xfs $force_opts >$tmp.mkfs0 2>&1
     [ $? -ne 0 ] && \
         _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
-    _filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
+    _xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
     . $tmp.mkfs
     [ $logsunit -ne 0 ] && \
         _notrun "Cannot run this test using log MKFS_OPTIONS specified"
diff --git a/tests/xfs/029 b/tests/xfs/029
index 6e8aa4db..a3fb9cfc 100755
--- a/tests/xfs/029
+++ b/tests/xfs/029
@@ -36,7 +36,7 @@ _supported_fs xfs
 _require_scratch
 
 echo
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 
 echo
 _scratch_xfs_logprint | filter_logprint
diff --git a/tests/xfs/030 b/tests/xfs/030
index 201a9015..62066d06 100755
--- a/tests/xfs/030
+++ b/tests/xfs/030
@@ -83,7 +83,7 @@ $here/src/devzero -v -1 -n "$clear" $SCRATCH_DEV >/dev/null
 
 # now kick off the real repair test...
 #
-_scratch_mkfs_xfs $DSIZE | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs $DSIZE | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 _check_ag 0
 _check_ag -1
diff --git a/tests/xfs/031 b/tests/xfs/031
index 6e3813da..e6bbc0d4 100755
--- a/tests/xfs/031
+++ b/tests/xfs/031
@@ -82,20 +82,20 @@ echo "$MKFS_OPTIONS" | grep -q "rtinherit" && \
 _create_proto 0
 echo "=== one entry (shortform)"
 _scratch_mkfs_xfs -p $tmp.proto >$tmp.mkfs0 2>&1
-_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
+_xfs_filter_mkfs <$tmp.mkfs0 >/dev/null 2>$tmp.mkfs
 . $tmp.mkfs
 _check_repair
 
 # block-form root directory & repeat
 _create_proto 20
 echo "=== twenty entries (block form)"
-_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # leaf-form root directory & repeat
 _create_proto 1000
 echo "=== thousand entries (leaf form)"
-_scratch_mkfs_xfs -p $tmp.proto | _filter_mkfs >/dev/null 2>&1
+_scratch_mkfs_xfs -p $tmp.proto | _xfs_filter_mkfs >/dev/null 2>&1
 _check_repair
 
 # success, all done
diff --git a/tests/xfs/033 b/tests/xfs/033
index d47da0d6..61ae4004 100755
--- a/tests/xfs/033
+++ b/tests/xfs/033
@@ -55,10 +55,10 @@ _require_scratch
 _require_no_large_scratch_dev
 
 # devzero blows away 512byte blocks, so make 512byte inodes (at least)
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 if [ $isize -lt 512 ]; then
-	_scratch_mkfs_xfs -isize=512 | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	_scratch_mkfs_xfs -isize=512 | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 fi
 
diff --git a/tests/xfs/041 b/tests/xfs/041
index 05de5578..135ed410 100755
--- a/tests/xfs/041
+++ b/tests/xfs/041
@@ -41,7 +41,7 @@ _do_die_on_error=message_only
 agsize=32
 echo -n "Make $agsize megabyte filesystem on SCRATCH_DEV and mount... "
 _scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 >/dev/null || _fail "mkfs failed"
-bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _filter_mkfs 2>&1 \
+bsize=`_scratch_mkfs_xfs -dsize=${agsize}m,agcount=1 2>&1 | _xfs_filter_mkfs 2>&1 \
 		| perl -ne 'if (/dbsize=(\d+)/) {print $1;}'`
 onemeginblocks=`expr 1048576 / $bsize`
 _scratch_mount
diff --git a/tests/xfs/044 b/tests/xfs/044
index e66c0cb3..8ffd2af4 100755
--- a/tests/xfs/044
+++ b/tests/xfs/044
@@ -79,7 +79,7 @@ lsize=16777216
 _scratch_mkfs_xfs -lsize=$lsize,version=$lversion >$tmp.mkfs0 2>&1
 [ $? -ne 0 ] && \
     _notrun "Cannot mkfs for this test using MKFS_OPTIONS specified"
-_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
+_xfs_filter_mkfs <$tmp.mkfs0 2>$tmp.mkfs1
 . $tmp.mkfs1
 [ $lversion -ne 1 ] && \
     _notrun "Cannot run this test yet using MKFS_OPTIONS specified"
diff --git a/tests/xfs/050 b/tests/xfs/050
index 1847611b..3556c85e 100755
--- a/tests/xfs/050
+++ b/tests/xfs/050
@@ -65,7 +65,7 @@ _filter_and_check_blks()
 
 _exercise()
 {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/052 b/tests/xfs/052
index 75761022..e4c7ee6c 100755
--- a/tests/xfs/052
+++ b/tests/xfs/052
@@ -34,7 +34,7 @@ _require_nobody
 # setup a default run
 _qmount_option uquota
 
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 chmod a+w $seqres.full     # arbitrary users will write here
 
diff --git a/tests/xfs/058 b/tests/xfs/058
index 8751a7ac..0f87ec3c 100755
--- a/tests/xfs/058
+++ b/tests/xfs/058
@@ -22,7 +22,7 @@ _require_xfs_db_command "fuzz"
 rm -f "$seqres.full"
 
 echo "Format"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >> "$seqres.full"
 source $tmp.mkfs
 
 do_xfs_db()
diff --git a/tests/xfs/067 b/tests/xfs/067
index 3dc381bb..c733d761 100755
--- a/tests/xfs/067
+++ b/tests/xfs/067
@@ -22,7 +22,7 @@ _require_scratch
 
 # set up fs for 1K inodes
 isize=0
-_scratch_mkfs_xfs | _filter_mkfs >$seqres.full 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs >$seqres.full 2>$tmp.mkfs
 [ $? -eq 0 ] && source $tmp.mkfs
 if [ "$isize" -lt 1024 ]; then
     _scratch_mkfs_xfs -i size=1024 >>$seqres.full \
diff --git a/tests/xfs/070 b/tests/xfs/070
index 43ca7f84..9db518d7 100755
--- a/tests/xfs/070
+++ b/tests/xfs/070
@@ -76,7 +76,7 @@ _supported_fs xfs
 _require_scratch_nocheck
 _require_command "$KILLALL_PROG" killall
 
-_scratch_mkfs | _filter_mkfs > /dev/null 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
 
 . $tmp.mkfs # import agcount
diff --git a/tests/xfs/071 b/tests/xfs/071
index 8373878a..9b425d9f 100755
--- a/tests/xfs/071
+++ b/tests/xfs/071
@@ -81,7 +81,7 @@ _supported_fs xfs
 [ -n "$XFS_IO_PROG" ] || _notrun "xfs_io executable not found"
 
 _require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs
 echo
 _scratch_mount
diff --git a/tests/xfs/073 b/tests/xfs/073
index c7616b9e..d1b97313 100755
--- a/tests/xfs/073
+++ b/tests/xfs/073
@@ -131,7 +131,7 @@ _verify_copy $imgs.image $SCRATCH_DEV $SCRATCH_MNT
 echo 
 echo === copying scratch device to single target, large ro device
 ${MKFS_XFS_PROG} -dfile,name=$imgs.source,size=100g \
-	| _filter_mkfs 2>/dev/null
+	| _xfs_filter_mkfs 2>/dev/null
 rmdir $imgs.source_dir 2>/dev/null
 mkdir $imgs.source_dir
 
diff --git a/tests/xfs/076 b/tests/xfs/076
index eac7410e..3cdde79e 100755
--- a/tests/xfs/076
+++ b/tests/xfs/076
@@ -61,7 +61,7 @@ _require_xfs_io_command "fpunch"
 _require_xfs_sparse_inodes
 
 _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
-	_filter_mkfs > /dev/null 2> $tmp.mkfs
+	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 
 _scratch_mount
diff --git a/tests/xfs/078 b/tests/xfs/078
index 1f475c96..a3b75fa6 100755
--- a/tests/xfs/078
+++ b/tests/xfs/078
@@ -74,7 +74,7 @@ _grow_loop()
 		mkfs_crc_opts="-m crc=0"
 	fi
 	$MKFS_XFS_PROG $mkfs_crc_opts -b size=$bsize $dparam $LOOP_DEV \
-		| _filter_mkfs 2>/dev/null
+		| _xfs_filter_mkfs 2>/dev/null
 
 	echo "*** extend loop file"
 	_destroy_loop_device $LOOP_DEV
diff --git a/tests/xfs/092 b/tests/xfs/092
index 015149e2..7e7b31fc 100755
--- a/tests/xfs/092
+++ b/tests/xfs/092
@@ -20,7 +20,7 @@ _require_scratch
 _require_no_large_scratch_dev
 
 MOUNT_OPTIONS="$MOUNT_OPTIONS -o inode64"
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 echo Silence is golden
 
 _try_scratch_mount
diff --git a/tests/xfs/104 b/tests/xfs/104
index d16f46d8..c21bd4e0 100755
--- a/tests/xfs/104
+++ b/tests/xfs/104
@@ -15,7 +15,7 @@ _begin_fstest growfs ioctl prealloc auto stress
 _create_scratch()
 {
 	echo "*** mkfs"
-	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs $@ | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 	. $tmp.mkfs
 
 	echo "*** mount"
@@ -50,7 +50,7 @@ _supported_fs xfs
 _require_scratch
 _require_xfs_io_command "falloc"
 
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs
 . $tmp.mkfs	# extract blocksize and data size for scratch device
 
 endsize=`expr 550 \* 1048576`	# stop after growing this big
@@ -89,7 +89,7 @@ while [ $size -le $endsize ]; do
 	echo "*** growing filesystem"
 	echo "*** growing to a ${sizeb} block filesystem" >> $seqres.full
 	xfs_growfs -D ${sizeb} $SCRATCH_MNT \
-		| tee -a $seqres.full | _filter_mkfs 2>$tmp.growfs
+		| tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.growfs
 	. $tmp.growfs
 	[ `expr $size % $modsize` -eq 0 ] && wait	# every 4th iteration
 	echo AGCOUNT=$agcount | tee -a $seqres.full
diff --git a/tests/xfs/108 b/tests/xfs/108
index 46070005..985b989b 100755
--- a/tests/xfs/108
+++ b/tests/xfs/108
@@ -62,7 +62,7 @@ _require_prjquota $SCRATCH_DEV
 # real QA test starts here
 rm -f $tmp.projects $seqres.full
 _scratch_unmount 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/109 b/tests/xfs/109
index 6cb6917a..e29d4795 100755
--- a/tests/xfs/109
+++ b/tests/xfs/109
@@ -78,7 +78,7 @@ if [ -n "$FASTSTART" -a -f $SCRATCH_MNT/f0 ]; then
 fi
 _scratch_unmount
 
-_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -dsize=160m,agcount=4 $faststart | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 _scratch_mount
 
diff --git a/tests/xfs/110 b/tests/xfs/110
index 596057ef..734d2869 100755
--- a/tests/xfs/110
+++ b/tests/xfs/110
@@ -18,7 +18,7 @@ _require_scratch
 
 # real QA test starts here
 _scratch_unmount 2>/dev/null
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 
 STR1=AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 STR2=BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB
diff --git a/tests/xfs/111 b/tests/xfs/111
index ede28aee..ed5a54c5 100755
--- a/tests/xfs/111
+++ b/tests/xfs/111
@@ -22,7 +22,7 @@ _require_scratch
 _scratch_unmount 2>/dev/null
 MKFS_OPTIONS="-bsize=4096"
 MOUNT_OPTIONS="-o noatime"
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 _scratch_mount
 
 echo Create some files
diff --git a/tests/xfs/144 b/tests/xfs/144
index 5abec9ae..d46eb1e2 100755
--- a/tests/xfs/144
+++ b/tests/xfs/144
@@ -24,7 +24,7 @@ _require_xfs_quota
 _require_scratch
 
 exercise() {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/153 b/tests/xfs/153
index 37303701..d410cbed 100755
--- a/tests/xfs/153
+++ b/tests/xfs/153
@@ -70,7 +70,7 @@ _filter_and_check_blks()
 
 run_tests()
 {
-	_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+	_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 	cat $tmp.mkfs >>$seqres.full
 
 	# keep the blocksize and data size for dd later
diff --git a/tests/xfs/163 b/tests/xfs/163
index 9f6dbeb8..79f420fa 100755
--- a/tests/xfs/163
+++ b/tests/xfs/163
@@ -24,7 +24,7 @@ test_shrink()
 	_check_scratch_fs
 	_scratch_mount
 
-	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
+	$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
 	. $tmp.growfs
 	[ $ret -eq 0 -a $1 -eq $dblocks ]
 }
@@ -38,7 +38,7 @@ echo "Format and mount"
 # agcount = 1 is forbidden on purpose, and need to ensure shrinking to
 # 2 AGs isn't feasible yet. So agcount = 3 is the minimum number now.
 _scratch_mkfs -dsize="$((512 * 1024 * 1024))" -dagcount=3 2>&1 | \
-	tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
+	tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 t_dblocks=$dblocks
 _scratch_mount >> $seqres.full
diff --git a/tests/xfs/168 b/tests/xfs/168
index ffcd0df8..6b3eee30 100755
--- a/tests/xfs/168
+++ b/tests/xfs/168
@@ -19,7 +19,7 @@ _begin_fstest auto growfs shrinkfs ioctl prealloc stress
 create_scratch()
 {
 	_scratch_mkfs_xfs $@ | tee -a $seqres.full | \
-		_filter_mkfs 2>$tmp.mkfs >/dev/null
+		_xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 	. $tmp.mkfs
 
 	_scratch_mount
@@ -48,7 +48,7 @@ _supported_fs xfs
 _require_scratch_xfs_shrink
 _require_xfs_io_command "falloc"
 
-_scratch_mkfs_xfs | tee -a $seqres.full | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs | tee -a $seqres.full | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs	# extract blocksize and data size for scratch device
 
 endsize=`expr 125 \* 1048576`	# stop after shrinking this big
@@ -93,7 +93,7 @@ while [ $totalcount -gt 0 ]; do
 		[ $decb -eq 0 ] && break
 
 		# get latest dblocks
-		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _filter_mkfs 2>$tmp.growfs >/dev/null
+		$XFS_INFO_PROG $SCRATCH_MNT 2>&1 | _xfs_filter_mkfs 2>$tmp.growfs >/dev/null
 		. $tmp.growfs
 
 		size=`expr $dblocks \* $dbsize`
diff --git a/tests/xfs/176 b/tests/xfs/176
index ba4aae59..57e11fd7 100755
--- a/tests/xfs/176
+++ b/tests/xfs/176
@@ -24,7 +24,7 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 
 _scratch_mkfs "-d size=50m -m crc=1 -i sparse" |
-	_filter_mkfs > /dev/null 2> $tmp.mkfs
+	_xfs_filter_mkfs > /dev/null 2> $tmp.mkfs
 . $tmp.mkfs	# for isize
 cat $tmp.mkfs >> $seqres.full
 
diff --git a/tests/xfs/178 b/tests/xfs/178
index a65197cd..5392b9bb 100755
--- a/tests/xfs/178
+++ b/tests/xfs/178
@@ -45,7 +45,7 @@ _supported_fs xfs
 #             fix filesystem, new mkfs.xfs will be fine.
 
 _require_scratch
-_scratch_mkfs_xfs | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>$tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed!"
 
 # By executing the followint tmp file, will get on the mkfs options stored in
diff --git a/tests/xfs/186 b/tests/xfs/186
index b54fcf26..8a2a6995 100755
--- a/tests/xfs/186
+++ b/tests/xfs/186
@@ -124,7 +124,7 @@ _require_scratch
 _require_attrs
 _require_attr_v1
 
-_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _filter_mkfs \
+_scratch_mkfs -i attr=2,size=512 -l lazy-count=1 | _xfs_filter_mkfs \
 	>>$seqres.full 2>$tmp.mkfs
 # import crc status and attr version
 . $tmp.mkfs
diff --git a/tests/xfs/189 b/tests/xfs/189
index e601881a..437243c7 100755
--- a/tests/xfs/189
+++ b/tests/xfs/189
@@ -231,7 +231,7 @@ _require_noattr2
 unset SCRATCH_RTDEV
 unset SCRATCH_LOGDEV
 
-_scratch_mkfs_xfs | _filter_mkfs 2>/dev/null
+_scratch_mkfs_xfs | _xfs_filter_mkfs 2>/dev/null
 
 _add_scratch_fstab
 _test_remount_rw
diff --git a/tests/xfs/250 b/tests/xfs/250
index 8af32711..573340bb 100755
--- a/tests/xfs/250
+++ b/tests/xfs/250
@@ -54,7 +54,7 @@ _test_loop()
 
 	echo "*** mkfs loop file (size=$size)"
 	$MKFS_XFS_PROG -d $dparam \
-		| _filter_mkfs 2>/dev/null
+		| _xfs_filter_mkfs 2>/dev/null
 
 	echo "*** mount loop filesystem"
 	mount -t xfs -o loop $LOOP_DEV $LOOP_MNT
diff --git a/tests/xfs/259 b/tests/xfs/259
index 88e2f3ee..7c062c7d 100755
--- a/tests/xfs/259
+++ b/tests/xfs/259
@@ -49,7 +49,7 @@ for del in $sizes_to_check; do
 			>/dev/null 2>&1 || echo "dd failed"
 		lofile=$(losetup -f)
 		losetup $lofile "$testfile"
-		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _filter_mkfs \
+		$MKFS_XFS_PROG -l size=32m -b size=$bs $lofile |  _xfs_filter_mkfs \
 			>/dev/null 2> $tmp.mkfs || echo "mkfs failed!"
 		. $tmp.mkfs
 		sync
diff --git a/tests/xfs/276 b/tests/xfs/276
index 8cc48675..6774b819 100755
--- a/tests/xfs/276
+++ b/tests/xfs/276
@@ -29,7 +29,7 @@ _require_test_program "punch-alternating"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2> "$tmp.mkfs" >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2> "$tmp.mkfs" >/dev/null
 . $tmp.mkfs
 cat "$tmp.mkfs" > $seqres.full
 _scratch_mount
diff --git a/tests/xfs/279 b/tests/xfs/279
index 835d187f..64563237 100755
--- a/tests/xfs/279
+++ b/tests/xfs/279
@@ -44,7 +44,7 @@ _check_mkfs()
 		return
 	fi
 	echo "Passed."
-	cat $tmp.mkfs.full | _filter_mkfs >> $seqres.full 2>$tmp.mkfs
+	cat $tmp.mkfs.full | _xfs_filter_mkfs >> $seqres.full 2>$tmp.mkfs
 	. $tmp.mkfs
 	echo "Got sector size: $sectsz"
 	device=`echo $@ | awk '{print $NF}'`
diff --git a/tests/xfs/288 b/tests/xfs/288
index e3d230e9..ec12d0d1 100755
--- a/tests/xfs/288
+++ b/tests/xfs/288
@@ -20,7 +20,7 @@ _require_scratch
 _require_attrs
 
 # get block size ($dbsize) from the mkfs output
-_scratch_mkfs_xfs 2>/dev/null | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs_xfs 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 
 _scratch_mount
diff --git a/tests/xfs/292 b/tests/xfs/292
index cf501571..930504ca 100755
--- a/tests/xfs/292
+++ b/tests/xfs/292
@@ -25,12 +25,12 @@ rm -f $fsfile
 $XFS_IO_PROG -f -c "truncate 256g" $fsfile
 
 echo "mkfs.xfs without geometry"
-mkfs.xfs -f $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
+mkfs.xfs -f $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
     sed -e "s:$fsfile:FILENAME:g"
 
 echo "mkfs.xfs with cmdline geometry"
-mkfs.xfs -f -d su=16k,sw=5 $fsfile | _filter_mkfs 2> $tmp.mkfs > /dev/null
+mkfs.xfs -f -d su=16k,sw=5 $fsfile | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 grep -E 'ddev|agcount|agsize' $tmp.mkfs | \
     sed -e "s:$fsfile:FILENAME:g"
 
diff --git a/tests/xfs/299 b/tests/xfs/299
index a3077b0c..e6da413a 100755
--- a/tests/xfs/299
+++ b/tests/xfs/299
@@ -147,7 +147,7 @@ _exercise()
 
 }
 
-_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 # keep the blocksize and data size for dd later
 . $tmp.mkfs
@@ -184,7 +184,7 @@ _exercise u
 echo "*** unmount"
 _scratch_unmount
 
-_scratch_mkfs_xfs -m crc=1 2>/dev/null | _filter_mkfs 2>$tmp.mkfs
+_scratch_mkfs_xfs -m crc=1 2>/dev/null | _xfs_filter_mkfs 2>$tmp.mkfs
 cat $tmp.mkfs >>$seqres.full
 # keep the blocksize and data size for dd later
 . $tmp.mkfs
diff --git a/tests/xfs/335 b/tests/xfs/335
index ccc508e7..c2bb1bde 100755
--- a/tests/xfs/335
+++ b/tests/xfs/335
@@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/336 b/tests/xfs/336
index 279830b5..19ed8cc6 100755
--- a/tests/xfs/336
+++ b/tests/xfs/336
@@ -29,7 +29,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/337 b/tests/xfs/337
index a2515e36..ca476e28 100755
--- a/tests/xfs/337
+++ b/tests/xfs/337
@@ -23,7 +23,7 @@ _disable_dmesg_check
 rm -f "$seqres.full"
 
 echo "+ create scratch fs"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 
diff --git a/tests/xfs/341 b/tests/xfs/341
index f026aa37..dad1e0af 100755
--- a/tests/xfs/341
+++ b/tests/xfs/341
@@ -23,7 +23,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/342 b/tests/xfs/342
index 1ae414eb..0922b3fe 100755
--- a/tests/xfs/342
+++ b/tests/xfs/342
@@ -22,7 +22,7 @@ _require_xfs_io_command "falloc"
 rm -f "$seqres.full"
 
 echo "Format and mount"
-_scratch_mkfs | _filter_mkfs 2>$tmp.mkfs >/dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2>$tmp.mkfs >/dev/null
 . $tmp.mkfs
 cat $tmp.mkfs > "$seqres.full" 2>&1
 _scratch_mount
diff --git a/tests/xfs/443 b/tests/xfs/443
index f2390bf3..a236c8f8 100755
--- a/tests/xfs/443
+++ b/tests/xfs/443
@@ -31,7 +31,7 @@ _require_xfs_io_command "falloc"
 _require_xfs_io_command "fpunch"
 _require_xfs_io_command "swapext"
 
-_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 _scratch_mount
 
 # get fs block size
diff --git a/tests/xfs/448 b/tests/xfs/448
index 815f56cb..3cd56d4d 100755
--- a/tests/xfs/448
+++ b/tests/xfs/448
@@ -34,7 +34,7 @@ _require_no_xfs_bug_on_assert
 rm -f "$seqres.full"
 
 # Format and mount
-_scratch_mkfs | _filter_mkfs > $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs > $seqres.full 2> $tmp.mkfs
 test "${PIPESTATUS[0]}" -eq 0 || _fail "mkfs failed"
 _scratch_mount
 
diff --git a/tests/xfs/490 b/tests/xfs/490
index 8c3b0684..08a03261 100755
--- a/tests/xfs/490
+++ b/tests/xfs/490
@@ -37,7 +37,7 @@ filter_dmesg()
 # If enable free inode B+tree, this case will fail on xfs_dialloc_ag_update_inobt,
 # that's not what we want to test. Due to finobt feature is not necessary for this
 # test, so disable it directly.
-_scratch_mkfs_xfs -m finobt=0 | _filter_mkfs 2>$tmp.mkfs >> $seqres.full
+_scratch_mkfs_xfs -m finobt=0 | _xfs_filter_mkfs 2>$tmp.mkfs >> $seqres.full
 
 # On V5 filesystem, this case can't trigger bug because it doesn't read inodes
 # we are allocating from disk - it simply overwrites them with new inode
diff --git a/tests/xfs/502 b/tests/xfs/502
index fb9a82c1..464326cc 100755
--- a/tests/xfs/502
+++ b/tests/xfs/502
@@ -25,7 +25,7 @@ _require_xfs_io_error_injection "iunlink_fallback"
 _require_scratch
 _require_test_program "t_open_tmpfiles"
 
-_scratch_mkfs | _filter_mkfs 2> $tmp.mkfs > /dev/null
+_scratch_mkfs | _xfs_filter_mkfs 2> $tmp.mkfs > /dev/null
 cat $tmp.mkfs >> $seqres.full
 . $tmp.mkfs
 
diff --git a/tests/xfs/513 b/tests/xfs/513
index bfdfd4f6..a13f0a03 100755
--- a/tests/xfs/513
+++ b/tests/xfs/513
@@ -68,7 +68,7 @@ MKFS_OPTIONS=""
 do_mkfs()
 {
 	echo "FORMAT: $@" | filter_loop | tee -a $seqres.full
-	$MKFS_XFS_PROG -f $* $LOOP_DEV | _filter_mkfs >>$seqres.full 2>$tmp.mkfs
+	$MKFS_XFS_PROG -f $* $LOOP_DEV | _xfs_filter_mkfs >>$seqres.full 2>$tmp.mkfs
 	if [ "${PIPESTATUS[0]}" -ne 0 ]; then
 		_fail "Fails on _mkfs_dev $* $LOOP_DEV"
 	fi
diff --git a/tests/xfs/530 b/tests/xfs/530
index 9c6f44d7..925a7b49 100755
--- a/tests/xfs/530
+++ b/tests/xfs/530
@@ -38,7 +38,7 @@ _require_scratch_nocheck
 
 echo "* Test extending rt inodes"
 
-_scratch_mkfs | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 . $tmp.mkfs
 
 echo "Create fake rt volume"
diff --git a/tests/xfs/533 b/tests/xfs/533
index b85b5298..c7d470c9 100755
--- a/tests/xfs/533
+++ b/tests/xfs/533
@@ -23,7 +23,7 @@ _require_test_program "punch-alternating"
 _require_xfs_io_error_injection "reduce_max_iextents"
 _require_xfs_io_error_injection "bmap_alloc_minlen_extent"
 
-_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _filter_mkfs >> $seqres.full 2> $tmp.mkfs
+_scratch_mkfs_sized $((1024 * 1024 * 1024)) | _xfs_filter_mkfs >> $seqres.full 2> $tmp.mkfs
 . $tmp.mkfs
 
 # Filesystems with directory block size greater than one FSB will not be tested,
-- 
2.34.1


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

end of thread, other threads:[~2022-02-09  8:18 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-07  6:55 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
2022-02-07  6:55 ` [PATCH 1/7] common/rc: fix btrfs mixed mode usage in _scratch_mkfs_sized Shin'ichiro Kawasaki
2022-02-07  6:55 ` [PATCH 2/7] generic/{171,172,173,174,204}: check _scratch_mkfs_sized return code Shin'ichiro Kawasaki
2022-02-09  0:35   ` Darrick J. Wong
2022-02-09  8:09     ` Shinichiro Kawasaki
2022-02-07  6:55 ` [PATCH 3/7] ext4/021: " Shin'ichiro Kawasaki
2022-02-07  6:55 ` [PATCH 4/7] xfs/015: " Shin'ichiro Kawasaki
2022-02-09  0:36   ` Darrick J. Wong
2022-02-07  6:55 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki
2022-02-09  0:43   ` Darrick J. Wong
2022-02-09  0:53     ` Darrick J. Wong
2022-02-09  8:18       ` Shinichiro Kawasaki
2022-02-07  6:55 ` [PATCH 6/7] common: move _xfs_filter_mkfs from common/filter to common/xfs Shin'ichiro Kawasaki
2022-02-07  6:55 ` [PATCH 7/7] generic/204: do xfs unique preparation only for xfs Shin'ichiro Kawasaki
  -- strict thread matches above, loose matches on Subject: below --
2022-02-07  3:09 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
2022-02-07  3:09 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki
2022-01-24 11:10 [PATCH 0/7] fstests: fix _scratch_mkfs_sized failure handling Shin'ichiro Kawasaki
2022-01-24 11:10 ` [PATCH 5/7] common: rename _filter_mkfs to _xfs_filter_mkfs Shin'ichiro Kawasaki

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.