Split mutex.c and .h each into three files
[fio.git] / debug.h
diff --git a/debug.h b/debug.h
index 68a5adca268e6b331433ffa58183c44b3b45ed67..b8718ddc225f894c68d981e50c4fd2bff5e85f83 100644 (file)
--- a/debug.h
+++ b/debug.h
@@ -31,14 +31,21 @@ extern unsigned int fio_debug_jobno, *fio_debug_jobp, *fio_warned;
 
 static inline bool fio_did_warn(unsigned int mask)
 {
-       if (!(*fio_warned & mask)) {
-               *fio_warned |= mask;
+       if (*fio_warned & mask)
                return true;
-       }
 
+       *fio_warned |= mask;
        return false;
 }
 
+enum {
+       FIO_WARN_ROOT_FLUSH     = 1,
+       FIO_WARN_VERIFY_BUF     = 2,
+       FIO_WARN_ZONED_BUG      = 4,
+       FIO_WARN_IOLOG_DROP     = 8,
+       FIO_WARN_FADVISE        = 16,
+};
+
 #ifdef FIO_INC_DEBUG
 struct debug_level {
        const char *name;
@@ -46,7 +53,7 @@ struct debug_level {
        unsigned long shift;
        unsigned int jobno;
 };
-extern struct debug_level debug_levels[];
+extern const struct debug_level debug_levels[];
 
 extern unsigned long fio_debug;