Skip to content

Commit

Permalink
crush: condition latest tunable encoding on features
Browse files Browse the repository at this point in the history
This avoids throwing hammer OSDMap encodings off.

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Nov 23, 2016
1 parent 9431a25 commit fbd2b7b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/crush/CrushWrapper.cc
Expand Up @@ -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)
Expand Down

0 comments on commit fbd2b7b

Please sign in to comment.