From 505ee5283c3d23220dfbf7630bfc4efdc391e743 Mon Sep 17 00:00:00 2001 From: Zhilong Liu Date: Sun, 19 Jun 2016 23:52:46 -0500 Subject: dlm: add log_info config option This config option can be used to disable the LOG_INFO recovery messages. Signed-off-by: Zhilong Liu Signed-off-by: David Teigland --- fs/dlm/dlm_internal.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fs/dlm/dlm_internal.h') diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 5eff6ea3e27f..216b61604ef9 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -65,8 +65,16 @@ struct dlm_mhandle; printk(KERN_ERR "dlm: "fmt"\n" , ##args) #define log_error(ls, fmt, args...) \ printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args) + #define log_rinfo(ls, fmt, args...) \ - printk(KERN_INFO "dlm: %s: " fmt "\n", (ls)->ls_name , ##args); +do { \ + if (dlm_config.ci_log_info) \ + printk(KERN_INFO "dlm: %s: " fmt "\n", \ + (ls)->ls_name, ##args); \ + else if (dlm_config.ci_log_debug) \ + printk(KERN_DEBUG "dlm: %s: " fmt "\n", \ + (ls)->ls_name , ##args); \ +} while (0) #define log_debug(ls, fmt, args...) \ do { \ -- cgit v1.2.1