[PATCH v2 2/5] btrfs/199: skip on zoned devices

Johannes Thumshirn <[email protected]>
Newsgroups org.kernel.vger.linux-btrfs,org.kernel.vger.fstests
Message-ID <[email protected]>
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 <[email protected]>
---
 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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.