]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: pass features to LogEvents, EMetaBlob
authorSage Weil <sage@redhat.com>
Tue, 10 Nov 2015 22:06:44 +0000 (17:06 -0500)
committerSage Weil <sage@redhat.com>
Tue, 1 Mar 2016 16:16:59 +0000 (11:16 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
23 files changed:
src/mds/LogEvent.h
src/mds/MDLog.cc
src/mds/events/ECommitted.h
src/mds/events/EExport.h
src/mds/events/EFragment.h
src/mds/events/EImportFinish.h
src/mds/events/EImportStart.h
src/mds/events/EMetaBlob.h
src/mds/events/ENoOp.h
src/mds/events/EOpen.h
src/mds/events/EResetJournal.h
src/mds/events/ESession.h
src/mds/events/ESessions.h
src/mds/events/ESlaveUpdate.h
src/mds/events/ESubtreeMap.h
src/mds/events/ETableClient.h
src/mds/events/ETableServer.h
src/mds/events/EUpdate.h
src/mds/journal.cc
src/test/encoding/types.h
src/tools/cephfs/EventOutput.cc
src/tools/cephfs/JournalTool.cc
src/tools/cephfs/Resetter.cc

index bf57db00e33066c2a8e28ff7f96b1e2a27662785..8c1cd1b07f5acf56c73bbbd7de84db6337bc1e91 100644 (file)
@@ -84,16 +84,16 @@ public:
   void set_stamp(utime_t t) { stamp = t; }
 
   // encoding
-  virtual void encode(bufferlist& bl) const = 0;
+  virtual void encode(bufferlist& bl, uint64_t features) const = 0;
   virtual void decode(bufferlist::iterator &bl) = 0;
   static LogEvent *decode(bufferlist &bl);
   virtual void dump(Formatter *f) const = 0;
 
-  void encode_with_header(bufferlist& bl) {
+  void encode_with_header(bufferlist& bl, uint64_t features) {
     ::encode(EVENT_NEW_ENCODING, bl);
     ENCODE_START(1, 1, bl)
     ::encode(_type, bl);
-    encode(bl);
+    encode(bl, features);
     ENCODE_FINISH(bl);
   }
 
index 86a19457859160897d00a3df92426e1bc0952208..fce20124687a2f82fce3029a337298693e23c195 100644 (file)
@@ -382,7 +382,7 @@ void MDLog::_submit_thread()
       LogSegment *ls = le->_segment;
       // encode it, with event type
       bufferlist bl;
-      le->encode_with_header(bl);
+      le->encode_with_header(bl, mds->mdsmap->get_up_features());
 
       uint64_t write_pos = journaler->get_write_pos();
 
@@ -1134,7 +1134,7 @@ void MDLog::_reformat_journal(JournalPointer const &jp_in, Journaler *old_journa
 
       if (modified) {
         bl.clear();
-        le->encode_with_header(bl);
+        le->encode_with_header(bl, mds->mdsmap->get_up_features());
       }
 
       delete le;
index 4cdbbfbe44ffd215195d8f62f3a19018110ddd67..67e312c9918b488fc1a16e137f025e08533bf782 100644 (file)
@@ -30,7 +30,7 @@ public:
     out << "ECommitted " << reqid;
   }
 
-  void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl, uint64_t features) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<ECommitted*>& ls);
@@ -38,5 +38,6 @@ public:
   void update_segment() {}
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(ECommitted)
 
 #endif
index 64a33738902bf88e2e341b8cfa4759b26f139f43..0690aec2f5a6e55346c211744e5f1a7a68578630 100644 (file)
@@ -44,12 +44,13 @@ public:
 
   EMetaBlob *get_metablob() { return &metablob; }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EExport*>& ls);
   void replay(MDSRank *mds);
 
 };
+WRITE_CLASS_ENCODER_FEATURES(EExport)
 
 #endif
