From: phil Date: Thu, 28 Oct 2004 23:27:02 +0000 (+0000) Subject: b=4930 X-Git-Tag: v1_8_0_110~486^5~135 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=3535f25b5fb7ecd9a2bb32afec2752e7d61a9554;p=fs%2Flustre-release.git b=4930 CDEBUG_LIMIT was printing a duplicate message instead of a notice about dropped messages. Fixed. --- 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 \