Commit a9f3973
Move to monotonic clock for time
Problem:
`posix_janitor_task()` was using `time()` to get the time which is
wall-clock time. Because of this the janitor task is not firing
periodically as it is supposed to, when ntp is disabled.
Fix:
Use monotonic_raw clock variant to get the time now.
Fixes: #3932
Change-Id: I13e48381495c97cd818161067ba43fe702318416
Signed-off-by: Pranith Kumar Karampuri <pranith.karampuri@phonepe.com>1 parent 8f479c4 commit a9f3973
File tree
4 files changed
+18
-3
lines changed- libglusterfs/src
- glusterfs
- xlators/storage/posix/src
4 files changed
+18
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
| 27 | + | |
26 | 28 | | |
27 | 29 | | |
28 | 30 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1060 | 1060 | | |
1061 | 1061 | | |
1062 | 1062 | | |
| 1063 | + | |
1063 | 1064 | | |
1064 | 1065 | | |
1065 | 1066 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
94 | 106 | | |
95 | 107 | | |
96 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1474 | 1474 | | |
1475 | 1475 | | |
1476 | 1476 | | |
1477 | | - | |
1478 | | - | |
1479 | 1477 | | |
1480 | 1478 | | |
1481 | 1479 | | |
| |||
1485 | 1483 | | |
1486 | 1484 | | |
1487 | 1485 | | |
1488 | | - | |
| 1486 | + | |
| 1487 | + | |
| 1488 | + | |
1489 | 1489 | | |
1490 | 1490 | | |
1491 | 1491 | | |
| |||
0 commit comments