]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Merge branch 'wip-mfsmap-features' of git://github.com/jcsp/ceph
authorGreg Farnum <gfarnum@redhat.com>
Fri, 25 Mar 2016 00:50:43 +0000 (17:50 -0700)
committerGreg Farnum <gfarnum@redhat.com>
Fri, 25 Mar 2016 00:50:43 +0000 (17:50 -0700)
Clean up some code in the new multi-fs handling. Make its output
more precise and add some debug/repair config options.

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Conflicts:
src/mds/FSMap.cc

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
1  2 
src/client/Client.cc
src/common/config_opts.h
src/mds/FSMap.cc
src/mon/MDSMonitor.cc
src/mon/Monitor.cc
src/vstart.sh

Simple merge
Simple merge
index 094b78e01e16b90572c9fe0a2d2a8898a29e322a,e35c61488b14667bdcc54212563e700bc0e69b71..38610bc9d09fc28882134ac659db08a281bb2d37
@@@ -213,43 -230,21 +230,43 @@@ void FSMap::get_health(list<pair<health
  
  void FSMap::encode(bufferlist& bl, uint64_t features) const
  {
 -  ENCODE_START(6, 6, bl);
 -  ::encode(epoch, bl);
 -  ::encode(next_filesystem_id, bl);
 -  ::encode(legacy_client_fscid, bl);
 -  ::encode(compat, bl);
 -  ::encode(enable_multiple, bl);
 -  std::vector<Filesystem> fs_list;
 -  for (auto i : filesystems) {
 -    fs_list.push_back(*(i.second));
 +  if (features & CEPH_FEATURE_SERVER_JEWEL) {
 +    ENCODE_START(6, 6, bl);
 +    ::encode(epoch, bl);
 +    ::encode(next_filesystem_id, bl);
 +    ::encode(legacy_client_fscid, bl);
 +    ::encode(compat, bl);
 +    ::encode(enable_multiple, bl);
 +    std::vector<Filesystem> fs_list;
 +    for (auto i : filesystems) {
 +      fs_list.push_back(*(i.second));
 +    }
-     ::encode(fs_list, bl);
++    ::encode(fs_list, bl, features);
 +    ::encode(mds_roles, bl);
 +    ::encode(standby_daemons, bl, features);
 +    ::encode(standby_epochs, bl);
 +    ENCODE_FINISH(bl);
 +  } else {
 +    if (filesystems.empty()) {
 +      MDSMap disabled_map;
 +      disabled_map.epoch = epoch;
 +      disabled_map.encode(bl, features);
 +    } else {
 +      // MDSMonitor should never have created multiple filesystems
 +      // until the quorum features indicated Jewel
 +      assert(filesystems.size() == 1);
 +      auto fs = filesystems.begin()->second;
 +
 +      // Take the MDSMap for the enabled filesystem, and populated its
 +      // mds_info with the standbys to get a pre-jewel-style mon MDSMap.
 +      MDSMap full_mdsmap = fs->mds_map;
 +      full_mdsmap.epoch = epoch;
 +      for (const auto p : standby_daemons) {
 +        full_mdsmap.mds_info[p.first] = p.second;
 +      }
 +      full_mdsmap.encode(bl, features);
 +    }
    }
 -  ::encode(fs_list, bl, features);
 -  ::encode(mds_roles, bl);
 -  ::encode(standby_daemons, bl, features);
 -  ::encode(standby_epochs, bl);
 -  ENCODE_FINISH(bl);
  }
  
  void FSMap::decode(bufferlist::iterator& p)
Simple merge
Simple merge
diff --cc src/vstart.sh
Simple merge