dlm: limit rcom debug messages
David Teigland
maintainerPATCH 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.
Signed-off-by David Teigland <[email protected]>
--- 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
@@ -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