diff options
author | 2007-01-09 09:44:01 -0600 | |
---|---|---|
committer | 2007-02-05 13:36:40 -0500 | |
commit | 99fc64874aad1ee0aea5c4d8c07e3529f9d03497 (patch) | |
tree | 46d36b4d11d920e31bbbf04f5d62e676945550e6 /fs/dlm/dlm_internal.h | |
parent | [DLM] rename dlm_config_info fields (diff) | |
download | linux-99fc64874aad1ee0aea5c4d8c07e3529f9d03497.tar.gz linux-99fc64874aad1ee0aea5c4d8c07e3529f9d03497.tar.bz2 linux-99fc64874aad1ee0aea5c4d8c07e3529f9d03497.zip |
[DLM] add config entry to enable log_debug
Add a new dlm_config_info field to enable log_debug output and change
log_debug() to use it.
Signed-off-by: David Teigland <teigland@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/dlm/dlm_internal.h')
-rw-r--r-- | fs/dlm/dlm_internal.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/dlm/dlm_internal.h b/fs/dlm/dlm_internal.h index 7185a132a8b5..ee993c5c2307 100644 --- a/fs/dlm/dlm_internal.h +++ b/fs/dlm/dlm_internal.h @@ -41,6 +41,7 @@ #include <asm/uaccess.h> #include <linux/dlm.h> +#include "config.h" #define DLM_LOCKSPACE_LEN 64 @@ -69,12 +70,12 @@ struct dlm_mhandle; #define log_error(ls, fmt, args...) \ printk(KERN_ERR "dlm: %s: " fmt "\n", (ls)->ls_name , ##args) -#define DLM_LOG_DEBUG -#ifdef DLM_LOG_DEBUG -#define log_debug(ls, fmt, args...) log_error(ls, fmt, ##args) -#else -#define log_debug(ls, fmt, args...) -#endif +#define log_debug(ls, fmt, args...) \ +do { \ + if (dlm_config.ci_log_debug) \ + printk(KERN_DEBUG "dlm: %s: " fmt "\n", \ + (ls)->ls_name , ##args); \ +} while (0) #define DLM_ASSERT(x, do) \ { \ |