Skip to content

Commit 362ce03

Browse files
committed
zbd: Make an error message more detailed
Knowing which part of a zone report is invalid is useful when debugging firmware of zoned devices. Hence report the number of zones that have been parsed successfully when reporting a report zones error. Signed-off-by: Bart Van Assche <bvanassche@acm.org>
1 parent c99367f commit 362ce03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

zbd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,8 @@ static int zbd_report_zones(struct thread_data *td, struct fio_file *f,
213213
ret = blkzoned_report_zones(td, f, offset, zones, nr_zones);
214214
if (ret < 0) {
215215
td_verror(td, errno, "report zones failed");
216-
log_err("%s: report zones from sector %"PRIu64" failed (%d).\n",
217-
f->file_name, offset >> 9, errno);
216+
log_err("%s: report zones from sector %"PRIu64" failed (nr_zones=%d; errno=%d).\n",
217+
f->file_name, offset >> 9, nr_zones, errno);
218218
} else if (ret == 0) {
219219
td_verror(td, errno, "Empty zone report");
220220
log_err("%s: report zones from sector %"PRIu64" is empty.\n",

0 commit comments

Comments
 (0)