From 1f5dd7fa0f2425b5c21ce2fbe2944a57df462632 Mon Sep 17 00:00:00 2001 From: Shin'ichiro Kawasaki Date: Wed, 13 Oct 2021 15:09:01 +0900 Subject: [PATCH] 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 --- t/zbd/test-zbd-support | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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}") -- 2.25.1