Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
masklog.h File Reference
#include <linux/sched.h>
#include <linux/kobject.h>
#include <linux/sysfs.h>

Go to the source code of this file.

Data Structures

struct  mlog_bits
 

Macros

#define ML_TCP   0x0000000000000001ULL /* net cluster/tcp.c */
 
#define ML_MSG   0x0000000000000002ULL /* net network messages */
 
#define ML_SOCKET   0x0000000000000004ULL /* net socket lifetime */
 
#define ML_HEARTBEAT   0x0000000000000008ULL /* hb all heartbeat tracking */
 
#define ML_HB_BIO   0x0000000000000010ULL /* hb io tracing */
 
#define ML_DLMFS   0x0000000000000020ULL /* dlm user dlmfs */
 
#define ML_DLM   0x0000000000000040ULL /* dlm general debugging */
 
#define ML_DLM_DOMAIN   0x0000000000000080ULL /* dlm domain debugging */
 
#define ML_DLM_THREAD   0x0000000000000100ULL /* dlm domain thread */
 
#define ML_DLM_MASTER   0x0000000000000200ULL /* dlm master functions */
 
#define ML_DLM_RECOVERY   0x0000000000000400ULL /* dlm master functions */
 
#define ML_DLM_GLUE   0x0000000000000800ULL /* ocfs2 dlm glue layer */
 
#define ML_VOTE   0x0000000000001000ULL /* ocfs2 node messaging */
 
#define ML_CONN   0x0000000000002000ULL /* net connection management */
 
#define ML_QUORUM   0x0000000000004000ULL /* net connection quorum */
 
#define ML_BASTS   0x0000000000008000ULL /* dlmglue asts and basts */
 
#define ML_CLUSTER   0x0000000000010000ULL /* cluster stack */
 
#define ML_ERROR   0x1000000000000000ULL /* sent to KERN_ERR */
 
#define ML_NOTICE   0x2000000000000000ULL /* setn to KERN_NOTICE */
 
#define ML_KTHREAD   0x4000000000000000ULL /* kernel thread activity */
 
#define MLOG_INITIAL_AND_MASK   (ML_ERROR|ML_NOTICE)
 
#define MLOG_MASK_PREFIX   0
 
#define ML_ALLOWED_BITS   (ML_ERROR|ML_NOTICE)
 
#define MLOG_MAX_BITS   64
 
#define __mlog_test_u64(mask, bits)   ((mask) & bits.words[0])
 
#define __mlog_set_u64(mask, bits)
 
#define __mlog_clear_u64(mask, bits)
 
#define MLOG_BITS_RHS(mask)   { { (mask) } }
 
#define __mlog_cpu_guess
 
#define __mlog_printk(level, fmt, args...)
 
#define mlog(mask, fmt, args...)
 
#define mlog_errno(st)
 
#define mlog_bug_on_msg(cond, fmt, args...)
 

Functions

int mlog_sys_init (struct kset *o2cb_subsys)
 
void mlog_sys_shutdown (void)
 

Variables

struct mlog_bits mlog_and_bits mlog_not_bits
 

Macro Definition Documentation

#define __mlog_clear_u64 (   mask,
  bits 
)
Value:
do { \
bits.words[0] &= ~(mask); \
} while (0)

Definition at line 158 of file masklog.h.

#define __mlog_cpu_guess
Value:
({ \
unsigned long _cpu = get_cpu(); \
put_cpu(); \
_cpu; \
})

Definition at line 171 of file masklog.h.

#define __mlog_printk (   level,
  fmt,
  args... 
)
Value:
printk(level "(%s,%u,%lu):%s:%d " fmt, current->comm, \
task_pid_nr(current), __mlog_cpu_guess, \
__PRETTY_FUNCTION__, __LINE__ , ##args)

Definition at line 181 of file masklog.h.

#define __mlog_set_u64 (   mask,
  bits 
)
Value:
do { \
bits.words[0] |= (mask); \
} while (0)

Definition at line 155 of file masklog.h.

#define __mlog_test_u64 (   mask,
  bits 
)    ((mask) & bits.words[0])

Definition at line 154 of file masklog.h.

#define ML_ALLOWED_BITS   (ML_ERROR|ML_NOTICE)

Definition at line 121 of file masklog.h.

#define ML_BASTS   0x0000000000008000ULL /* dlmglue asts and basts */

Definition at line 100 of file masklog.h.

