From 3535f25b5fb7ecd9a2bb32afec2752e7d61a9554 Mon Sep 17 00:00:00 2001 From: phil Date: Thu, 28 Oct 2004 23:27:02 +0000 Subject: [PATCH] b=4930 CDEBUG_LIMIT was printing a duplicate message instead of a notice about dropped messages. Fixed. --- lustre/portals/include/linux/libcfs.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/lustre/portals/include/linux/libcfs.h b/lustre/portals/include/linux/libcfs.h index 33abae9..cda9739e 100644 --- a/lustre/portals/include/linux/libcfs.h +++ b/lustre/portals/include/linux/libcfs.h @@ -189,20 +189,21 @@ do { \ #define CDEBUG_MAX_LIMIT 600 #define CDEBUG_LIMIT(cdebug_mask, cdebug_format, a...) \ do { \ - static unsigned long cdebug_next; \ - static int cdebug_count, cdebug_delay = 1; \ + static unsigned long cdebug_next = 0; \ + static int cdebug_count = 0, cdebug_delay = 1; \ \ CHECK_STACK(CDEBUG_STACK); \ if (time_after(jiffies, cdebug_next)) { \ - portals_debug_msg(DEBUG_SUBSYSTEM, cdebug_mask, __FILE__, \ - __FUNCTION__, __LINE__, CDEBUG_STACK, \ - cdebug_format, ## a); \ if (cdebug_count) { \ portals_debug_msg(DEBUG_SUBSYSTEM, cdebug_mask, \ __FILE__, __FUNCTION__, __LINE__, \ - CDEBUG_STACK, cdebug_format, ## a); \ + 0, "skipped %d similar messages\n", \ + cdebug_count); \ cdebug_count = 0; \ } \ + portals_debug_msg(DEBUG_SUBSYSTEM, cdebug_mask, __FILE__, \ + __FUNCTION__, __LINE__, CDEBUG_STACK, \ + cdebug_format, ## a); \ if (time_after(jiffies, cdebug_next+(CDEBUG_MAX_LIMIT+10)*HZ))\ cdebug_delay = cdebug_delay > 8 ? cdebug_delay/8 : 1; \ else \ -- 1.8.3.1