All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
To: linux-block@vger.kernel.org, Omar Sandoval <osandov@fb.com>
Cc: Omar Sandoval <osandov@osandov.com>,
	Damien Le Moal <Damien.LeMoal@wdc.com>,
	Johannes Thumshirn <johannes.thumshirn@wdc.com>,
	Chaitanya Kulkarni <Chaitanya.Kulkarni@wdc.com>,
	Shinichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Subject: [PATCH blktests 2/3] block/004: Provide max_active_zones to fio command
Date: Thu,  1 Oct 2020 19:15:30 +0900	[thread overview]
Message-ID: <20201001101531.333879-3-shinichiro.kawasaki@wdc.com> (raw)
In-Reply-To: <20201001101531.333879-1-shinichiro.kawasaki@wdc.com>

If the test target devices is a zoned block device with max_active_zones
limit, the fio command in block/004 opens zones beyond the limit and
fails with I/O errors.

To avoid the failure, pass the limit value to fio using --max_open_zones
option. This option, which was introduced to fio together with
zonemode=zbd, keeps the number of open zones within the specified value.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
---
 tests/block/004 | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/tests/block/004 b/tests/block/004
index d181725..6eff6ce 100755
--- a/tests/block/004
+++ b/tests/block/004
@@ -21,19 +21,18 @@ device_requires() {
 test_device() {
 	echo "Running ${TEST_NAME}"
 
-	local directio=""
-	local zbdmode=""
+	local -a opts=()
 
 	if _test_dev_is_zoned; then
 		_test_dev_queue_set scheduler deadline
-		directio="--direct=1"
-		zbdmode="--zonemode=zbd"
+		opts+=("--direct=1" "--zonemode=zbd")
+		opts+=("--max_open_zones=$(_test_dev_max_active_zones)")
 	fi
 
 	FIO_PERF_FIELDS=("write iops")
 	_fio_perf --bs=4k --rw=randwrite --norandommap --fsync=1 \
 		--number_ios=256 --numjobs=64 --name=flushes \
-		${directio} ${zbdmode} --filename="$TEST_DEV"
+		"${opts[@]}" --filename="$TEST_DEV"
 
 	echo "Test complete"
 }
-- 
2.26.2


  parent reply	other threads:[~2020-10-01 10:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-01 10:15 [PATCH blktests 0/3] Support max_active_zones Shin'ichiro Kawasaki
2020-10-01 10:15 ` [PATCH blktests 1/3] common/rc: Add _test_dev_max_active_zones() helper function Shin'ichiro Kawasaki
2020-10-01 10:26   ` Johannes Thumshirn
2020-10-01 10:15 ` Shin'ichiro Kawasaki [this message]
2020-10-01 10:25   ` [PATCH blktests 2/3] block/004: Provide max_active_zones to fio command Johannes Thumshirn
2020-10-01 10:41     ` Shinichiro Kawasaki
2020-10-01 10:43       ` Johannes Thumshirn
2020-10-01 10:15 ` [PATCH blktests 3/3] zbd/003: Reset zones when the test device has max_active_zones limit Shin'ichiro Kawasaki

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=20201001101531.333879-3-shinichiro.kawasaki@wdc.com \
    --to=shinichiro.kawasaki@wdc.com \
    --cc=Chaitanya.Kulkarni@wdc.com \
    --cc=Damien.LeMoal@wdc.com \
    --cc=johannes.thumshirn@wdc.com \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    --cc=osandov@osandov.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.