t/zbd: Use max_open_zones that fio fetched from device
authorShin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Fri, 4 Jun 2021 11:32:50 +0000 (20:32 +0900)
committerJens Axboe <axboe@kernel.dk>
Tue, 8 Jun 2021 21:15:54 +0000 (15:15 -0600)
commite1315822835ceaa976a2b8ac6a74ce7bb46b079f
treece6169ef00f6f18604c185b9aaa4cdf4bc693b3a
parentd7a28031718d281f1b9ea593c8a3f395761510ca
t/zbd: Use max_open_zones that fio fetched from device

Recent commit d2f442bc0bd5 ("ioengines: add get_max_open_zones zoned
block device operation") modified fio to compare --max_open_zones option
value and max_open_zones reported by the device. The device limit is
fetched through sysfs or through an ioengine specific implementation.

The test script currently try to fetch the max open zones limit using
libzbc tools or sg_inq. If either of these fail, default value 128 is
supplied. This default value can be too high when the test script is
run for certain zoned block devices, and can therefore result in fio
error and test case failure.

To avoid the failure, modify the default value used in the test script
from 128 to 0. With this, --max_open_zones=0 is passed to fio, and it
makes fio use the max_open_zones reported by the device. Also add
comments to describe why the test script gets max_open_zones with tools.

Reviewed-by: Niklas Cassel <niklas.cassel@wdc.com>
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
t/zbd/functions