Skip to contentSkip to conversation

dlm: limit rcom debug messages

PATCH New David Teigland 1 participant 1 message May 21, 2012 Distributed lock manager (DLM)

lore
Share & tools
lore

David Teigland

author maintainer
#0 lore raw

PATCH 3/8 dlm: limit rcom debug messages

Unify the checking for both types of ignored
rcom messages, and replace the two log_debug
statements with a single, rate limited debug
message.

---
 fs/dlm/dlm_internal.h |    8 ++++++++
 fs/dlm/rcom.c         |   48 ++++++++++++++++++++----------------------------
 2 files changed, 28 insertions(+), 28 deletions(-)
fs/dlm/dlm_internal.h +8 -0
index 3a564d1..0e74832 100644
@@ -38,6 +38,7 @@
 #include <linux/miscdevice.h>
 #include <linux/mutex.h>
 #include <linux/idr.h>
+#include <linux/ratelimit.h>
 #include <asm/uaccess.h>
 
 #include <linux/dlm.h>
@@ -74,6 +75,13 @@ do { \
 		       (ls)->ls_name , ##args); \
 } while (0)
 
+#define log_limit(ls, fmt, args...) \
+do { \
+	if (dlm_config.ci_log_debug) \
+		printk_ratelimited(KERN_DEBUG "dlm: %s: " fmt "\n", \
+			(ls)->ls_name , ##args); \
+} while (0)
+
 #define DLM_ASSERT(x, do) \
 { \
   if (!(x)) \
fs/dlm/rcom.c +20 -28

67 lines not on this page · raw message

Signature · 1 line
1.7.10.1.362.g242cab3