public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: cem@kernel.org
To: zlang@kernel.org
Cc: hch@lst.de, hans.holmberg@wdc.com, johannes.thumshirn@wdc.com,
	fstests@vger.kernel.org, linux-xfs@vger.kernel.org
Subject: [PATCH 1/2] common/zoned: enable passing a custom capacity
Date: Thu, 20 Nov 2025 17:08:29 +0100	[thread overview]
Message-ID: <20251120160901.63810-2-cem@kernel.org> (raw)
In-Reply-To: <20251120160901.63810-1-cem@kernel.org>

From: Carlos Maiolino <cem@kernel.org>

Extend _create_zloop() to accept a custom zone capacity.

Signed-off-by: Carlos Maiolino <cmaiolino@redhat.com>
---
 common/zoned | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/common/zoned b/common/zoned
index 88b81de5db4d..51c011b247d2 100644
--- a/common/zoned
+++ b/common/zoned
@@ -61,7 +61,7 @@ _find_next_zloop()
 }
 
 # Create a zloop device
-# usage: _create_zloop <base_dir> <zone_size> <nr_conv_zones>
+# usage: _create_zloop <base_dir> <zone_size> <nr_conv_zones> <zone_capacity>
 _create_zloop()
 {
     local id="$(_find_next_zloop)"
@@ -80,9 +80,13 @@ _create_zloop()
         local conv_zones=",conv_zones=$3"
     fi
 
+    if [ -n "$4" ]; then
+	local zone_capacity=",zone_capacity_mb=$4"
+    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$zone_capacity"
 
     echo "$zloop_args" > /dev/zloop-control || \
         _fail "cannot create zloop device"
-- 
2.51.1


  reply	other threads:[~2025-11-20 16:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-20 16:08 [PATCH 0/2] xfs: add regression test for small zone capacity cem
2025-11-20 16:08 ` cem [this message]
2025-11-21  6:46   ` [PATCH 1/2] common/zoned: enable passing a custom capacity Johannes Thumshirn
2025-11-21  6:50   ` Christoph Hellwig
2025-11-22  7:41   ` Zorro Lang
2025-11-20 16:08 ` [PATCH 2/2] xfs: Add test for mkfs with smaller zone capacity cem
2025-11-21  6:51   ` Christoph Hellwig
2025-11-21  6:51   ` Johannes Thumshirn
2025-11-21  6:57     ` hch
2025-11-21  7:00       ` Johannes Thumshirn
2025-11-21  8:34         ` Hans Holmberg
2025-11-24 15:27     ` Carlos Maiolino
2025-11-24 17:31       ` Johannes Thumshirn
2025-11-24 17:34         ` hch
2025-11-25 13:01         ` Carlos Maiolino
2025-11-22  8:36   ` Zorro Lang
2025-11-24 16:04     ` Carlos Maiolino

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251120160901.63810-2-cem@kernel.org \
    --to=cem@kernel.org \
    --cc=fstests@vger.kernel.org \
    --cc=hans.holmberg@wdc.com \
    --cc=hch@lst.de \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=zlang@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox