Skip to contentSkip to conversation

run loop device based tests on zoned devices

PATCH In review Christoph Hellwig 2 participants 3 messages Dec 10, 2024 Btrfs file system

lore
Share & tools
lore
#0 lore raw

Hi all,

currently _require_loop skips zoned devices, which is a bit odd as loop devices run perfectly fine any file systems. There is one test that runs a loop device on top of a block device, so that is excluded for zoned devices specifically instead.

Note that with this zoned btrfs this now fails btrfs/199, which is a bit odd as the test only operates on a loopback file that shouldn't be affected by using a zoned file systems. It would be great if the btrfs folks could try to help me to understand why and either skip it for zoned file systems with a good explanation or skip it.

#1 lore raw

PATCH 1/1 common: loop device work on zoned file systems

Remove the call to _require_non_zoned_device from _require_loop because there is nothing that prevents loop device to work on file systems on zoned devices. But loop devices are not supported directly on top of zoned block devices, so add a _require_non_zoned_device to generic/563 to not run that test on zoned block devices.

---
 common/rc         | 3 ---
 tests/generic/563 | 4 ++++
 2 files changed, 4 insertions(+), 3 deletions(-)
common/rc +0 -3
index b3ea55a7fb5c..5ef5038a6d23 100644
@@ -2269,9 +2269,6 @@ _require_loop()
     else
 	_notrun "This test requires loopback device support"
     fi
-
-    # loop device does not handle zone information
-    _require_non_zoned_device ${TEST_DEV}
 }
 
 # this test requires kernel support for a secondary filesystem
tests/generic/563 +4 -0
index 2056470df825..95a928fba562 100755
@@ -38,6 +38,10 @@ _require_loop
 # cgroup v2 writeback is only support on block devices so far
 _require_block_device $SCRATCH_DEV
 
+# this test creates a loop device on the scratch block device, which is not
+# supported on zoned devices
+_require_non_zoned_device ${SCRATCH_DEV}
+
 cgdir=$CGROUP2_PATH
 iosize=$((1024 * 1024 * 8))
 
Signature · 1 line
2.45.2