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

lmv_get_target should get index by checking ltd_idx

Details

    • Bug
    • Resolution: Fixed
    • Blocker
    • Lustre 2.4.0
    • Lustre 2.4.0
    • 3
    • 6780

    Description

      lmv_get_target should find target by checking ltd_idx, instead of return lmv->tgts[mds] directly.
      In lmv_find_target, it will return lmv->tgts[mds] according to mdt_index, which is not correct. LMV index is created by mount sequence, while mdt_index by indicated by --index.

      static inline struct lmv_tgt_desc *
      lmv_get_target(struct lmv_obd *lmv, mdsno_t mds)
      {       
              return &lmv->tgts[mds];
      }       
      
      static inline struct lmv_tgt_desc *
      lmv_find_target(struct lmv_obd *lmv, const struct lu_fid *fid)
      {               
              mdsno_t mds = 0;
              int rc;         
                              
              if (lmv->desc.ld_tgt_count > 1) {
                      rc = lmv_fld_lookup(lmv, fid, &mds);
                      if (rc) 
                              return ERR_PTR(rc);
              }                            
                              
              return lmv_get_target(lmv, mds);
      }       
      

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: