]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add get_metablob() to log events
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 19 Jun 2014 12:56:15 +0000 (20:56 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Fri, 27 Jun 2014 07:45:55 +0000 (15:45 +0800)
later commits will use it to get EMetaBlob and update EMetaBlob's
event sequence number.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/LogEvent.h
src/mds/events/EExport.h
src/mds/events/EFragment.h
src/mds/events/EImportStart.h
src/mds/events/EOpen.h
src/mds/events/ESlaveUpdate.h
src/mds/events/ESubtreeMap.h
src/mds/events/EUpdate.h

index 67c22e75233ff15b09b64d618e8a1b0812effe07..145c69acf49df169c0057683d116d4ec91a88bd2 100644 (file)
@@ -115,7 +115,7 @@ public:
    * If the subclass embeds a MetaBlob, return it here so that
    * tools can examine metablobs while traversing lists of LogEvent.
    */
-  virtual EMetaBlob const *get_metablob() const {return NULL;}
+  virtual EMetaBlob *get_metablob() { return NULL; }
 };
 
 inline ostream& operator<<(ostream& out, LogEvent& le) {
index 082e14babb85bfe833249c66f1060fab56e134ab..1cab674fa423335ca13c1bbf981828f358c6b001 100644 (file)
@@ -42,6 +42,8 @@ public:
     out << "EExport " << base << " " << metablob;
   }
 
+  EMetaBlob *get_metablob() { return &metablob; }
+
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
index 8869137bcc65b37320ca7fe1fb60237bf31c5203..56f548585a3ae46a5be9273d1ed1312450a80ee3 100644 (file)
@@ -68,6 +68,8 @@ public:
       ::encode(*drb, rollback);
   }
 
+  EMetaBlob *get_metablob() { return &metablob; }
+
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);
   void dump(Formatter *f) const;
index 0f55190139c9dd68f34c7109a2aa5f4b6f156f24..17d0bdd293eda38e12040dce0926cd59cf6e81eb 100644 (file)
@@ -43,6 +43,8 @@ protected:
   void print(ostream& out) const {
     out << "EImportStart " << base << " " << metablob;
   }
+
+  EMetaBlob *get_metablob() { return &metablob; }
   
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);
index d1c41558b40ad0587118d80bd678e69e57aaa016..207b32b8010aac470da06beee699c25eaf5f40e2 100644 (file)
@@ -31,6 +31,8 @@ public:
     out << "EOpen " << metablob << ", " << inos.size() << " open files";
   }
 
+  EMetaBlob *get_metablob() { return &metablob; }
+
   void add_clean_inode(CInode *in) {
     if (!in->is_base()) {
       metablob.add_dir_context(in->get_projected_parent_dn()->get_dir());
@@ -49,7 +51,6 @@ public:
 
   void update_segment();
   void replay(MDS *mds);
-  EMetaBlob const *get_metablob() const {return &metablob;}
 };
 
 #endif
index b45351ae732ce0df8a353c4a7c839099250af42a..9745139339ad4bfd42ca7756b7dc9579080a046c 100644 (file)
@@ -136,6 +136,8 @@ public:
     out << commit;
   }
 
+  EMetaBlob *get_metablob() { return &commit; }
+
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
index 32a4abe5180d3a1fad359ae81429376163559afb..1349dfce91146868199dcdf4b51162a3d7039359 100644 (file)
@@ -33,6 +33,8 @@ public:
        << metablob;
   }
 
+  EMetaBlob *get_metablob() { return &metablob; }
+
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;
index d6d82410c14d38f27a25178b379f3b81fc03612e..d3455e15cd0b044f2cd526cb8bca82dd97024e04 100644 (file)
@@ -38,6 +38,8 @@ public:
     out << metablob;
   }
 
+  EMetaBlob *get_metablob() { return &metablob; }
+
   void encode(bufferlist& bl) const;
   void decode(bufferlist::iterator& bl);
   void dump(Formatter *f) const;