Whamcloud - gitweb
Branch HEAD
authorbobijam <bobijam>
Thu, 13 Sep 2007 03:54:58 +0000 (03:54 +0000)
committerbobijam <bobijam>
Thu, 13 Sep 2007 03:54:58 +0000 (03:54 +0000)
b=11686
attachment=12502
i=johann, adilger

make liblustre clients CDEBUG_LIMIT rate limiting.

lnet/include/libcfs/libcfs.h

index 613d4fb..4c337a4 100644 (file)
@@ -174,7 +174,7 @@ typedef struct {
 /* Controlled via configure key */
 /* #define CDEBUG_ENABLED */
 
-#ifdef __KERNEL__
+#if defined(__KERNEL__) || (defined(__arch_lib__) && !defined(LUSTRE_UTILS))
 
 #ifdef CDEBUG_ENABLED
 #define __CDEBUG(cdls, mask, format, a...)                              \
@@ -204,20 +204,6 @@ do {                                            \
 #warning "CDEBUG IS DISABLED. THIS SHOULD NEVER BE DONE FOR PRODUCTION!"
 #endif
 
-#elif defined(__arch_lib__) && !defined(LUSTRE_UTILS)
-
-#define CDEBUG(mask, format, a...)                                      \
-do {                                                                    \
-        if (((mask) & D_CANTMASK) != 0 ||                               \
-            ((libcfs_debug & (mask)) != 0 &&                            \
-             (libcfs_subsystem_debug & DEBUG_SUBSYSTEM) != 0))          \
-                libcfs_debug_msg(NULL, DEBUG_SUBSYSTEM, mask,           \
-                                 __FILE__, __FUNCTION__, __LINE__,      \
-                                 format, ## a);                         \
-} while (0)
-
-#define CDEBUG_LIMIT CDEBUG
-
 #else
 
 #define CDEBUG(mask, format, a...)                                      \