X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lnet%2Finclude%2Flibcfs%2Flibcfs.h;h=b6f582c591bdc1cc2f55580585c9f15a010a0690;hp=2fabeab4b109b16d6648efbab66744ac2ac5c0df;hb=a487457bb00b5a862d0f51071b6c8da7aae99390;hpb=00f255b8c00dff66481a6ab22391869217b5d8af diff --git a/lnet/include/libcfs/libcfs.h b/lnet/include/libcfs/libcfs.h index 2fabeab..b6f582c 100644 --- a/lnet/include/libcfs/libcfs.h +++ b/lnet/include/libcfs/libcfs.h @@ -8,7 +8,14 @@ #define __attribute__(x) #endif -#include +#if defined(__linux__) +#include +#elif defined(__APPLE__) +#include +#else +#error Unsupported operating system. +#endif + #include "curproc.h" #define PORTAL_DEBUG @@ -59,6 +66,7 @@ extern unsigned int portal_printk; #define S_CONFOBD 0x00400000 #define S_LMV 0x00800000 #define S_CMOBD 0x01000000 +#define S_SEC 0x02000000 /* If you change these values, please keep these files up to date... * portals/utils/debug.c * utils/lconf @@ -90,6 +98,9 @@ extern unsigned int portal_printk; #define D_READA 0x00400000 /* read-ahead */ #define D_MMAP 0x00800000 #define D_CONFIG 0x01000000 +#define D_CONSOLE 0x02000000 +#define D_QUOTA 0x04000000 +#define D_SEC 0x08000000 /* If you change these values, please keep these files up to date... * portals/utils/debug.c * utils/lconf @@ -103,7 +114,7 @@ extern unsigned int portal_printk; #define CDEBUG(mask, format, a...) \ do { \ CHECK_STACK(CDEBUG_STACK); \ - if (((mask) & (D_ERROR | D_EMERG | D_WARNING)) || \ + if (((mask) & (D_ERROR | D_EMERG | D_WARNING | D_CONSOLE)) || \ (portal_debug & (mask) && \ portal_subsystem_debug & DEBUG_SUBSYSTEM)) \ portals_debug_msg(DEBUG_SUBSYSTEM, mask, \ @@ -153,6 +164,12 @@ do { \ #define CERROR(format, a...) CDEBUG_LIMIT(D_ERROR, format, ## a) #define CEMERG(format, a...) CDEBUG(D_EMERG, format, ## a) +#define LCONSOLE(mask, format, a...) CDEBUG(D_CONSOLE | (mask), format, ## a) +#define LCONSOLE_INFO(format, a...) CDEBUG_LIMIT(D_CONSOLE, format, ## a) +#define LCONSOLE_WARN(format, a...) CDEBUG_LIMIT(D_CONSOLE | D_WARNING, format, ## a) +#define LCONSOLE_ERROR(format, a...) CDEBUG_LIMIT(D_CONSOLE | D_ERROR, format, ## a) +#define LCONSOLE_EMERG(format, a...) CDEBUG(D_CONSOLE | D_EMERG, format, ## a) + #define GOTO(label, rc) \ do { \ long GOTO__ret = (long)(rc); \ @@ -211,7 +228,7 @@ do { \ #define LUSTRE_SRV_PTL_PID LUSTRE_PTL_PID -#define PORTALS_CFG_VERSION 0x00010001; +#define PORTALS_CFG_VERSION 0x00010001 struct portals_cfg { __u32 pcfg_version; @@ -406,7 +423,6 @@ extern void portals_debug_msg(int subsys, int mask, char *file, const char *fn, char *format, ...) __attribute__ ((format (printf, 7, 8))); - static inline void cfs_slow_warning(cfs_time_t now, int seconds, char *msg) { if (cfs_time_after(cfs_time_current(),