All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dm-core-add-ratelimit-printing.patch
@ 2007-04-05 16:36 Jonathan Brassow
  2007-04-05 16:59 ` Bryn M. Reeves
  2007-04-09 17:23 ` Olaf Kirch
  0 siblings, 2 replies; 4+ messages in thread
From: Jonathan Brassow @ 2007-04-05 16:36 UTC (permalink / raw)
  To: dm-devel

This patch adds macros for ratelimiting messages.

 brassow

Index: linux-2.6.19-rc4-mm2/drivers/md/dm.h
===================================================================
--- linux-2.6.19-rc4-mm2.orig/drivers/md/dm.h	2006-11-07 09:22:45.000000000 -0600
+++ linux-2.6.19-rc4-mm2/drivers/md/dm.h	2006-11-27 15:08:38.000000000 -0600
@@ -19,8 +19,17 @@
 #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)
 #else

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-04-10  5:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-05 16:36 [PATCH] dm-core-add-ratelimit-printing.patch Jonathan Brassow
2007-04-05 16:59 ` Bryn M. Reeves
2007-04-09 17:23 ` Olaf Kirch
2007-04-10  5:17   ` Jonathan Brassow

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.