summaryrefslogtreecommitdiff
path: root/zbd.c
diff options
context:
space:
mode:
Diffstat (limited to 'zbd.c')
-rw-r--r--zbd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/zbd.c b/zbd.c
index 019eaf62..a3c1ff9a 100644
--- a/zbd.c
+++ b/zbd.c
@@ -526,8 +526,9 @@ static int parse_zone_info(struct thread_data *td, struct fio_file *f)
offset = z->start + z->len;
if (j >= nr_zones)
break;
- nrz = zbd_report_zones(td, f, offset,
- zones, ZBD_REPORT_MAX_ZONES);
+ nrz = zbd_report_zones(td, f, offset, zones,
+ min((uint32_t)(nr_zones - j),
+ ZBD_REPORT_MAX_ZONES));
if (nrz < 0) {
ret = nrz;
log_info("fio: report zones (offset %llu) failed for %s (%d).\n",