A bunch of fixes
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 2daeb2a63067ab4d85df59c9228cf4ae3ec2584e..b21ec18d787821dbefb4c2b9987b1de9bf236c93 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -984,7 +984,18 @@ extern unsigned long fio_debug;
        do {                                    \
                if (((type) & fio_debug) == 0)  \
                        break;                  \
        do {                                    \
                if (((type) & fio_debug) == 0)  \
                        break;                  \
-               printf(str, ##args);            \
+               log_info(str, ##args);          \
        } while (0)
 
        } while (0)
 
+static inline void dprint_io_u(struct io_u *io_u, const char *p)
+{
+       struct fio_file *f = io_u->file;
+
+       dprint(FD_IO, "%s: io_u %p: off=%llu/len=%lu/ddir=%d", p, io_u,
+                                       io_u->offset, io_u->buflen, io_u->ddir);
+       if (f)
+               dprint(FD_IO, "/%s", f->file_name);
+       dprint(FD_IO, "\n");
+}
+
 #endif
 #endif