Skip to content

Commit

Permalink
t/zbd: test write zone accounting of almost full zones
Browse files Browse the repository at this point in the history
Recent commit fixed the bug of the write zone accounting for almost full
zones. Add a test case which confirms the fix.

Signed-off-by: Shin'ichiro Kawasaki <[email protected]>
Signed-off-by: Vincent Fu <[email protected]>
  • Loading branch information
kawasaki authored and vincentkfu committed Jun 8, 2023
1 parent 5b4c9c4 commit 2495bcd
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions t/zbd/test-zbd-support
Original file line number Diff line number Diff line change
Expand Up @@ -1368,6 +1368,27 @@ test63() {
check_reset_count -eq 3 || return $?
}

# Test write zone accounting handles almost full zones correctly. Prepare an
# almost full, but not full zone. Write to the zone with verify using larger
# block size. Then confirm fio does not report write zone accounting failure.
test64() {
local bs cap

[ -n "$is_zbd" ] && reset_zone "$dev" -1

bs=$((zone_size / 8))
cap=$(total_zone_capacity 1 $((first_sequential_zone_sector*512)) $dev)
run_fio_on_seq "$(ioengine "psync")" --rw=write --bs="$bs" \
--size=$((zone_size)) \
--io_size=$((cap - bs)) \
>> "${logfile}.${test_number}" 2>&1 || return $?

bs=$((zone_size / 2))
run_fio_on_seq "$(ioengine "psync")" --rw=write --bs="$bs" \
--size=$((zone_size)) --do_verify=1 --verify=md5 \
>> "${logfile}.${test_number}" 2>&1 || return $?
}

SECONDS=0
tests=()
dynamic_analyzer=()
Expand Down

0 comments on commit 2495bcd

Please sign in to comment.