[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20060914214806.GX3928@agk.surrey.redhat.com>
Date: Thu, 14 Sep 2006 22:48:06 +0100
From: Alasdair G Kergon <agk@...hat.com>
To: Andrew Morton <akpm@...l.org>
Cc: linux-kernel@...r.kernel.org, Bryn Reeves <breeves@...hat.com>
Subject: [PATCH 16/25] dm: add debug macro
From: Bryn Reeves <breeves@...hat.com>
Add CONFIG_DM_DEBUG and DMDEBUG() macro.
Signed-off-by: Bryn Reeves <breeves@...hat.com>
Signed-off-by: Alasdair G Kergon <agk@...hat.com>
Index: linux-2.6.18-rc7/drivers/md/Kconfig
===================================================================
--- linux-2.6.18-rc7.orig/drivers/md/Kconfig 2006-09-14 20:20:55.000000000 +0100
+++ linux-2.6.18-rc7/drivers/md/Kconfig 2006-09-14 21:00:46.000000000 +0100
@@ -199,6 +199,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
Index: linux-2.6.18-rc7/drivers/md/dm.h
===================================================================
--- linux-2.6.18-rc7.orig/drivers/md/dm.h 2006-09-14 20:20:55.000000000 +0100
+++ linux-2.6.18-rc7/drivers/md/dm.h 2006-09-14 21:00:46.000000000 +0100
@@ -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))
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists