]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd/OSDMap: fix CHOOSE_ARGS feature detection in get_features()
authorSage Weil <sage@redhat.com>
Fri, 14 Jul 2017 17:09:34 +0000 (13:09 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Jul 2017 17:50:49 +0000 (13:50 -0400)
We need to include the mask in the CEPH_FEATURES_CRUSH value, and | in the
FEATUREMASK later, because this is a second-generation feature bit usage.

This fixes get_min_compat_client(), which was returning 'jewel' when
incompat choose_args were in use instead of 'luminous'.  Now it is correct.

Signed-off-by: Sage Weil <sage@redhat.com>
src/include/ceph_features.h
src/osd/OSDMap.cc

index 908d65ddc7f98680eac126c745c618b658e92051..19fab5f303a56715fc13f1cad680da02a7119c13 100755 (executable)
@@ -244,7 +244,7 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin
         CEPH_FEATURE_CRUSH_TUNABLES5 |         \
         CEPH_FEATURE_CRUSH_V2 |                \
         CEPH_FEATURE_CRUSH_V4 |                \
-        CEPH_FEATURE_CRUSH_CHOOSE_ARGS)
+        CEPH_FEATUREMASK_CRUSH_CHOOSE_ARGS)
 
 /*
  * make sure we don't try to use the reserved features
index a93c3d9533d8013c036054fed5d020b1b4c7ee55..7d2939e100a595714414bbee64154ad6b336b423 100644 (file)
@@ -1312,8 +1312,9 @@ uint64_t OSDMap::get_features(int entity_type, uint64_t *pmask) const
     features |= CEPH_FEATURE_CRUSH_V4;
   if (crush->has_nondefault_tunables5())
     features |= CEPH_FEATURE_CRUSH_TUNABLES5;
-  if (crush->has_incompat_choose_args())
-    features |= CEPH_FEATURE_CRUSH_CHOOSE_ARGS;
+  if (crush->has_incompat_choose_args()) {
+    features |= CEPH_FEATUREMASK_CRUSH_CHOOSE_ARGS;
+  }
   mask |= CEPH_FEATURES_CRUSH;
 
   if (!pg_upmap.empty() || !pg_upmap_items.empty())