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

llog_skip_over skip the record by too little minimum record size.

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Minor
    • Lustre 2.8.0
    • Lustre 2.8.0
    • None
    • 3
    • 9223372036854775807

    Description

      During processing llog records, it needs to locate the record by the start_index, and if start_index is not zero, it will first try to skip some records to avoid reading too much useless records (see llog_process_thread). In current implementation, llog_skip_over will skip the record by LLOG_MIN_REC_SIZE, only 24 bytes, which is too less for update record (usually around 1000 bytes).

      static inline void llog_skip_over(struct llog_log_hdr *llh, __u64 *off,
                                        int curr, int goal, __u32 chunk_size)
      {
              if (goal > curr) {
                      if (llh->llh_size == 0) {
                              /* variable size records */
                              *off = *off + (goal - curr - 1) * LLOG_MIN_REC_SIZE;
                      } else {
                              *off = chunk_size + (goal - 1) * llh->llh_size;
                      }
              }
              /* always align with lower chunk boundary*/
              *off &= ~(chunk_size - 1);
      }              
      

      So we probably should record the minimum record size in llog_osd_write_rec() and remember it in llh_size (in llog header), which is only used by fixed size llog record for now.

      Attachments

        Issue Links

          Activity

            People

              di.wang Di Wang
              di.wang Di Wang
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: