[PATCH take 2] dm-core-add-ratelimit-printing.patch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



adds the DMDEBUG_LIMIT

 brassow

Index: linux-2.6.21-rc5-mm4/drivers/md/dm.h
===================================================================
--- linux-2.6.21-rc5-mm4.orig/drivers/md/dm.h
+++ linux-2.6.21-rc5-mm4/drivers/md/dm.h
@@ -19,12 +19,25 @@
 #define DM_NAME "device-mapper"
 
 #define DMERR(f, arg...) printk(KERN_ERR DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
+#define DMERR_LIMIT(f, arg...) \
+	if (printk_ratelimit())	\
+		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 DMWARN_LIMIT(f, arg...) \
+	if (printk_ratelimit())	\
+		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)
+#define DMINFO_LIMIT(f, arg...) \
+	if (printk_ratelimit())	\
+		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)
+#  define DMDEBUG_LIMIT(f, arg...) \
+	if (printk_ratelimit())	\
+		printk(KERN_DEBUG DM_NAME ": " DM_MSG_PREFIX ": " f "\n", ## arg)
 #else
 #  define DMDEBUG(f, arg...) do {} while (0)
+#  define DMDEBUG_LIMIT(f, arg...) do {} while (0)
 #endif
 
 #define DMEMIT(x...) sz += ((sz >= maxlen) ? \


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel

[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux