Message ID | 20201001101531.333879-3-shinichiro.kawasaki@wdc.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | Support max_active_zones | expand |
On 01/10/2020 12:15, Shin'ichiro Kawasaki wrote: > 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. What happens if I use a fio version that does not have the --max_open_zones option defined?
On Oct 01, 2020 / 10:25, Johannes Thumshirn wrote: > On 01/10/2020 12:15, Shin'ichiro Kawasaki wrote: > > 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. > > What happens if I use a fio version that does not have the --max_open_zones > option defined? The option --max_open_zones was introduced to fio together with zonemode=zbd, since the beginning of fio's zoned block device support. If the test target device is a zoned block device, the test case block/004 checks that fio supports zonemode=zbd. I think this check is valid for --max_open_zones also.
On 01/10/2020 12:41, Shinichiro Kawasaki wrote: > The option --max_open_zones was introduced to fio together with zonemode=zbd, > since the beginning of fio's zoned block device support. If the test target > device is a zoned block device, the test case block/004 checks that fio > supports zonemode=zbd. I think this check is valid for --max_open_zones also. > OK thanks for clarifying, Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
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" }
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(-)