[PATCH blktests] block/004: reset zones of TEST_DEV before fio operation

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

 



When test target is a zoned block device with max_active_zones limit
larger than max_open_zones, fio write operation may fail depending on
zone conditions. To avoid the failure, reset zones of the device before
the fio run.

Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@xxxxxxx>
---
 tests/block/004 | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/block/004 b/tests/block/004
index 63484a4..52a260f 100755
--- a/tests/block/004
+++ b/tests/block/004
@@ -15,7 +15,10 @@ requires() {
 }
 
 device_requires() {
-	! _test_dev_is_zoned || _have_fio_zbd_zonemode
+	if _test_dev_is_zoned; then
+		_have_fio_zbd_zonemode
+		_have_program blkzone
+	fi
 }
 
 test_device() {
@@ -24,6 +27,7 @@ test_device() {
 	local -a opts=()
 
 	if _test_dev_is_zoned; then
+		blkzone reset "$TEST_DEV"
 		_test_dev_set_scheduler deadline
 		opts+=("--direct=1" "--zonemode=zbd")
 		opts+=("--max_open_zones=$(_test_dev_max_open_active_zones)")
-- 
2.40.1




[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