diff options
Diffstat (limited to 'fs/ocfs2/cluster/masklog.h')
-rw-r--r-- | fs/ocfs2/cluster/masklog.h | 105 |
1 files changed, 17 insertions, 88 deletions
diff --git a/fs/ocfs2/cluster/masklog.h b/fs/ocfs2/cluster/masklog.h index 34d6544357d9..baa2b9ef7eef 100644 --- a/fs/ocfs2/cluster/masklog.h +++ b/fs/ocfs2/cluster/masklog.h | |||
@@ -82,41 +82,23 @@ | |||
82 | 82 | ||
83 | /* bits that are frequently given and infrequently matched in the low word */ | 83 | /* bits that are frequently given and infrequently matched in the low word */ |
84 | /* NOTE: If you add a flag, you need to also update masklog.c! */ | 84 | /* NOTE: If you add a flag, you need to also update masklog.c! */ |
85 | #define ML_ENTRY 0x0000000000000001ULL /* func call entry */ | 85 | #define ML_TCP 0x0000000000000001ULL /* net cluster/tcp.c */ |
86 | #define ML_EXIT 0x0000000000000002ULL /* func call exit */ | 86 | #define ML_MSG 0x0000000000000002ULL /* net network messages */ |
87 | #define ML_TCP 0x0000000000000004ULL /* net cluster/tcp.c */ | 87 | #define ML_SOCKET 0x0000000000000004ULL /* net socket lifetime */ |
88 | #define ML_MSG 0x0000000000000008ULL /* net network messages */ | 88 | #define ML_HEARTBEAT 0x0000000000000008ULL /* hb all heartbeat tracking */ |
89 | #define ML_SOCKET 0x0000000000000010ULL /* net socket lifetime */ | 89 | #define ML_HB_BIO 0x0000000000000010ULL /* hb io tracing */ |
90 | #define ML_HEARTBEAT 0x0000000000000020ULL /* hb all heartbeat tracking */ | 90 | #define ML_DLMFS 0x0000000000000020ULL /* dlm user dlmfs */ |
91 | #define ML_HB_BIO 0x0000000000000040ULL /* hb io tracing */ | 91 | #define ML_DLM 0x0000000000000040ULL /* dlm general debugging */ |
92 | #define ML_DLMFS 0x0000000000000080ULL /* dlm user dlmfs */ | 92 | #define ML_DLM_DOMAIN 0x0000000000000080ULL /* dlm domain debugging */ |
93 | #define ML_DLM 0x0000000000000100ULL /* dlm general debugging */ | 93 | #define ML_DLM_THREAD 0x0000000000000100ULL /* dlm domain thread */ |
94 | #define ML_DLM_DOMAIN 0x0000000000000200ULL /* dlm domain debugging */ | 94 | #define ML_DLM_MASTER 0x0000000000000200ULL /* dlm master functions */ |
95 | #define ML_DLM_THREAD 0x0000000000000400ULL /* dlm domain thread */ | 95 | #define ML_DLM_RECOVERY 0x0000000000000400ULL /* dlm master functions */ |
96 | #define ML_DLM_MASTER 0x0000000000000800ULL /* dlm master functions */ | 96 | #define ML_DLM_GLUE 0x0000000000000800ULL /* ocfs2 dlm glue layer */ |
97 | #define ML_DLM_RECOVERY 0x0000000000001000ULL /* dlm master functions */ | 97 | #define ML_VOTE 0x0000000000001000ULL /* ocfs2 node messaging */ |
98 | #define ML_AIO 0x0000000000002000ULL /* ocfs2 aio read and write */ | 98 | #define ML_CONN 0x0000000000002000ULL /* net connection management */ |
99 | #define ML_JOURNAL 0x0000000000004000ULL /* ocfs2 journalling functions */ | 99 | #define ML_QUORUM 0x0000000000004000ULL /* net connection quorum */ |
100 | #define ML_DISK_ALLOC 0x0000000000008000ULL /* ocfs2 disk allocation */ | 100 | #define ML_BASTS 0x0000000000008000ULL /* dlmglue asts and basts */ |
101 | #define ML_SUPER 0x0000000000010000ULL /* ocfs2 mount / umount */ | 101 | #define ML_CLUSTER 0x0000000000010000ULL /* cluster stack */ |
102 | #define ML_FILE_IO 0x0000000000020000ULL /* ocfs2 file I/O */ | ||
103 | #define ML_EXTENT_MAP 0x0000000000040000ULL /* ocfs2 extent map caching */ | ||
104 | #define ML_DLM_GLUE 0x0000000000080000ULL /* ocfs2 dlm glue layer */ | ||
105 | #define ML_BH_IO 0x0000000000100000ULL /* ocfs2 buffer I/O */ | ||
106 | #define ML_UPTODATE 0x0000000000200000ULL /* ocfs2 caching sequence #'s */ | ||
107 | #define ML_NAMEI 0x0000000000400000ULL /* ocfs2 directory / namespace */ | ||
108 | #define ML_INODE 0x0000000000800000ULL /* ocfs2 inode manipulation */ | ||
109 | #define ML_VOTE 0x0000000001000000ULL /* ocfs2 node messaging */ | ||
110 | #define ML_DCACHE 0x0000000002000000ULL /* ocfs2 dcache operations */ | ||
111 | #define ML_CONN 0x0000000004000000ULL /* net connection management */ | ||
112 | #define ML_QUORUM 0x0000000008000000ULL /* net connection quorum */ | ||
113 | #define ML_EXPORT 0x0000000010000000ULL /* ocfs2 export operations */ | ||
114 | #define ML_XATTR 0x0000000020000000ULL /* ocfs2 extended attributes */ | ||
115 | #define ML_QUOTA 0x0000000040000000ULL /* ocfs2 quota operations */ | ||
116 | #define ML_REFCOUNT 0x0000000080000000ULL /* refcount tree operations */ | ||
117 | #define ML_BASTS 0x0000000100000000ULL /* dlmglue asts and basts */ | ||
118 | #define ML_RESERVATIONS 0x0000000200000000ULL /* ocfs2 alloc reservations */ | ||
119 | #define ML_CLUSTER 0x0000000400000000ULL /* cluster stack */ | ||
120 | 102 | ||
121 | /* bits that are infrequently given and frequently matched in the high word */ | 103 | /* bits that are infrequently given and frequently matched in the high word */ |
122 | #define ML_ERROR 0x1000000000000000ULL /* sent to KERN_ERR */ | 104 | #define ML_ERROR 0x1000000000000000ULL /* sent to KERN_ERR */ |
@@ -124,7 +106,6 @@ | |||
124 | #define ML_KTHREAD 0x4000000000000000ULL /* kernel thread activity */ | 106 | #define ML_KTHREAD 0x4000000000000000ULL /* kernel thread activity */ |
125 | 107 | ||
126 | #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE) | 108 | #define MLOG_INITIAL_AND_MASK (ML_ERROR|ML_NOTICE) |
127 | #define MLOG_INITIAL_NOT_MASK (ML_ENTRY|ML_EXIT) | ||
128 | #ifndef MLOG_MASK_PREFIX | 109 | #ifndef MLOG_MASK_PREFIX |
129 | #define MLOG_MASK_PREFIX 0 | 110 | #define MLOG_MASK_PREFIX 0 |
130 | #endif | 111 | #endif |
@@ -222,58 +203,6 @@ extern struct mlog_bits mlog_and_bits, mlog_not_bits; | |||
222 | mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ | 203 | mlog(ML_ERROR, "status = %lld\n", (long long)_st); \ |
223 | } while (0) | 204 | } while (0) |
224 | 205 | ||
225 | #if defined(CONFIG_OCFS2_DEBUG_MASKLOG) | ||
226 | #define mlog_entry(fmt, args...) do { \ | ||
227 | mlog(ML_ENTRY, "ENTRY:" fmt , ##args); \ | ||
228 | } while (0) | ||
229 | |||
230 | #define mlog_entry_void() do { \ | ||
231 | mlog(ML_ENTRY, "ENTRY:\n"); \ | ||
232 | } while (0) | ||
233 | |||
234 | /* | ||
235 | * We disable this for sparse. | ||
236 | */ | ||
237 | #if !defined(__CHECKER__) | ||
238 | #define mlog_exit(st) do { \ | ||
239 | if (__builtin_types_compatible_p(typeof(st), unsigned long)) \ | ||
240 | mlog(ML_EXIT, "EXIT: %lu\n", (unsigned long) (st)); \ | ||
241 | else if (__builtin_types_compatible_p(typeof(st), signed long)) \ | ||
242 | mlog(ML_EXIT, "EXIT: %ld\n", (signed long) (st)); \ | ||
243 | else if (__builtin_types_compatible_p(typeof(st), unsigned int) \ | ||
244 | || __builtin_types_compatible_p(typeof(st), unsigned short) \ | ||
245 | || __builtin_types_compatible_p(typeof(st), unsigned char)) \ | ||
246 | mlog(ML_EXIT, "EXIT: %u\n", (unsigned int) (st)); \ | ||
247 | else if (__builtin_types_compatible_p(typeof(st), signed int) \ | ||
248 | || __builtin_types_compatible_p(typeof(st), signed short) \ | ||
249 | || __builtin_types_compatible_p(typeof(st), signed char)) \ | ||
250 | mlog(ML_EXIT, "EXIT: %d\n", (signed int) (st)); \ | ||
251 | else if (__builtin_types_compatible_p(typeof(st), long long)) \ | ||
252 | mlog(ML_EXIT, "EXIT: %lld\n", (long long) (st)); \ | ||
253 | else \ | ||
254 | mlog(ML_EXIT, "EXIT: %llu\n", (unsigned long long) (st)); \ | ||
255 | } while (0) | ||
256 | #else | ||
257 | #define mlog_exit(st) do { \ | ||
258 | mlog(ML_EXIT, "EXIT: %lld\n", (long long) (st)); \ | ||
259 | } while (0) | ||
260 | #endif | ||
261 | |||
262 | #define mlog_exit_ptr(ptr) do { \ | ||
263 | mlog(ML_EXIT, "EXIT: %p\n", ptr); \ | ||
264 | } while (0) | ||
265 | |||
266 | #define mlog_exit_void() do { \ | ||
267 | mlog(ML_EXIT, "EXIT\n"); \ | ||
268 | } while (0) | ||
269 | #else | ||
270 | #define mlog_entry(...) do { } while (0) | ||
271 | #define mlog_entry_void(...) do { } while (0) | ||
272 | #define mlog_exit(...) do { } while (0) | ||
273 | #define mlog_exit_ptr(...) do { } while (0) | ||
274 | #define mlog_exit_void(...) do { } while (0) | ||
275 | #endif /* defined(CONFIG_OCFS2_DEBUG_MASKLOG) */ | ||
276 | |||
277 | #define mlog_bug_on_msg(cond, fmt, args...) do { \ | 206 | #define mlog_bug_on_msg(cond, fmt, args...) do { \ |
278 | if (cond) { \ | 207 | if (cond) { \ |
279 | mlog(ML_ERROR, "bug expression: " #cond "\n"); \ | 208 | mlog(ML_ERROR, "bug expression: " #cond "\n"); \ |