[LU-7567] lfs_changelog() misprints timestamps Created: 16/Dec/15 Updated: 26/Apr/21 Resolved: 12/May/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.8.0 |
| Fix Version/s: | Lustre 2.10.0 |
| Type: | Bug | Priority: | Minor |
| Reporter: | John Hammond | Assignee: | WC Triage |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | easy, lfs, patch | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
The cr_time field of a changelog record is (secs << 30) + nsecs. So lfs_changelog() should use ".09d" when printing the fractional part. Instead it uses ".06d": secs = rec->cr_time >> 30;
gmtime_r(&secs, &ts);
printf(LPU64" %02d%-5s %02d:%02d:%02d.%06d %04d.%02d.%02d "
"0x%x t="DFID, rec->cr_index, rec->cr_type,
changelog_type2str(rec->cr_type),
ts.tm_hour, ts.tm_min, ts.tm_sec,
(int)(rec->cr_time & ((1<<30) - 1)),
ts.tm_year + 1900, ts.tm_mon + 1, ts.tm_mday,
rec->cr_flags & CLF_FLAGMASK, PFID(&rec->cr_tfid));
|
| Comments |
| Comment by Gerrit Updater [ 14/Jan/16 ] |
|
akam kumar bharathi (azurelustre@gmail.com) uploaded a new patch: http://review.whamcloud.com/18006 |
| Comment by Gerrit Updater [ 12/May/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/18006/ |
| Comment by Peter Jones [ 12/May/17 ] |
|
Landed for 2.10 |