From: Dmitry Fomichev Date: Tue, 6 Feb 2024 10:57:52 +0000 (+0900) Subject: oslib: log BLKREPORTZONE error code X-Git-Tag: fio-3.37~55 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=db46d820d092aebd345b340c526b9dcbabc76748;p=fio.git oslib: log BLKREPORTZONE error code BLKREPORTZONE may fail because of a variety of reasons. Log both the return code and errno when this ioctl fails. Signed-off-by: Dmitry Fomichev Reviewed-by: Shin'ichiro Kawasaki Tested-by: Shin'ichiro Kawasaki Link: https://lore.kernel.org/r/20240206105755.214891-3-dmitry.fomichev@wdc.com Signed-off-by: Vincent Fu --- diff --git a/oslib/linux-blkzoned.c b/oslib/linux-blkzoned.c index 2c3ecf33..1cc8d288 100644 --- a/oslib/linux-blkzoned.c +++ b/oslib/linux-blkzoned.c @@ -242,6 +242,8 @@ int blkzoned_report_zones(struct thread_data *td, struct fio_file *f, hdr->sector = offset >> 9; ret = ioctl(fd, BLKREPORTZONE, hdr); if (ret) { + log_err("%s: BLKREPORTZONE ioctl failed, ret=%d, err=%d.\n", + f->file_name, ret, -errno); ret = -errno; goto out; }