+# 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 $?
+}
+