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

Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.cc

index 88fde7110d9324a8c650d15374fa78e274c7c5dd..6f81606e11295ed31b7ac4ebe6c9305e34eea6e4 100644 (file)
@@ -1216,7 +1216,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)