From 4d6f8481b22ecfa5e55b2a6f8f8660f2d0445030 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 23 Nov 2016 14:15:50 -0500 Subject: [PATCH] crush: condition latest tunable encoding on features This avoids throwing hammer OSDMap encodings off. Signed-off-by: Sage Weil (cherry picked from commit 9e5ff86487bd1f5979866b5e16300dd4a3979f97) --- src/crush/CrushWrapper.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.47.3