Change iolog overlap assert to a debug dump
authorJens Axboe <axboe@kernel.dk>
Fri, 10 Feb 2012 20:58:46 +0000 (21:58 +0100)
committerJens Axboe <axboe@kernel.dk>
Fri, 10 Feb 2012 20:58:46 +0000 (21:58 +0100)
Signed-off-by: Jens Axboe <axboe@kernel.dk>
iolog.c

diff --git a/iolog.c b/iolog.c
index 1d61ba2..c1764ba 100644 (file)
--- a/iolog.c
+++ b/iolog.c
@@ -176,6 +176,12 @@ void prune_io_piece_log(struct thread_data *td)
        }
 }
 
+static void dump_ipo(struct io_piece *ipo, const char *msg)
+{
+       printf("%s\n", msg);
+       printf("\toffset %llu, len %lu, fl %x, ddir %d\n", ipo->offset, ipo->len, ipo->flags, ipo->ddir);
+}
+
 /*
  * log a successful write, so we can unwind the log for verify
  */
@@ -239,7 +245,12 @@ restart:
                else if (ipo->offset > __ipo->offset)
                        p = &(*p)->rb_right;
                else {
-                       assert(ipo->len == __ipo->len);
+                       if (ipo->len != __ipo->len) {
+                               log_err("fio: unexpected ipo overlap!\n");
+                               log_err("fio: please report this issue.\n");
+                               dump_ipo(ipo, "ipo");
+                               dump_ipo(__ipo, "__ipo");
+                       }
                        td->io_hist_len--;
                        rb_erase(parent, &td->io_hist_tree);
                        remove_trim_entry(td, __ipo);