Whamcloud - gitweb
- fixes in split about using correct byte order;
[fs/lustre-release.git] / lustre / lov / lov_qos.c
index 2622590..2bc909c 100644 (file)
@@ -354,9 +354,11 @@ static int qos_calc_rr(struct lov_obd *lov)
         list_for_each_entry(oss, &lov->lov_qos.lq_oss_list, lqo_oss_list) {
                 int j = 0;
                 for (i = 0; i < ost_count; i++) {
+                      LASSERT(lov->lov_tgts[i] != NULL);
                       if (lov->lov_tgts[i]->ltd_qos.ltq_oss == oss) {
                               /* Evenly space these OSTs across arrayspace */
                               int next = j * ost_count / oss->lqo_ost_count;
+                              LASSERT(next < ost_count);
                               while (lov->lov_qos.lq_rr_array[next] !=
                                      LOV_QOS_EMPTY)
                                       next = (next + 1) % ost_count;
@@ -727,6 +729,7 @@ int qos_prep_create(struct obd_export *exp, struct lov_request_set *set)
         ENTRY;
 
         LASSERT(src_oa->o_valid & OBD_MD_FLID);
+        LASSERT(src_oa->o_valid & OBD_MD_FLGROUP);
  
         if (set->set_oi->oi_md == NULL) {
                 int stripe_cnt = lov_get_stripecnt(lov, 0);
@@ -770,6 +773,8 @@ int qos_prep_create(struct obd_export *exp, struct lov_request_set *set)
 
         lsm = set->set_oi->oi_md;
         lsm->lsm_object_id = src_oa->o_id;
+        lsm->lsm_object_gr = src_oa->o_gr;
+
         if (!lsm->lsm_stripe_size)
                 lsm->lsm_stripe_size = lov->desc.ld_default_stripe_size;
         if (!lsm->lsm_pattern) {
@@ -817,7 +822,6 @@ int qos_prep_create(struct obd_export *exp, struct lov_request_set *set)
                         CDEBUG(D_INODE, "stripe %d has size "LPU64"/"LPU64"\n",
                                i, req->rq_oi.oi_oa->o_size, src_oa->o_size);
                 }
-
         }
         LASSERT(set->set_count == stripes);