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

llog_skip_over skip the record by too little minimum record size.

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

            [LU-7050] llog_skip_over skip the record by too little minimum record size.

            Landed for 2.8.0

            jgmitter Joseph Gmitter (Inactive) added a comment - Landed for 2.8.0

            Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16103/
            Subject: LU-7050 llog: record the minimum record size
            Project: fs/lustre-release
            Branch: master
            Current Patch Set:
            Commit: f61148f758b30de91684c58053e4dad6159f8858

            gerrit Gerrit Updater added a comment - Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/16103/ Subject: LU-7050 llog: record the minimum record size Project: fs/lustre-release Branch: master Current Patch Set: Commit: f61148f758b30de91684c58053e4dad6159f8858
            di.wang Di Wang added a comment -

            Use 16103.

            di.wang Di Wang added a comment - Use 16103.

            I see two patches that look alike for this ticket. Which one to use?

            simmonsja James A Simmons added a comment - I see two patches that look alike for this ticket. Which one to use?

            wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/16103
            Subject: LU-7050 llog: record the minimum record size
            Project: fs/lustre-release
            Branch: master
            Current Patch Set: 1
            Commit: 2d7e57831225c489e5efed8b3f227de21f90b488

            gerrit Gerrit Updater added a comment - wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/16103 Subject: LU-7050 llog: record the minimum record size Project: fs/lustre-release Branch: master Current Patch Set: 1 Commit: 2d7e57831225c489e5efed8b3f227de21f90b488

            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: