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

llog_cat_process_cb() should check rec->lrh_index == d->lpd_startcat and d->lpd_startidx > 0

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Unresolved
    • Minor
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      In llog_cat_process_cb() when we check for a positive startidx we should also check if the catindex matches (since the log at catindex may have been deleted):

      static int llog_cat_process_cb(const struct lu_env *env,
                                     struct llog_handle *cat_llh,
                                     struct llog_rec_hdr *rec, void *data)
      {
              /* ... */
      
              if (rec->lrh_index < d->lpd_startcat) {
                      /* Skip processing of the logs until startcat */
                      rc = 0;
              } else if (d->lpd_startidx > 0) { /* HERE */
                      struct llog_process_cat_data cd;
      
                      cd.lpcd_first_idx = d->lpd_startidx;
                      cd.lpcd_last_idx = 0;
                      rc = llog_process_or_fork(env, llh, d->lpd_cb, d->lpd_data,
                                                &cd, false);
                      /* Continue processing the next log from idx 0 */
                      d->lpd_startidx = 0;
              } else {
                      rc = llog_process_or_fork(env, llh, d->lpd_cb, d->lpd_data,
                                                NULL, false);
              }
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: