diff options
author | David Teigland <teigland@redhat.com> | 2012-04-23 20:58:42 +0200 |
---|---|---|
committer | David Teigland <teigland@redhat.com> | 2012-04-26 22:37:37 +0200 |
commit | d6e24788d21c4f1a8f00c811c31dd4e9a58679ac (patch) | |
tree | 03a41787c60082d3da5f5ef39734a3ae17b852fa /fs/dlm/dlm_internal.h | |
parent | dlm: fix waiter recovery (diff) | |
download | linux-d6e24788d21c4f1a8f00c811c31dd4e9a58679ac.tar.xz 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.h | 8 |
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)) \ |