]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
osd/OSDMap: avoid re-initialize osd state and weight done in set_max_osd
authorChangcheng Liu <changcheng.liu@aliyun.com>
Wed, 26 Aug 2020 07:47:04 +0000 (15:47 +0800)
committerChangcheng Liu <changcheng.liu@aliyun.com>
Sun, 6 Sep 2020 12:57:11 +0000 (20:57 +0800)
In set_max_osd function, container's osd_weight and osd_vector have been
assigned with the right state/weight value.

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
src/osd/OSDMap.cc

index e61780ccda2d645f104f4d928f403b6bb67655ef..cd920f88844730f68c05d0f4bafb82a719675e94 100644 (file)
@@ -4188,11 +4188,6 @@ int OSDMap::build_simple_optioned(CephContext *cct, epoch_t e, uuid_d &fsid,
     }
   }
 
-  for (int i=0; i<get_max_osd(); i++) {
-    set_state(i, 0);
-    set_weight(i, CEPH_OSD_OUT);
-  }
-
   map<string,string> profile_map;
   r = get_erasure_code_profile_default(cct, profile_map, &ss);
   if (r < 0) {