* [PATCH v2 0/5] fstests: misc fixes for zoned btrfs
@ 2026-08-19 13:16 Johannes Thumshirn
2026-08-19 13:16 ` [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid Johannes Thumshirn
` (4 more replies)
0 siblings, 5 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2026-08-19 13:16 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, linux-btrfs, Johannes Thumshirn
Misc fixes for test failures (and a typo) when running fstests with
zoned btrfs.
Changes to v1:
- use _require_xfs_io_command "fpunc"
Johannes Thumshirn (5):
common/btrfs: fix awk field separator in _check_temp_fsid
btrfs/199: skip on zoned devices
generic/746: skip on zoned btrfs
btrfs/284: skip on zoned devices
generic/781: fix copyright
common/btrfs | 2 +-
tests/btrfs/199 | 1 +
tests/btrfs/284 | 1 +
tests/generic/746 | 1 +
tests/generic/781 | 2 +-
5 files changed, 5 insertions(+), 2 deletions(-)
--
2.55.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid
2026-08-19 13:16 [PATCH v2 0/5] fstests: misc fixes for zoned btrfs Johannes Thumshirn
@ 2026-08-19 13:16 ` Johannes Thumshirn
2026-08-21 5:36 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 2/5] btrfs/199: skip on zoned devices Johannes Thumshirn
` (3 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Johannes Thumshirn @ 2026-08-19 13:16 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, linux-btrfs, Johannes Thumshirn
_check_temp_fsid() extracted the on-disk fsid with "awk -d\" \"",
but -d is gawk's --dump-variables option, not a field separator.
As a result awk tried to open a file named " " for writing and dumped
its variable list, polluting the test output with messages like:
awk: warning: could not open ' ' for writing: Read-only file system
awk: warning: sending variable list to standard error
ARGC: 1
ARGIND: 0
...
which made btrfs/311 (the only test currently exercising this helper)
fail. Use -F" " to set the field separator as intended.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
common/btrfs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/btrfs b/common/btrfs
index fb7c8378..926f56e5 100644
--- a/common/btrfs
+++ b/common/btrfs
@@ -1014,7 +1014,7 @@ _check_temp_fsid()
# on disk fsid
fsid=$($BTRFS_UTIL_PROG inspect-internal dump-super $dev1 | \
- grep ^fsid | $AWK_PROG -d" " '{print $2}')
+ grep ^fsid | $AWK_PROG -F" " '{print $2}')
echo -e "On disk fsid:\t\t$fsid" | sed -e "s/$fsid/FSID/g"
# Print FSID even if it is not the same as metadata_uuid because it has
--
2.55.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 2/5] btrfs/199: skip on zoned devices
2026-08-19 13:16 [PATCH v2 0/5] fstests: misc fixes for zoned btrfs Johannes Thumshirn
2026-08-19 13:16 ` [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid Johannes Thumshirn
@ 2026-08-19 13:16 ` Johannes Thumshirn
2026-08-21 5:37 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 3/5] generic/746: skip on zoned btrfs Johannes Thumshirn
` (2 subsequent siblings)
4 siblings, 1 reply; 10+ messages in thread
From: Johannes Thumshirn @ 2026-08-19 13:16 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, linux-btrfs, Johannes Thumshirn
The test detects trimmed bytes via the used space of the loopback
backing file, which requires the backing filesystem to support hole
punching triggered by loop device discards. Zoned btrfs does not
support fallocate/punch hole, so discards to the loop device are
rejected ("operation not supported") and the test cannot measure
anything meaningful.
Skip the test when the scratch device is zoned.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
tests/btrfs/199 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/btrfs/199 b/tests/btrfs/199
index f161e550..ec9f3783 100755
--- a/tests/btrfs/199
+++ b/tests/btrfs/199
@@ -31,6 +31,7 @@ _fixed_by_kernel_commit 6b7faadd985c \
_require_loop
_require_xfs_io_command "fiemap"
+_require_non_zoned_device $SCRATCH_DEV
# We need less than 2G data write, consider it 2G and double it just in case
_require_scratch_size $((4 * 1024 * 1024))
--
2.55.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 3/5] generic/746: skip on zoned btrfs
2026-08-19 13:16 [PATCH v2 0/5] fstests: misc fixes for zoned btrfs Johannes Thumshirn
2026-08-19 13:16 ` [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid Johannes Thumshirn
2026-08-19 13:16 ` [PATCH v2 2/5] btrfs/199: skip on zoned devices Johannes Thumshirn
@ 2026-08-19 13:16 ` Johannes Thumshirn
2026-08-21 5:38 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 4/5] btrfs/284: skip on zoned devices Johannes Thumshirn
2026-08-19 13:16 ` [PATCH v2 5/5] generic/781: fix copyright Johannes Thumshirn
4 siblings, 1 reply; 10+ messages in thread
From: Johannes Thumshirn @ 2026-08-19 13:16 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, linux-btrfs, Johannes Thumshirn
The test relies on loop device discards punching holes in the backing
image file (holes are then detected via fiemap on the backing file).
Zoned btrfs does not support fallocate/punch hole, so fstrim on the
loop device cannot free space in the backing file and the test cannot
work.
Skip the test on filesystems that do not support "fpunch"
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
tests/generic/746 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/generic/746 b/tests/generic/746
index 4eb4252b..be6da079 100755
--- a/tests/generic/746
+++ b/tests/generic/746
@@ -13,6 +13,7 @@ _require_test
_require_loop
_require_fstrim
_require_xfs_io_command "fiemap"
+_require_xfs_io_command "fpunch"
_require_fs_space $TEST_DIR 307200
fssize=$(_small_fs_size_mb 300) # 200m phys/virt size
--
2.55.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 4/5] btrfs/284: skip on zoned devices
2026-08-19 13:16 [PATCH v2 0/5] fstests: misc fixes for zoned btrfs Johannes Thumshirn
` (2 preceding siblings ...)
2026-08-19 13:16 ` [PATCH v2 3/5] generic/746: skip on zoned btrfs Johannes Thumshirn
@ 2026-08-19 13:16 ` Johannes Thumshirn
2026-08-21 5:39 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 5/5] generic/781: fix copyright Johannes Thumshirn
4 siblings, 1 reply; 10+ messages in thread
From: Johannes Thumshirn @ 2026-08-19 13:16 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, linux-btrfs, Johannes Thumshirn
Incremental send stream v2 uses fallocate(PUNCH_HOLE) to represent
holes, which btrfs receive replays. Zoned btrfs rejects all fallocate
modes, so receiving a stream with holes fails. Skip on zoned devices.
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
tests/btrfs/284 | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/btrfs/284 b/tests/btrfs/284
index ec3bc272..fc34df88 100755
--- a/tests/btrfs/284
+++ b/tests/btrfs/284
@@ -17,6 +17,7 @@ _require_test
# least $LOAD_FACTOR * 1G, just to be on the safe side.
_require_scratch_size $(($LOAD_FACTOR * 1 * 1024 * 1024))
_require_fssum
+_require_non_zoned_device $SCRATCH_DEV
_fixed_by_git_commit btrfs-progs e3209f8792f4 \
"btrfs-progs: receive: fix a corruption when decompressing zstd extents"
--
2.55.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH v2 5/5] generic/781: fix copyright
2026-08-19 13:16 [PATCH v2 0/5] fstests: misc fixes for zoned btrfs Johannes Thumshirn
` (3 preceding siblings ...)
2026-08-19 13:16 ` [PATCH v2 4/5] btrfs/284: skip on zoned devices Johannes Thumshirn
@ 2026-08-19 13:16 ` Johannes Thumshirn
4 siblings, 0 replies; 10+ messages in thread
From: Johannes Thumshirn @ 2026-08-19 13:16 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests, linux-btrfs, Johannes Thumshirn, Christoph Hellwig
My employer is called Western Digital not Wesgtern Digital. I'm sorry.
Spotted-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
tests/generic/781 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/generic/781 b/tests/generic/781
index 575cc4ab..38536d64 100755
--- a/tests/generic/781
+++ b/tests/generic/781
@@ -1,6 +1,6 @@
#! /bin/bash
# SPDX-License-Identifier: GPL-2.0
-# Copyright (c) 2025 Wesgtern Digital Corporation. All Rights Reserved.
+# Copyright (c) 2025 Western Digital Corporation. All Rights Reserved.
#
# FS QA Test No. 781
#
--
2.55.0
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid
2026-08-19 13:16 ` [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid Johannes Thumshirn
@ 2026-08-21 5:36 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2026-08-21 5:36 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: Zorro Lang, fstests, linux-btrfs
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 2/5] btrfs/199: skip on zoned devices
2026-08-19 13:16 ` [PATCH v2 2/5] btrfs/199: skip on zoned devices Johannes Thumshirn
@ 2026-08-21 5:37 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2026-08-21 5:37 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: Zorro Lang, fstests, linux-btrfs
On Wed, Aug 19, 2026 at 03:16:02PM +0200, Johannes Thumshirn wrote:
> The test detects trimmed bytes via the used space of the loopback
> backing file, which requires the backing filesystem to support hole
> punching triggered by loop device discards. Zoned btrfs does not
> support fallocate/punch hole, so discards to the loop device are
> rejected ("operation not supported") and the test cannot measure
> anything meaningful.
>
> Skip the test when the scratch device is zoned.
Looks good:
Reviewed-by: Christoph Hellwig <hch@lst.de>
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 3/5] generic/746: skip on zoned btrfs
2026-08-19 13:16 ` [PATCH v2 3/5] generic/746: skip on zoned btrfs Johannes Thumshirn
@ 2026-08-21 5:38 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2026-08-21 5:38 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: Zorro Lang, fstests, linux-btrfs
On Wed, Aug 19, 2026 at 03:16:03PM +0200, Johannes Thumshirn wrote:
> The test relies on loop device discards punching holes in the backing
> image file (holes are then detected via fiemap on the backing file).
> Zoned btrfs does not support fallocate/punch hole, so fstrim on the
> loop device cannot free space in the backing file and the test cannot
> work.
>
> Skip the test on filesystems that do not support "fpunch"
Shouldn't _require_fstrim return false for zoned btrfs given that
trimming makes zero sense? Otherwise once zoned btrfs at some point
supports fpunch (which it really should), this starts breaking again.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v2 4/5] btrfs/284: skip on zoned devices
2026-08-19 13:16 ` [PATCH v2 4/5] btrfs/284: skip on zoned devices Johannes Thumshirn
@ 2026-08-21 5:39 ` Christoph Hellwig
0 siblings, 0 replies; 10+ messages in thread
From: Christoph Hellwig @ 2026-08-21 5:39 UTC (permalink / raw)
To: Johannes Thumshirn; +Cc: Zorro Lang, fstests, linux-btrfs
On Wed, Aug 19, 2026 at 03:16:04PM +0200, Johannes Thumshirn wrote:
> Incremental send stream v2 uses fallocate(PUNCH_HOLE) to represent
> holes, which btrfs receive replays. Zoned btrfs rejects all fallocate
> modes, so receiving a stream with holes fails. Skip on zoned devices.
The requirement looks fine:
Reviewed-by: Christoph Hellwig <hch@lst.de>
But isn't not supporting standard send/recv a pretty big limitation?
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-08-21 5:39 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 13:16 [PATCH v2 0/5] fstests: misc fixes for zoned btrfs Johannes Thumshirn
2026-08-19 13:16 ` [PATCH v2 1/5] common/btrfs: fix awk field separator in _check_temp_fsid Johannes Thumshirn
2026-08-21 5:36 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 2/5] btrfs/199: skip on zoned devices Johannes Thumshirn
2026-08-21 5:37 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 3/5] generic/746: skip on zoned btrfs Johannes Thumshirn
2026-08-21 5:38 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 4/5] btrfs/284: skip on zoned devices Johannes Thumshirn
2026-08-21 5:39 ` Christoph Hellwig
2026-08-19 13:16 ` [PATCH v2 5/5] generic/781: fix copyright Johannes Thumshirn
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox