Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-7567

lfs_changelog() misprints timestamps

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.10.0
    • Lustre 2.8.0
    • 3
    • 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));
      

      Attachments

        Activity

          People

            wc-triage WC Triage
            jhammond John Hammond
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: