]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: note OSDHASHPSPOOL feature when pool FLAG_HASHPSPOOL is set
authorSage Weil <sage@inktank.com>
Wed, 20 Feb 2013 00:09:25 +0000 (16:09 -0800)
committerSage Weil <sage@inktank.com>
Wed, 20 Feb 2013 00:12:09 +0000 (16:12 -0800)
This allows the osd and mon to enforce feature bits on their connections.

Signed-off-by: Sage Weil <sage@inktank.com>
src/osd/OSDMap.cc

index a2db1a117d92cb5d0763b119f983080960f73c5f..8f0b01db7060b55f9644069c079b8e08a158cdd1 100644 (file)
@@ -726,6 +726,13 @@ uint64_t OSDMap::get_features(uint64_t *pmask) const
     features |= CEPH_FEATURE_CRUSH_TUNABLES2;
   mask |= CEPH_FEATURES_CRUSH;
 
+  for (map<int64_t,pg_pool_t>::const_iterator p = pools.begin(); p != pools.end(); ++p) {
+    if (p->second.flags & pg_pool_t::FLAG_HASHPSPOOL) {
+      features |= CEPH_FEATURE_OSDHASHPSPOOL;
+    }
+  }
+  mask |= CEPH_FEATURE_OSDHASHPSPOOL;
+
   if (pmask)
     *pmask = mask;
   return features;