Commit cc109201 authored by Bryn Reeves's avatar Bryn Reeves Committed by Linus Torvalds

[PATCH] dm: add debug macro

Add CONFIG_DM_DEBUG and DMDEBUG() macro.
Signed-off-by: default avatarBryn Reeves <breeves@redhat.com>
Signed-off-by: default avatarAlasdair G Kergon <agk@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8560ed6f
......@@ -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
......
......@@ -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))
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment