[PATCH blktests 2/3] block/004: Provide max_active_zones to fio command

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxx>
---
 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




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux