diff options
author | Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com> | 2024-04-30 19:30:22 +0900 |
---|---|---|
committer | Vincent Fu <vincent.fu@samsung.com> | 2024-04-30 11:11:58 -0400 |
commit | 3ed8eea0ee9b5d7de603e9b128e6c05941b99938 (patch) | |
tree | a28dfdbcffea494ec349bb0bacb5d14a747f4a25 | |
parent | 06eb4c1f131b667b0ffbaf167af34b5f04691554 (diff) | |
download | fio-3ed8eea0ee9b5d7de603e9b128e6c05941b99938.tar.gz |
The test case assumed that the test target devices have 128 or more
sequential write required zones and uses 128 as the minimum number of
zones to write. This caused failure when the devices had a smaller
number of sequential write required zones. To avoid the failure, count
the actual number of sequential write required zones and use it if it is
smaller than 128.
Signed-off-by: Shin'ichiro Kawasaki <shinichiro.kawasaki@wdc.com>
Link: https://lore.kernel.org/r/20240430103022.4136039-4-shinichiro.kawasaki@wdc.com
Signed-off-by: Vincent Fu <vincent.fu@samsung.com>
-rwxr-xr-x | t/zbd/test-zbd-support | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index ef98835cb..e0b2a7550 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -852,12 +852,15 @@ test31() { # To distribute the write target zones evenly, skip certain zones for every # write. Utilize zonemode strided for such write patterns. bs=$((128 * 1024)) + off=$((first_sequential_zone_sector * 512)) + size=$((disk_size - off)) nz=$((max_open_zones)) if [[ $nz -eq 0 ]]; then nz=128 fi - off=$((first_sequential_zone_sector * 512)) - size=$((disk_size - off)) + if ((size / zone_size < nz)); then + nz=$((size / zone_size)) + fi inc=$(((size / nz / zone_size) * zone_size)) opts=("--name=$dev" "--filename=$dev" "--rw=write" "--bs=${bs}") opts+=("--offset=$off" "--size=$((inc * nz))" "--io_size=$((bs * nz))") |