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

fld_cache_lookup() copies fld_cache_entry onto lu_seq_range

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: Lustre 2.4.0
    • Fix Version/s: Lustre 2.4.0
    • Labels:
    • Severity:
      3
    • Rank (Obsolete):
      7896

      Description

      fld_cache_lookup() keeps a prev pointer to a struct fld_cache_entry. But when it uses this pointer to return the prev range, it copies the entry onto the range argument and not the entry's fce_range member.

      int fld_cache_lookup(struct fld_cache *cache,
                           const seqno_t seq, struct lu_seq_range *range)
      {
              struct fld_cache_entry *flde;
              struct fld_cache_entry *prev = NULL;
              cfs_list_t *head;
              ENTRY;
      
              ...
              cfs_list_for_each_entry(flde, head, fce_list) {
                      if (flde->fce_range.lsr_start > seq) {
                              if (prev != NULL)
                                      memcpy(range, prev, sizeof(*range));
                              break;
                      }
              ...
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jhammond John Hammond
                Reporter:
                jhammond John Hammond
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: