From: Sage Weil Date: Wed, 23 Nov 2016 19:15:50 +0000 (-0500) Subject: crush: condition latest tunable encoding on features X-Git-Tag: v10.2.4~1^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F12167%2Fhead;p=ceph.git crush: condition latest tunable encoding on features This avoids throwing hammer OSDMap encodings off. Signed-off-by: Sage Weil (cherry picked from commit 9e5ff86487bd1f5979866b5e16300dd4a3979f97) --- diff --git a/src/crush/CrushWrapper.cc b/src/crush/CrushWrapper.cc index 4ea39b8cbd2c..172767001632 100644 --- a/src/crush/CrushWrapper.cc +++ b/src/crush/CrushWrapper.cc @@ -1209,7 +1209,9 @@ void CrushWrapper::encode(bufferlist& bl, uint64_t features) const ::encode(crush->chooseleaf_vary_r, bl); ::encode(crush->straw_calc_version, bl); ::encode(crush->allowed_bucket_algs, bl); - ::encode(crush->chooseleaf_stable, bl); + if (features & CEPH_FEATURE_CRUSH_TUNABLES5) { + ::encode(crush->chooseleaf_stable, bl); + } } static void decode_32_or_64_string_map(map& m, bufferlist::iterator& blp)