From c9b440312ff63c2b4c8548530f24c2eb5820b6a3 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Fri, 18 Jun 2010 14:46:06 +0200 Subject: [PATCH] Error reporting fixups for meta/pattern verifies Signed-off-by: Jens Axboe --- verify.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/verify.c b/verify.c index bb0aba77..a1479d12 100644 --- a/verify.c +++ b/verify.c @@ -513,9 +513,10 @@ int verify_io_u(struct thread_data *td, struct io_u *io_u) hdr = p; if (hdr->fio_magic != FIO_HDR_MAGIC) { - log_err("Bad verify header %x at %llu\n", - hdr->fio_magic, - io_u->offset + hdr_num * hdr->len); + log_err("verify: bad magic header %x, wanted %x at file %s offset %llu, length %u\n", + hdr->fio_magic, FIO_HDR_MAGIC, + io_u->file->file_name, + io_u->offset + hdr_num * hdr->len, hdr->len); return EILSEQ; } @@ -527,16 +528,19 @@ int verify_io_u(struct thread_data *td, struct io_u *io_u) p + hdr_size, hdr_inc - hdr_size, hdr_size % td->o.verify_pattern_bytes); + + if (ret) { + log_err("pattern: verify failed at file %s offset %llu, length %u\n", + io_u->file->file_name, + io_u->offset + hdr_num * hdr->len, + hdr->len); + } + /* * Also verify the meta data, if applicable */ if (hdr->verify_type == VERIFY_META) ret |= verify_io_u_meta(hdr, td, &vc); - - if (ret) - log_err("fio: verify failed at %llu/%u\n", - io_u->offset + hdr_num * hdr->len, - hdr->len); continue; } -- 2.25.1