index fac7d36b01bab51da6f6d0abdc80de1c19e526bd..4cc2c368d956dc889931e4863b25fbd9b18645d6 100644 (file)
@@ -70,11 +70,12 @@ public:
 
   EMetaBlob *get_metablob() { return &metablob; }
 
-  void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl, uint64_t features) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EFragment*>& ls);
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(EFragment)
 
 #endif
index 4129a4ca9957b6c995727b5c377fed51e0c6c646..bd04ef516cc9099d411e973b5c29128f32ab218c 100644 (file)
@@ -40,7 +40,7 @@ class EImportFinish : public LogEvent {
       out << " failed";
   }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EImportFinish*>& ls);
@@ -48,5 +48,6 @@ class EImportFinish : public LogEvent {
   void replay(MDSRank *mds);
 
 };
+WRITE_CLASS_ENCODER_FEATURES(EImportFinish)
 
 #endif
index 9f47d49bf826f5c5a5207dd791204bc1cd226eb7..cebf8481a289a1a5f7c3ff7329b8b135b76d8e2a 100644 (file)
@@ -47,7 +47,7 @@ protected:
 
   EMetaBlob *get_metablob() { return &metablob; }
   
-  void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl, uint64_t features) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EImportStart*>& ls);
@@ -56,5 +56,6 @@ protected:
   void replay(MDSRank *mds);
 
 };
+WRITE_CLASS_ENCODER_FEATURES(EImportStart)
 
 #endif
index 8db8f6738c59caa0eaf9a3ddc2c34b7e61156c6f..77f8c3c43be72e5845634f1c64f1886c1f280e93 100644 (file)
@@ -100,7 +100,7 @@ public:
     fullbit() {}
     ~fullbit() {}
 
-    void encode(bufferlist& bl) const;
+    void encode(bufferlist& bl, uint64_t features) const;
     void decode(bufferlist::iterator &bl);
     void dump(Formatter *f) const;
     static void generate_test_instances(list<EMetaBlob::fullbit*>& ls);
@@ -130,7 +130,7 @@ public:
       return state_string;
     }
   };
-  WRITE_CLASS_ENCODER(fullbit)
+  WRITE_CLASS_ENCODER_FEATURES(fullbit)
   
   /* remotebit - a dentry + remote inode link (i.e. just an ino)
    */
@@ -262,9 +262,9 @@ public:
     }
 
     // if this changes, update the versioning in encode for it!
-    void _encode_bits() const {
+    void _encode_bits(uint64_t features) const {
       if (!dn_decoded) return;
-      ::encode(dfull, dnbl);
+      ::encode(dfull, dnbl, features);
       ::encode(dremote, dnbl);
       ::encode(dnull, dnbl);
     }
@@ -277,12 +277,12 @@ public:
       dn_decoded = true;
     }
 
-    void encode(bufferlist& bl) const;
+    void encode(bufferlist& bl, uint64_t features) const;
     void decode(bufferlist::iterator &bl);
     void dump(Formatter *f) const;
     static void generate_test_instances(list<dirlump*>& ls);
   };
-  WRITE_CLASS_ENCODER(dirlump)
+  WRITE_CLASS_ENCODER_FEATURES(dirlump)
 
   // my lumps.  preserve the order we added them in a list.
   list<dirfrag_t>         lump_order;
@@ -317,7 +317,7 @@ private:
   list<pair<metareqid_t,uint64_t> > client_flushes;
 
  public:
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void get_inodes(std::set<inodeno_t> &inodes) const;
   void get_paths(std::vector<std::string> &paths) const;
@@ -580,11 +580,11 @@ private:
   void update_segment(LogSegment *ls);
   void replay(MDSRank *mds, LogSegment *ls, MDSlaveUpdate *su=NULL);
 };
-WRITE_CLASS_ENCODER(EMetaBlob)
-WRITE_CLASS_ENCODER(EMetaBlob::fullbit)
+WRITE_CLASS_ENCODER_FEATURES(EMetaBlob)
+WRITE_CLASS_ENCODER_FEATURES(EMetaBlob::fullbit)
 WRITE_CLASS_ENCODER(EMetaBlob::remotebit)
 WRITE_CLASS_ENCODER(EMetaBlob::nullbit)
-WRITE_CLASS_ENCODER(EMetaBlob::dirlump)
+WRITE_CLASS_ENCODER_FEATURES(EMetaBlob::dirlump)
 
 inline ostream& operator<<(ostream& out, const EMetaBlob& t) {
   t.print(out);
index ed825c6b8d4cf1ea56810fe11954ee59b27b3c73..4b26fe6214f41f43e4dd14fffcaed6aff1ce5ba4 100644 (file)
@@ -24,11 +24,12 @@ public:
   ENoOp() : LogEvent(EVENT_NOOP), pad_size(0) { }
   explicit ENoOp(uint32_t size_) : LogEvent(EVENT_NOOP), pad_size(size_){ }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const {}
 
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(ENoOp)
 
 #endif
index 0c1175baf1a6d69dfa3d94ff5cf8a432b9a4df79..c48d7350546e5cb81546b59c0cdfb9e5a6a87062 100644 (file)
@@ -44,7 +44,7 @@ public:
     inos.push_back(ino);
   }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EOpen*>& ls);
@@ -52,5 +52,6 @@ public:
   void update_segment();
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(EOpen)
 
 #endif
index 5f7e9a3d42ab4c1c9a9a5ab6ddf418b9f06aeade..717781e0cd71a98efca93e8b2594566787cd3b51 100644 (file)
@@ -24,7 +24,7 @@ class EResetJournal : public LogEvent {
   EResetJournal() : LogEvent(EVENT_RESETJOURNAL) { }
   ~EResetJournal() {}
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EResetJournal*>& ls);
@@ -34,5 +34,6 @@ class EResetJournal : public LogEvent {
 
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(EResetJournal)
 
 #endif
index c3b2fc0ae39f66ea8c8e5c0e9dc2a55cb9dcfddd..9fe6b6fc38b0bc267ae1aab879d0af495fd531b3 100644 (file)
@@ -51,7 +51,7 @@ class ESession : public LogEvent {
     cmapv(v),
     inos(i), inotablev(iv) { }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<ESession*>& ls);
@@ -69,5 +69,6 @@ class ESession : public LogEvent {
   void replay(MDSRank *mds);
   entity_inst_t get_client_inst() const {return client_inst;}
 };
+WRITE_CLASS_ENCODER_FEATURES(ESession)
 
 #endif
index 5b5b5945905d762fbaf857836ad99c24bc708cef..35a6ce74c2d83807ce3c4813a358e08ce37fc4a4 100644 (file)
@@ -38,7 +38,7 @@ public:
 
   void mark_old_encoding() { old_style_encode = true; }
 
-  void encode(bufferlist &bl) const;
+  void encode(bufferlist &bl, uint64_t features) const;
   void decode_old(bufferlist::iterator &bl);
   void decode_new(bufferlist::iterator &bl);
   void decode(bufferlist::iterator &bl) {
@@ -55,5 +55,6 @@ public:
   void update_segment();
   void replay(MDSRank *mds);  
 };
+WRITE_CLASS_ENCODER_FEATURES(ESessions)
 
 #endif
index 41e1bb01e03cde18cc3e373882172fc855dc8ff0..7b22935f824f41baa00b7498e15e451df6ac3d50 100644 (file)
@@ -138,12 +138,13 @@ public:
 
   EMetaBlob *get_metablob() { return &commit; }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<ESlaveUpdate*>& ls);
 
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(ESlaveUpdate)
 
 #endif
index 9a5f193b4053e1a8308de0d94d0fd74277f5a56c..e021ecc114c8a00a896ed22587a39498aa9da3a6 100644 (file)
@@ -36,12 +36,13 @@ public:
 
   EMetaBlob *get_metablob() { return &metablob; }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<ESubtreeMap*>& ls);
 
   void replay(MDSRank *mds);
 };
