diff options
author | Bryn Reeves <breeves@redhat.com> | 2006-10-03 10:15:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-03 17:04:15 +0200 |
commit | cc1092019ce3d9b3e85a285b41e852ff94a6b590 (patch) | |
tree | c9ca9dca870249b66671335a2152fac7b4ed0cc5 /drivers/md | |
parent | [PATCH] dm: add uevent change event on resume (diff) | |
download | linux-cc1092019ce3d9b3e85a285b41e852ff94a6b590.tar.xz linux-cc1092019ce3d9b3e85a285b41e852ff94a6b590.zip |
[PATCH] dm: add debug macro
Add CONFIG_DM_DEBUG and DMDEBUG() macro.
Signed-off-by: Bryn Reeves <breeves@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/Kconfig | 8 | ||||
-rw-r--r-- | drivers/md/dm.h | 5 |
2 files changed, 13 insertions, 0 deletions
diff --git a/drivers/md/Kconfig b/drivers/md/Kconfig index 6dd31a291d84..949c71fbfbb5 100644 --- a/drivers/md/Kconfig +++ b/drivers/md/Kconfig @@ -201,6 +201,14 @@ config BLK_DEV_DM If unsure, say N. +config DM_DEBUG + boolean "Device mapper debugging support" + depends on BLK_DEV_DM && EXPERIMENTAL + ---help--- + Enable this for messages that may help debug device-mapper problems. + + If unsure, say N. + config DM_CRYPT tristate "Crypt target support" depends on BLK_DEV_DM && EXPERIMENTAL diff --git a/drivers/md/dm.h b/drivers/md/dm.h index 3c03c0ecab7e..fe701c4834fe 100644 --- a/drivers/md/dm.h +++ b/drivers/md/dm.h @@ -21,6 +21,11 @@ #define DMERR(f, arg...) printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) #define DMWARN(f, arg...) printk(KERN_WARNING DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) #define DMINFO(f, arg...) printk(KERN_INFO DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg) +#ifdef CONFIG_DM_DEBUG +# define DMDEBUG(f, arg...) printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX " DEBUG: " f "\n", ## arg) +#else +# define DMDEBUG(f, arg...) do {} while (0) +#endif #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ 0 : scnprintf(result + sz, maxlen - sz, x)) |