summaryrefslogtreecommitdiffstats
path: root/fs/dlm/dlm_internal.h
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2012-04-23 13:58:42 -0500
committerDavid Teigland <teigland@redhat.com>2012-04-26 15:37:37 -0500
commitd6e24788d21c4f1a8f00c811c31dd4e9a58679ac (patch)
tree03a41787c60082d3da5f5ef39734a3ae17b852fa /fs/dlm/dlm_internal.h
parent13ef11110fa2173b9d03e6616574914e12e2a90f (diff)
downloadlinux-d6e24788d21c4f1a8f00c811c31dd4e9a58679ac.tar.gz
linux-d6e24788d21c4f1a8f00c811c31dd4e9a58679ac.tar.bz2
linux-d6e24788d21c4f1a8f00c811c31dd4e9a58679ac.zip
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. Signed-off-by: David Teigland <teigland@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r--fs/dlm/dlm_internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h
index 3a564d197e99..0e74832c021b 100644
--- a/fs/dlm/dlm_internal.h
+++ b/fs/dlm/dlm_internal.h
@@ -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)) \