]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: fix feature calculation for CACHEPOOL
authorSage Weil <sage@inktank.com>
Tue, 3 Dec 2013 18:59:29 +0000 (10:59 -0800)
committerSage Weil <sage@inktank.com>
Fri, 6 Dec 2013 22:24:02 +0000 (14:24 -0800)
We need to include the faeture in the mask.

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

index baef187db9e54915806ea7dbe41b0233c1544de9..60ebb8ff38e90b32ef706e6ac8133b03c9eeee9a 100644 (file)
@@ -744,8 +744,8 @@ bool OSDMap::find_osd_on_ip(const entity_addr_t& ip) const
 
 uint64_t OSDMap::get_features(uint64_t *pmask) const
 {
-  uint64_t features = 0;
-  uint64_t mask = 0;
+  uint64_t features = 0;  // things we actually have
+  uint64_t mask = 0;      // things we could have
 
   if (crush->has_nondefault_tunables())
     features |= CEPH_FEATURE_CRUSH_TUNABLES;
@@ -762,7 +762,7 @@ uint64_t OSDMap::get_features(uint64_t *pmask) const
       features |= CEPH_FEATURE_OSD_CACHEPOOL;
     }
   }
-  mask |= CEPH_FEATURE_OSDHASHPSPOOL;
+  mask |= CEPH_FEATURE_OSDHASHPSPOOL | CEPH_FEATURE_OSD_CACHEPOOL;
 
   if (pmask)
     *pmask = mask;