A bunch of fixes
[fio.git] / fio.h
diff --git a/fio.h b/fio.h
index 7c39be323f2a193c0b460213059f9545838047eb..b21ec18d787821dbefb4c2b9987b1de9bf236c93 100644 (file)
--- a/fio.h
+++ b/fio.h
@@ -184,7 +184,6 @@ enum {
        VERIFY_SHA256,                  /* sha256 sum data blocks */
        VERIFY_SHA512,                  /* sha512 sum data blocks */
        VERIFY_META,                    /* block_num, timestamp etc. */
-       VERIFY_PATTERN,                 /* verify a specific pattern */
        VERIFY_NULL,                    /* pretend to verify */
 };
 
@@ -973,4 +972,30 @@ static inline void clear_error(struct thread_data *td)
        td->verror[0] = '\0';
 }
 
+enum {
+       FD_PROCESS      = 1 << 0,
+       FD_FILE         = 1 << 1,
+       FD_IO           = 1 << 2,
+       FD_MEM          = 1 << 3,
+};
+
+extern unsigned long fio_debug;
+#define dprint(type, str, args...)             \
+       do {                                    \
+               if (((type) & fio_debug) == 0)  \
+                       break;                  \
+               log_info(str, ##args);          \
+       } 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