]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osdmap: workaround old bug that zeroed pool_max
authorSage Weil <sage@newdream.net>
Wed, 18 Apr 2012 19:50:47 +0000 (12:50 -0700)
committerSage Weil <sage@newdream.net>
Wed, 18 Apr 2012 19:50:47 +0000 (12:50 -0700)
Signed-off-by: Sage Weil <sage@newdream.net>
Reviewed-by: Greg Farnum <gregory.farnum@dreamhost.com>
src/osd/OSDMap.cc

index b6365d98c693a0077ded802aee9adc944da8091a..bb4357b41aba7a2899f2651c60abfbda2f9ea486 100644 (file)
@@ -761,6 +761,12 @@ void OSDMap::decode(bufferlist::iterator& p)
   } else {
     pool_max = max_pools;
   }
+  // kludge around some old bug that zeroed out pool_max (#2307)
+  if (pools.size() && pool_max < pools.rbegin()->first) {
+    pool_max = pools.rbegin()->first;
+    if (cct)
+      ldout(cct, 0) << "kludging bad pool_max to " << pool_max << dendl;
+  }
 
   ::decode(flags, p);