]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crush: condition latest tunable encoding on features 12167/head
authorSage Weil <sage@redhat.com>
Wed, 23 Nov 2016 19:15:50 +0000 (14:15 -0500)
committerSage Weil <sage@redhat.com>
Mon, 28 Nov 2016 19:35:56 +0000 (14:35 -0500)
This avoids throwing hammer OSDMap encodings off.

Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 9e5ff86487bd1f5979866b5e16300dd4a3979f97)

src/crush/CrushWrapper.cc

index 4ea39b8cbd2c6daece8ba6f0438db57263c95759..172767001632cb2e091646384d3be36389f956b0 100644 (file)
@@ -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<int32_t,string>& m, bufferlist::iterator& blp)