Whamcloud - gitweb
LU-6744 lov: init LOV stripe type beforehand
[fs/lustre-release.git] / lustre / lov / lov_ea.c
index f294d11..8ea8803 100644 (file)
@@ -181,17 +181,20 @@ static int lsm_unpackmd_common(struct lov_obd *lov,
                if (lov_oinfo_is_dummy(loi))
                        continue;
 
-               if (loi->loi_ost_idx >= lov->desc.ld_tgt_count) {
-                       CERROR("OST index %d more than OST count %d\n",
+               if (loi->loi_ost_idx >= lov->desc.ld_tgt_count &&
+                   !lov2obd(lov)->obd_process_conf) {
+                       CERROR("%s: OST index %d more than OST count %d\n",
+                              (char*)lov->desc.ld_uuid.uuid,
                               loi->loi_ost_idx, lov->desc.ld_tgt_count);
                        lov_dump_lmm_v1(D_WARNING, lmm);
                        return -EINVAL;
                }
 
-               if (!lov->lov_tgts[loi->loi_ost_idx]) {
-                       CERROR("OST index %d missing\n", loi->loi_ost_idx);
+               if (lov->lov_tgts[loi->loi_ost_idx] == NULL) {
+                       CERROR("%s: OST index %d missing\n",
+                              (char*)lov->desc.ld_uuid.uuid, loi->loi_ost_idx);
                        lov_dump_lmm_v1(D_WARNING, lmm);
-                       return -EINVAL;
+                       continue;
                }
 
                stripe_maxbytes = min_t(loff_t, stripe_maxbytes,