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@wdc.com>
}
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() {
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)")