]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/OSDMonitor: encode OSDMap::Incremental with same features as OSDMap 11596/head
authorSage Weil <sage@redhat.com>
Fri, 21 Oct 2016 16:25:08 +0000 (12:25 -0400)
committerSage Weil <sage@redhat.com>
Fri, 21 Oct 2016 16:27:48 +0000 (12:27 -0400)
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 <sage@redhat.com>
src/mon/OSDMonitor.cc

index 4fba1f5679c58b21dbe70f0e5fc230ad88a5c385..c4e790f22830981d9865b2c3ec32bfcc6da7ba8d 100644 (file)
@@ -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;