public inbox for linux-block@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH blktests] zbd/005: Limit block size to zone length
@ 2025-04-23 16:49 Sean Anderson
  2025-04-24  8:09 ` Christoph Hellwig
  0 siblings, 1 reply; 12+ messages in thread
From: Sean Anderson @ 2025-04-23 16:49 UTC (permalink / raw)
  To: Shin'ichiro Kawasaki, linux-block; +Cc: Sean Anderson

The block size must be smaller than the zone length, otherwise fio will
fail immediately.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
---

 tests/zbd/005 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/zbd/005 b/tests/zbd/005
index 4aa1ab5..3e1ded9 100755
--- a/tests/zbd/005
+++ b/tests/zbd/005
@@ -29,6 +29,7 @@ test_device() {
 	local -i zone_idx
 	local -i offset
 	local -i moaz
+	local -i block_size
 	local -a zbdmode=()
 
 	echo "Running ${TEST_NAME}"
@@ -38,6 +39,8 @@ test_device() {
 	zone_idx=$(_find_first_sequential_zone) || return $?
 	offset=$((ZONE_STARTS[zone_idx] * 512))
 	moaz=$(_test_dev_max_open_active_zones)
+	block_size=$(((ZONE_LENGTHS[zone_idx] > 512 ? \
+		       512 : ZONE_LENGTHS[zone_idx]) * 512))
 
 	# If the test target zone has smaller zone capacity than zone size,
 	# or if the test target device has max open/active zones limit, enable
@@ -53,7 +56,7 @@ test_device() {
 	: "${TIMEOUT:=30}"
 	FIO_PERF_FIELDS=("write io" "write iops")
 	_fio_perf --filename="${TEST_DEV}" --name zbdwo --rw=write --direct=1 \
-		  --ioengine=libaio --iodepth=128 --bs=256k \
+		  --ioengine=libaio --iodepth=128 --bs="${block_size}" \
 		  --offset="${offset}" "${zbdmode[@]}"
 
 	_put_blkzone_report
-- 
2.37.1


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

end of thread, other threads:[~2025-04-27  3:23 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-23 16:49 [PATCH blktests] zbd/005: Limit block size to zone length Sean Anderson
2025-04-24  8:09 ` Christoph Hellwig
2025-04-24 11:30   ` Shinichiro Kawasaki
2025-04-24 13:56     ` Sean Anderson
2025-04-24 14:06       ` hch
2025-04-24 14:20         ` Sean Anderson
2025-04-24 14:23           ` hch
2025-04-25  4:04             ` Sean Anderson
2025-04-25 13:47               ` hch
2025-04-26  5:23                 ` Sean Anderson
2025-04-27  3:23                   ` Keith Busch
2025-04-25  2:37     ` Damien Le Moal

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