+WRITE_CLASS_ENCODER_FEATURES(ESubtreeMap)
 
 #endif
index aaa1664f6184ad27b421573dba93a44e0e42696b..97b220767a5380b9f311b0bdece0c44c622cb392 100644 (file)
@@ -31,7 +31,7 @@ struct ETableClient : public LogEvent {
     LogEvent(EVENT_TABLECLIENT),
     table(t), op(o), tid(ti) { }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<ETableClient*>& ls);
@@ -44,5 +44,6 @@ struct ETableClient : public LogEvent {
   //void update_segment();
   void replay(MDSRank *mds);  
 };
+WRITE_CLASS_ENCODER_FEATURES(ETableClient)
 
 #endif
index 826d09726293d96a6bca713b2ed875a72ad5bf49..196905ad17f6c8946d3462cdc6e5cb519f6f558c 100644 (file)
@@ -36,7 +36,7 @@ struct ETableServer : public LogEvent {
     LogEvent(EVENT_TABLESERVER),
     table(t), op(o), reqid(ri), bymds(m), tid(ti), version(v) { }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<ETableServer*>& ls);
@@ -54,5 +54,6 @@ struct ETableServer : public LogEvent {
   void update_segment();
   void replay(MDSRank *mds);  
 };
+WRITE_CLASS_ENCODER_FEATURES(ETableServer)
 
 #endif
index 672af2735706f8aa75e777ff571ef1c1dc4b2cd7..7d567e22e7639408a10295512d50f3dfbcb465bd 100644 (file)
@@ -40,7 +40,7 @@ public:
 
   EMetaBlob *get_metablob() { return &metablob; }
 
-  void encode(bufferlist& bl) const;
+  void encode(bufferlist& bl, uint64_t features) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
   static void generate_test_instances(list<EUpdate*>& ls);
@@ -49,5 +49,6 @@ public:
   void replay(MDSRank *mds);
   EMetaBlob const *get_metablob() const {return &metablob;}
 };
+WRITE_CLASS_ENCODER_FEATURES(EUpdate)
 
 #endif
index 406a929ac544ff4af3ddc8910fe5151ecd30697d..55a4a89d121d1c10b09d196afc86f7e5660d6d46 100644 (file)
@@ -400,7 +400,7 @@ void EMetaBlob::update_segment(LogSegment *ls)
 
 // EMetaBlob::fullbit
 
-void EMetaBlob::fullbit::encode(bufferlist& bl) const {
+void EMetaBlob::fullbit::encode(bufferlist& bl, uint64_t features) const {
   ENCODE_START(8, 5, bl);
   ::encode(dn, bl);
   ::encode(dnfirst, bl);
@@ -419,7 +419,7 @@ void EMetaBlob::fullbit::encode(bufferlist& bl) const {
     ::encode(false, bl);
   } else {
     ::encode(true, bl);
-    ::encode(old_inodes, bl);
+    ::encode(old_inodes, bl, features);
   }
   if (!inode.is_dir())
     ::encode(snapbl, bl);
@@ -677,7 +677,7 @@ void EMetaBlob::nullbit::generate_test_instances(list<nullbit*>& ls)
 
 // EMetaBlob::dirlump
 
-void EMetaBlob::dirlump::encode(bufferlist& bl) const
+void EMetaBlob::dirlump::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(2, 2, bl);
   ::encode(fnode, bl);
@@ -685,7 +685,7 @@ void EMetaBlob::dirlump::encode(bufferlist& bl) const
   ::encode(nfull, bl);
   ::encode(nremote, bl);
   ::encode(nnull, bl);
-  _encode_bits();
+  _encode_bits(features);
   ::encode(dnbl, bl);
   ENCODE_FINISH(bl);
 }
@@ -751,12 +751,12 @@ void EMetaBlob::dirlump::generate_test_instances(list<dirlump*>& ls)
 /**
  * EMetaBlob proper
  */
-void EMetaBlob::encode(bufferlist& bl) const
+void EMetaBlob::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(8, 5, bl);
   ::encode(lump_order, bl);
-  ::encode(lump_map, bl);
-  ::encode(roots, bl);
+  ::encode(lump_map, bl, features);
+  ::encode(roots, bl, features);
   ::encode(table_tids, bl);
   ::encode(opened_ino, bl);
   ::encode(allocated_ino, bl);
@@ -1696,7 +1696,7 @@ void ESession::replay(MDSRank *mds)
   update_segment();
 }
 
-void ESession::encode(bufferlist &bl) const
+void ESession::encode(bufferlist &bl, uint64_t features) const
 {
   ENCODE_START(4, 3, bl);
   ::encode(stamp, bl);
@@ -1748,7 +1748,7 @@ void ESession::generate_test_instances(list<ESession*>& ls)
 // -----------------------
 // ESessions
 
-void ESessions::encode(bufferlist &bl) const
+void ESessions::encode(bufferlist &bl, uint64_t features) const
 {
   ENCODE_START(1, 1, bl);
   ::encode(client_map, bl);
@@ -1819,7 +1819,7 @@ void ESessions::replay(MDSRank *mds)
 // -----------------------
 // ETableServer
 
-void ETableServer::encode(bufferlist& bl) const
+void ETableServer::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
@@ -1918,7 +1918,7 @@ void ETableServer::replay(MDSRank *mds)
 // ---------------------
 // ETableClient
 
-void ETableClient::encode(bufferlist& bl) const
+void ETableClient::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
@@ -2003,12 +2003,12 @@ void ESnap::replay(MDSRank *mds)
 // -----------------------
 // EUpdate
 
-void EUpdate::encode(bufferlist &bl) const
+void EUpdate::encode(bufferlist &bl, uint64_t features) const
 {
   ENCODE_START(4, 4, bl);
   ::encode(stamp, bl);
   ::encode(type, bl);
-  ::encode(metablob, bl);
+  ::encode(metablob, bl, features);
   ::encode(client_map, bl);
   ::encode(cmapv, bl);
   ::encode(reqid, bl);
@@ -2094,10 +2094,10 @@ void EUpdate::replay(MDSRank *mds)
 // ------------------------
 // EOpen
 
-void EOpen::encode(bufferlist &bl) const {
+void EOpen::encode(bufferlist &bl, uint64_t features) const {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
-  ::encode(metablob, bl);
+  ::encode(metablob, bl, features);
   ::encode(inos, bl);
   ENCODE_FINISH(bl);
 } 
@@ -2169,7 +2169,7 @@ void ECommitted::replay(MDSRank *mds)
   }
 }
 
-void ECommitted::encode(bufferlist& bl) const
+void ECommitted::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
@@ -2380,7 +2380,7 @@ void rename_rollback::generate_test_instances(list<rename_rollback*>& ls)
   ls.back()->stray.remote_d_type = IFTODT(S_IFREG);
 }
 
-void ESlaveUpdate::encode(bufferlist &bl) const
+void ESlaveUpdate::encode(bufferlist &bl, uint64_t features) const
 {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
@@ -2389,7 +2389,7 @@ void ESlaveUpdate::encode(bufferlist &bl) const
   ::encode(master, bl);
   ::encode(op, bl);
   ::encode(origop, bl);
-  ::encode(commit, bl);
+  ::encode(commit, bl, features);
   ::encode(rollback, bl);
   ENCODE_FINISH(bl);
 } 
@@ -2472,11 +2472,11 @@ void ESlaveUpdate::replay(MDSRank *mds)
 // -----------------------
 // ESubtreeMap
 
-void ESubtreeMap::encode(bufferlist& bl) const
+void ESubtreeMap::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(6, 5, bl);
   ::encode(stamp, bl);
-  ::encode(metablob, bl);
+  ::encode(metablob, bl, features);
   ::encode(subtrees, bl);
   ::encode(ambiguous_subtrees, bl);
   ::encode(expire_pos, bl);
@@ -2716,14 +2716,14 @@ void EFragment::replay(MDSRank *mds)
     in->verify_dirfrags();
 }
 
-void EFragment::encode(bufferlist &bl) const {
+void EFragment::encode(bufferlist &bl, uint64_t features) const {
   ENCODE_START(5, 4, bl);
   ::encode(stamp, bl);
   ::encode(op, bl);
   ::encode(ino, bl);
   ::encode(basefrag, bl);
   ::encode(bits, bl);
-  ::encode(metablob, bl);
+  ::encode(metablob, bl, features);
   ::encode(orig_frags, bl);
   ::encode(rollback, bl);
   ENCODE_FINISH(bl);
@@ -2812,11 +2812,11 @@ void EExport::replay(MDSRank *mds)
   mds->mdcache->try_trim_non_auth_subtree(dir);
 }
 
-void EExport::encode(bufferlist& bl) const
+void EExport::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
-  ::encode(metablob, bl);
+  ::encode(metablob, bl, features);
   ::encode(base, bl);
   ::encode(bounds, bl);
   ENCODE_FINISH(bl);
@@ -2907,11 +2907,11 @@ void EImportStart::replay(MDSRank *mds)
   update_segment();
 }
 
-void EImportStart::encode(bufferlist &bl) const {
+void EImportStart::encode(bufferlist &bl, uint64_t features) const {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
   ::encode(base, bl);
-  ::encode(metablob, bl);
+  ::encode(metablob, bl, features);
   ::encode(bounds, bl);
   ::encode(cmapv, bl);
   ::encode(client_map, bl);
@@ -2975,7 +2975,7 @@ void EImportFinish::replay(MDSRank *mds)
   }
 }
 
-void EImportFinish::encode(bufferlist& bl) const
+void EImportFinish::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(3, 3, bl);
   ::encode(stamp, bl);
@@ -3010,7 +3010,7 @@ void EImportFinish::generate_test_instances(list<EImportFinish*>& ls)
 // ------------------------
 // EResetJournal
 
-void EResetJournal::encode(bufferlist& bl) const
+void EResetJournal::encode(bufferlist& bl, uint64_t features) const
 {
   ENCODE_START(2, 2, bl);
   ::encode(stamp, bl);
@@ -3055,7 +3055,7 @@ void EResetJournal::replay(MDSRank *mds)
 }
 
 
