From: Sage Weil Date: Fri, 21 Oct 2016 16:25:08 +0000 (-0400) Subject: mon/OSDMonitor: encode OSDMap::Incremental with same features as OSDMap X-Git-Tag: v11.1.0~537^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F11596%2Fhead;p=ceph.git mon/OSDMonitor: encode OSDMap::Incremental with same features as OSDMap The Incremental encode stashes encode_features, which is what we use later to reencode the updated OSDMap. Use the same features so that the encoding will match! Signed-off-by: Sage Weil --- diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 4fba1f5679c..c4e790f2283 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -1220,6 +1220,9 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) } } + // features for osdmap and its incremental + uint64_t features = mon->quorum_features; + // encode full map and determine its crc OSDMap tmp; { @@ -1227,7 +1230,6 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) tmp.apply_incremental(pending_inc); // determine appropriate features - uint64_t features = mon->quorum_features; if (!tmp.test_flag(CEPH_OSDMAP_REQUIRE_JEWEL)) { dout(10) << __func__ << " encoding without feature SERVER_JEWEL" << dendl; features &= ~CEPH_FEATURE_SERVER_JEWEL; @@ -1250,7 +1252,7 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) // encode assert(get_last_committed() + 1 == pending_inc.epoch); - ::encode(pending_inc, bl, mon->quorum_features | CEPH_FEATURE_RESERVED); + ::encode(pending_inc, bl, features | CEPH_FEATURE_RESERVED); dout(20) << " full_crc " << tmp.get_crc() << " inc_crc " << pending_inc.inc_crc << dendl;