[LU-11384] wrong check in libcfs_debug_vmsg2() Created: 17/Sep/18  Updated: 25/Sep/18  Resolved: 25/Sep/18

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Wang Shilong (Inactive) Assignee: Wang Shilong (Inactive)
Resolution: Duplicate Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates LU-11373 CERROR/CWARN messages are not throttled Resolved
duplicates LU-11383 A lot of cfs_fail_loc error message f... Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

It looks current CDEBUG_LIMIT did not work well, after some 'git blame':
Regression comes from fdb5d3d50

-        if (cdls != NULL) {
-                if (libcfs_console_ratelimit &&
-                    cdls->cdls_next != 0 &&     /* not first time ever */
-                    !cfs_time_after(cfs_time_current(), cdls->cdls_next)) {
-                        /* skipping a console message */
-                        cdls->cdls_count++;
-                        if (tcd != NULL)
-                                cfs_trace_put_tcd(tcd);
-                        return 1;
-                }
+       if (cdls != NULL) {
+               if (libcfs_console_ratelimit &&
+                   cdls->cdls_next != 0 &&     /* not first time ever */ 
+                   time_after(jiffies, cdls->cdls_next)) { ------->check logic is wrong here.
+                       /* skipping a console message */
+                       cdls->cdls_count++;
+                       if (tcd != NULL)
+                               cfs_trace_put_tcd(tcd);
+                       return 1;
+               }
 

After fixing above wrong check, problem is gone.



 Comments   
Comment by Peter Jones [ 25/Sep/18 ]

https://review.whamcloud.com/#/c/33154

Comment by Peter Jones [ 25/Sep/18 ]

duplicate of LU-11373

Generated at Sat Feb 10 02:43:24 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.