FS/XFS testing framework
 help / color / mirror / Atom feed
* [PATCH 1/2] common/zoned: allow setting the zloop device capacity and extra parameters
@ 2026-11-09 17:51 Johannes Thumshirn
  2026-11-09 17:51 ` [PATCH 2/2] btrfs: test active zone reservation with metadata on conventional zones Johannes Thumshirn
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Johannes Thumshirn @ 2026-11-09 17:51 UTC (permalink / raw)
  To: Zorro Lang
  Cc: Christoph Hellwig, Naohiro Aota, linux-btrfs, fstests,
	Johannes Thumshirn

Add optional fourth and fifth arguments to _create_zloop() so tests can
size the backing device, which matters when the backing files share a
filesystem with the test data, and pass additional zloop parameters.

Signed-off-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
---
 common/zoned | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/common/zoned b/common/zoned
index 89d0a061..7fe794f9 100644
--- a/common/zoned
+++ b/common/zoned
@@ -81,9 +81,17 @@ _create_zloop()
         local conv_zones=",conv_zones=$3"
     fi
 
+    if [ -n "$4" ]; then
+        local capacity=",capacity_mb=$4"
+    fi
+
+    if [ -n "$5" ]; then
+        local extra=",$5"
+    fi
+
     mkdir -p "$zloop_base/$id"
 
-    local zloop_args="add id=$id,base_dir=$zloop_base$zone_size$conv_zones"
+    local zloop_args="add id=$id,base_dir=$zloop_base$zone_size$conv_zones$capacity$extra"
 
     echo "$zloop_args" > /dev/zloop-control || \
         _fail "cannot create zloop device"
-- 
2.56.0


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

end of thread, other threads:[~2026-11-11 16:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-09 17:51 [PATCH 1/2] common/zoned: allow setting the zloop device capacity and extra parameters Johannes Thumshirn
2026-11-09 17:51 ` [PATCH 2/2] btrfs: test active zone reservation with metadata on conventional zones Johannes Thumshirn
2026-11-11 10:18 ` [PATCH 1/2] common/zoned: allow setting the zloop device capacity and extra parameters Carlos Maiolino
2026-11-11 16:40 ` Christoph Hellwig

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox