]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/events/ESessions.h
import 15.2.0 Octopus source
[ceph.git] / ceph / src / mds / events / ESessions.h
index f784d63eb0c10c2a3c5f71f1bc9db5d3a6804bc3..fad70212084ea04f6cf9dc42d33aac09d01d5111 100644 (file)
 class ESessions : public LogEvent {
 protected:
   version_t cmapv;  // client map version
+  bool old_style_encode;
 
 public:
   map<client_t,entity_inst_t> client_map;
-  bool old_style_encode;
+  map<client_t,client_metadata_t> client_metadata_map;
 
   ESessions() : LogEvent(EVENT_SESSIONS), cmapv(0), old_style_encode(false) { }
-  ESessions(version_t pv, map<client_t,entity_inst_t>& cm) :
+  ESessions(version_t pv, map<client_t,entity_inst_t>&& cm,
+           map<client_t,client_metadata_t>&& cmm) :
     LogEvent(EVENT_SESSIONS),
-    cmapv(pv),
-    old_style_encode(false) {
-    client_map.swap(cm);
-  }
+    cmapv(pv), old_style_encode(false),
+    client_map(std::move(cm)),
+    client_metadata_map(std::move(cmm)) {}
 
   void mark_old_encoding() { old_style_encode = true; }
 
   void encode(bufferlist &bl, uint64_t features) const override;
-  void decode_old(bufferlist::iterator &bl);
-  void decode_new(bufferlist::iterator &bl);
-  void decode(bufferlist::iterator &bl) override {
+  void decode_old(bufferlist::const_iterator &bl);
+  void decode_new(bufferlist::const_iterator &bl);
+  void decode(bufferlist::const_iterator &bl) override {
     if (old_style_encode) decode_old(bl);
     else decode_new(bl);
   }
   void dump(Formatter *f) const override;
-  static void generate_test_instances(list<ESessions*>& ls);
+  static void generate_test_instances(std::list<ESessions*>& ls);
 
   void print(ostream& out) const override {
     out << "ESessions " << client_map.size() << " opens cmapv " << cmapv;