The block size must be smaller than the zone length, otherwise fio will fail immediately. Signed-off-by: Sean Anderson <seanga2@xxxxxxxxx> --- 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