From: Shin'ichiro Kawasaki Date: Wed, 13 Oct 2021 06:09:01 +0000 (+0900) Subject: t/zbd: Do not use too large block size in test case #4 X-Git-Tag: fio-3.29~56 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=1f5dd7fa0f2425b5c21ce2fbe2944a57df462632;p=fio.git t/zbd: Do not use too large block size in test case #4 The test case #4 specifies zone size as block size to read a zone. For some devices, zone size is very large in GB order, then single pread64 system call can not complete the request. This makes the test case fail. To avoid the failure, keep the block size adequate. If zone size is too large, use logical_block_size * 256 as the block size. Signed-off-by: Shin'ichiro Kawasaki Reviewed-by: Niklas Cassel Link: https://lore.kernel.org/r/20211013060903.166543-4-shinichiro.kawasaki@wdc.com Signed-off-by: Jens Axboe --- diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index 5103c406..f9dc9001 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -310,7 +310,8 @@ test4() { off=$((first_sequential_zone_sector * 512 + 129 * zone_size)) size=$((zone_size)) [ -n "$is_zbd" ] && reset_zone "$dev" $((off / 512)) - opts+=("--name=$dev" "--filename=$dev" "--offset=$off" "--bs=$size") + opts+=("--name=$dev" "--filename=$dev" "--offset=$off") + opts+=(--bs="$(min $((logical_block_size * 256)) $size)") opts+=("--size=$size" "--thread=1" "--read_beyond_wp=1") opts+=("$(ioengine "psync")" "--rw=read" "--direct=1" "--disable_lat=1") opts+=("--zonemode=zbd" "--zonesize=${zone_size}")