]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
OSDMap: dedup the primary_temp
authorGreg Farnum <greg@inktank.com>
Thu, 19 Dec 2013 01:53:11 +0000 (17:53 -0800)
committerGreg Farnum <greg@inktank.com>
Thu, 16 Jan 2014 00:33:06 +0000 (16:33 -0800)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/osd/OSDMap.cc

index 58325a5755a3ab0f7e4688a9a4010898c79ceeb4..da1cd1886c3cc8cffab60697f037c74f07b35643 100644 (file)
@@ -1017,6 +1017,12 @@ void OSDMap::dedup(const OSDMap *o, OSDMap *n)
       n->pg_temp = o->pg_temp;
   }
 
+  // does primary_temp match?
+  if (o->primary_temp->size() == n->primary_temp->size()) {
+    if (*o->primary_temp == *n->primary_temp)
+      n->primary_temp = o->primary_temp;
+  }
+
   // do uuids match?
   if (o->osd_uuid->size() == n->osd_uuid->size() &&
       *o->osd_uuid == *n->osd_uuid)