-void ENoOp::encode(bufferlist &bl) const
+void ENoOp::encode(bufferlist &bl, uint64_t features) const
 {
   ENCODE_START(2, 2, bl);
   ::encode(pad_size, bl);
index 2668f0b01408f0d5fece60a5018617506158f8a7..0815c14a56b236dbabc3bfeceec11c02d551c904 100644 (file)
@@ -203,43 +203,43 @@ TYPE(InoTable)
 TYPE_STRAYDATA(SnapServer)
 
 #include "mds/events/ECommitted.h"
-TYPE(ECommitted)
+TYPE_FEATUREFUL(ECommitted)
 #include "mds/events/EExport.h"
-TYPE(EExport)
+TYPE_FEATUREFUL(EExport)
 #include "mds/events/EFragment.h"
-TYPE(EFragment)
+TYPE_FEATUREFUL(EFragment)
 #include "mds/events/EImportFinish.h"
-TYPE(EImportFinish)
+TYPE_FEATUREFUL(EImportFinish)
 #include "mds/events/EImportStart.h"
-TYPE(EImportStart)
+TYPE_FEATUREFUL(EImportStart)
 #include "mds/events/EMetaBlob.h"
-TYPE_NOCOPY(EMetaBlob::fullbit)
+TYPE_FEATUREFUL_NOCOPY(EMetaBlob::fullbit)
 TYPE(EMetaBlob::remotebit)
 TYPE(EMetaBlob::nullbit)
-TYPE(EMetaBlob::dirlump)
-TYPE(EMetaBlob)
+TYPE_FEATUREFUL(EMetaBlob::dirlump)
+TYPE_FEATUREFUL(EMetaBlob)
 #include "mds/events/EOpen.h"
-TYPE(EOpen)
+TYPE_FEATUREFUL(EOpen)
 #include "mds/events/EResetJournal.h"
-TYPE(EResetJournal)
+TYPE_FEATUREFUL(EResetJournal)
 #include "mds/events/ESession.h"
-TYPE(ESession)
+TYPE_FEATUREFUL(ESession)
 #include "mds/events/ESessions.h"
-TYPE(ESessions)
+TYPE_FEATUREFUL(ESessions)
 #include "mds/events/ESlaveUpdate.h"
 TYPE(link_rollback)
 TYPE(rmdir_rollback)
 TYPE(rename_rollback::drec)
 TYPE(rename_rollback)
-TYPE(ESlaveUpdate)
+TYPE_FEATUREFUL(ESlaveUpdate)
 #include "mds/events/ESubtreeMap.h"
-TYPE(ESubtreeMap)
+TYPE_FEATUREFUL(ESubtreeMap)
 #include "mds/events/ETableClient.h"
-TYPE(ETableClient)
+TYPE_FEATUREFUL(ETableClient)
 #include "mds/events/ETableServer.h"
-TYPE(ETableServer)
+TYPE_FEATUREFUL(ETableServer)
 #include "mds/events/EUpdate.h"
-TYPE(EUpdate)
+TYPE_FEATUREFUL(EUpdate)
 
 #ifdef WITH_RBD
 #include "librbd/journal/Types.h"
index a93c099a918d1029f5a0db68a5023188d09abca5..52eddba4879a168dfbc4ba274f6e5824961ac310 100644 (file)
@@ -36,7 +36,7 @@ int EventOutput::binary() const
   for (JournalScanner::EventMap::const_iterator i = scan.events.begin(); i != scan.events.end(); ++i) {
     LogEvent *le = i->second.log_event;
     bufferlist le_bin;
-    le->encode(le_bin);
+    le->encode(le_bin, CEPH_FEATURES_SUPPORTED_DEFAULT);
 
     std::stringstream filename;
     filename << "0x" << std::hex << i->first << std::dec << "_" << le->get_type_str() << ".bin";
index d07d48743e2df937b2f5c43db255c66d9c87826a..43ba9d354372cc4763f852c266f38d250969a26d 100644 (file)
@@ -1095,7 +1095,7 @@ int JournalTool::erase_region(JournalScanner const &js, uint64_t const pos, uint
   // is needed inside the ENoOp to make up the difference.
   bufferlist tmp;
   ENoOp enoop(0);
-  enoop.encode_with_header(tmp);
+  enoop.encode_with_header(tmp, CEPH_FEATURES_SUPPORTED_DEFAULT);
 
   dout(4) << "erase_region " << pos << " len=" << length << dendl;
 
@@ -1111,7 +1111,7 @@ int JournalTool::erase_region(JournalScanner const &js, uint64_t const pos, uint
   // Serialize an ENoOp with the correct amount of padding
   enoop = ENoOp(padding);
   bufferlist entry;
-  enoop.encode_with_header(entry);
+  enoop.encode_with_header(entry, CEPH_FEATURES_SUPPORTED_DEFAULT);
   JournalStream stream(JOURNAL_FORMAT_RESILIENT);
 
   // Serialize region of log stream
index 6beaf98d5899db95b5f89c5159d84a75a0abd8c3..78f20cdd177e9fb7a9d1ce4f33908ffd5dc222ba 100644 (file)
@@ -161,7 +161,7 @@ int Resetter::_write_reset_event(Journaler *journaler)
   LogEvent *le = new EResetJournal;
 
   bufferlist bl;
-  le->encode_with_header(bl);
+  le->encode_with_header(bl, CEPH_FEATURES_SUPPORTED_DEFAULT);
   
   cout << "writing EResetJournal entry" << std::endl;
   C_SaferCond cond;