#define ML_CLUSTER   0x0000000000010000ULL /* cluster stack */

Definition at line 101 of file masklog.h.

#define ML_CONN   0x0000000000002000ULL /* net connection management */

Definition at line 98 of file masklog.h.

#define ML_DLM   0x0000000000000040ULL /* dlm general debugging */

Definition at line 91 of file masklog.h.

#define ML_DLM_DOMAIN   0x0000000000000080ULL /* dlm domain debugging */

Definition at line 92 of file masklog.h.

#define ML_DLM_GLUE   0x0000000000000800ULL /* ocfs2 dlm glue layer */

Definition at line 96 of file masklog.h.

#define ML_DLM_MASTER   0x0000000000000200ULL /* dlm master functions */

Definition at line 94 of file masklog.h.

#define ML_DLM_RECOVERY   0x0000000000000400ULL /* dlm master functions */

Definition at line 95 of file masklog.h.

#define ML_DLM_THREAD   0x0000000000000100ULL /* dlm domain thread */

Definition at line 93 of file masklog.h.

#define ML_DLMFS   0x0000000000000020ULL /* dlm user dlmfs */

Definition at line 90 of file masklog.h.

#define ML_ERROR   0x1000000000000000ULL /* sent to KERN_ERR */

Definition at line 104 of file masklog.h.

#define ML_HB_BIO   0x0000000000000010ULL /* hb io tracing */

Definition at line 89 of file masklog.h.

#define ML_HEARTBEAT   0x0000000000000008ULL /* hb all heartbeat tracking */

Definition at line 88 of file masklog.h.

#define ML_KTHREAD   0x4000000000000000ULL /* kernel thread activity */

Definition at line 106 of file masklog.h.

#define ML_MSG   0x0000000000000002ULL /* net network messages */

Definition at line 86 of file masklog.h.

#define ML_NOTICE   0x2000000000000000ULL /* setn to KERN_NOTICE */

Definition at line 105 of file masklog.h.

#define ML_QUORUM   0x0000000000004000ULL /* net connection quorum */

Definition at line 99 of file masklog.h.

#define ML_SOCKET   0x0000000000000004ULL /* net socket lifetime */

Definition at line 87 of file masklog.h.

#define ML_TCP   0x0000000000000001ULL /* net cluster/tcp.c */

Definition at line 85 of file masklog.h.

#define ML_VOTE   0x0000000000001000ULL /* ocfs2 node messaging */

Definition at line 97 of file masklog.h.

#define mlog (   mask,
  fmt,
  args... 
)
Value:
do { \
if ((__m & ML_ALLOWED_BITS) && \
if (__m & ML_ERROR) \
__mlog_printk(KERN_ERR, "ERROR: "fmt , ##args); \
else if (__m & ML_NOTICE) \
__mlog_printk(KERN_NOTICE, fmt , ##args); \
else __mlog_printk(KERN_INFO, fmt , ##args); \
} \
} while (0)

Definition at line 186 of file masklog.h.

#define MLOG_BITS_RHS (   mask)    { { (mask) } }

Definition at line 161 of file masklog.h.

#define mlog_bug_on_msg (   cond,
  fmt,
  args... 
)
Value:
do { \
if (cond) { \
mlog(ML_ERROR, "bug expression: " #cond "\n"); \
mlog(ML_ERROR, fmt, ##args); \
BUG(); \
} \
} while (0)

Definition at line 206 of file masklog.h.

#define mlog_errno (   st)
Value:
do { \
int _st = (st); \
if (_st != -ERESTARTSYS && _st != -EINTR && \
_st != AOP_TRUNCATED_PAGE && _st != -ENOSPC) \
mlog(ML_ERROR, "status = %lld\n", (long long)_st); \
} while (0)

Definition at line 199 of file masklog.h.

#define MLOG_INITIAL_AND_MASK   (ML_ERROR|ML_NOTICE)

Definition at line 108 of file masklog.h.

#define MLOG_MASK_PREFIX   0

Definition at line 110 of file masklog.h.

#define MLOG_MAX_BITS   64

Definition at line 124 of file masklog.h.

Function Documentation

int mlog_sys_init ( struct kset o2cb_subsys)

Definition at line 137 of file masklog.c.

void mlog_sys_shutdown ( void  )

Definition at line 152 of file masklog.c.

Variable Documentation

Definition at line 33 of file masklog.c.