From ef1ef284ac2762a56ab20053bf6bfb461f5552a3 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 4 May 2017 12:41:14 -0500 Subject: [PATCH] osd/OSDMap: add CRUSH_CHOOSEARGS feature bit Signed-off-by: Sage Weil --- src/include/ceph_features.h | 4 +++- src/osd/OSDMap.cc | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/include/ceph_features.h b/src/include/ceph_features.h index 767d5f8c161..8b8933b7e01 100755 --- a/src/include/ceph_features.h +++ b/src/include/ceph_features.h @@ -101,6 +101,7 @@ DEFINE_CEPH_FEATURE(21, 2, SERVER_LUMINOUS) DEFINE_CEPH_FEATURE(21, 2, RESEND_ON_SPLIT) // overlap DEFINE_CEPH_FEATURE(21, 2, RADOS_BACKOFF) // overlap DEFINE_CEPH_FEATURE(21, 2, OSDMAP_PG_UPMAP) // overlap +DEFINE_CEPH_FEATURE(21, 2, CRUSH_CHOOSEARGS) // overlap DEFINE_CEPH_FEATURE_RETIRED(22, 1, BACKFILL_RESERVATION, JEWEL, LUMINOUS) DEFINE_CEPH_FEATURE(23, 1, MSG_AUTH) @@ -251,7 +252,8 @@ DEFINE_CEPH_FEATURE_DEPRECATED(63, 1, RESERVED_BROKEN, LUMINOUS) // client-facin CEPH_FEATURE_CRUSH_TUNABLES3 | \ CEPH_FEATURE_CRUSH_TUNABLES5 | \ CEPH_FEATURE_CRUSH_V2 | \ - CEPH_FEATURE_CRUSH_V4) + CEPH_FEATURE_CRUSH_V4 | \ + CEPH_FEATURE_CRUSH_CHOOSEARGS) /* * make sure we don't try to use the reserved features diff --git a/src/osd/OSDMap.cc b/src/osd/OSDMap.cc index b0b64ccaadb..1fa0f1c9cd6 100644 --- a/src/osd/OSDMap.cc +++ b/src/osd/OSDMap.cc @@ -1167,6 +1167,8 @@ 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_chooseargs()) + features |= CEPH_FEATURE_CRUSH_CHOOSEARGS; mask |= CEPH_FEATURES_CRUSH; if (!pg_upmap.empty() || !pg_upmap_items.empty()) @@ -1247,7 +1249,9 @@ pair OSDMap::get_min_compat_client() const { uint64_t f = get_features(CEPH_ENTITY_TYPE_CLIENT, nullptr); - if (HAVE_FEATURE(f, OSDMAP_PG_UPMAP)) { // v12.0.0-1733-g27d6f43 + if (HAVE_FEATURE(f, OSDMAP_PG_UPMAP) || // v12.0.0-1733-g27d6f43 +#warning update this commit description right before or after merge + HAVE_FEATURE(f, CRUSH_CHOOSEARGS)) { // FIXME return make_pair("luminous", "12.2.0"); } if (HAVE_FEATURE(f, CRUSH_TUNABLES5)) { // v10.0.0-612-g043a737