]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: set FSMap encoding version to 6 6953/head
authorJohn Spray <john.spray@redhat.com>
Thu, 10 Mar 2016 11:16:02 +0000 (11:16 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 10 Mar 2016 12:11:23 +0000 (12:11 +0000)
It was 10, but that wasn't actually necessary,
6 is enough to get ahead of the MDSMap version.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/FSMap.cc

index 214f7383adfc650f1710604147d1e50b6987a618..1001c069a71243495f09600f5b6d3e2acb9039bb 100644 (file)
@@ -213,7 +213,7 @@ void FSMap::get_health(list<pair<health_status_t,string> >& summary,
 
 void FSMap::encode(bufferlist& bl, uint64_t features) const
 {
-  ENCODE_START(10, 10, bl);
+  ENCODE_START(6, 6, bl);
   ::encode(epoch, bl);
   ::encode(next_filesystem_id, bl);
   ::encode(legacy_client_fscid, bl);
@@ -239,8 +239,12 @@ void FSMap::decode(bufferlist::iterator& p)
   MDSMap &legacy_mds_map = legacy_fs.mds_map;
   bool enabled = false;
   
-  DECODE_START_LEGACY_COMPAT_LEN_16(10, 4, 4, p);
-  if (struct_v < 10) {
+  // The highest MDSMap encoding version before we changed the
+  // MDSMonitor to store an FSMap instead of an MDSMap was
+  // 5, so anything older than 6 is decoded as an MDSMap,
+  // and anything newer is decoded as an FSMap.
+  DECODE_START_LEGACY_COMPAT_LEN_16(6, 4, 4, p);
+  if (struct_v < 6) {
     // Decoding an MDSMap (upgrade)
     ::decode(epoch, p);
     ::decode(legacy_mds_map.flags, p);