]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add a dump() method to MutationImpl
authorJohn Spray <john.spray@redhat.com>
Tue, 17 Mar 2015 18:36:13 +0000 (18:36 +0000)
committerJohn Spray <john.spray@redhat.com>
Thu, 19 Mar 2015 21:27:34 +0000 (21:27 +0000)
This is just an externally callable wrapper
to _dump that doesn't require caller
to pass in a time.

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

index 3fb54e9b2a6ef057a80718b48186904b3bbb44ae..0ae173278b7806619c88192572eb049b13e7e713 100644 (file)
@@ -313,6 +313,11 @@ void MDRequestImpl::print(ostream &out)
   out << ")";
 }
 
+void MDRequestImpl::dump(Formatter *f) const
+{
+  _dump(ceph_clock_now(g_ceph_context), f);
+}
+
 void MDRequestImpl::_dump(utime_t now, Formatter *f) const
 {
   f->dump_string("flag_point", state_string());
index bf63744bf72f4a28400c92bb8fd8b2936a0a9e3f..bc091c7b28800c87d713f16c98d6b9849d5548fe 100644 (file)
@@ -161,6 +161,8 @@ public:
   virtual void print(ostream &out) {
     out << "mutation(" << this << ")";
   }
+
+  virtual void dump(Formatter *f) const {}
 };
 
 inline ostream& operator<<(ostream& out, MutationImpl &mut)
@@ -336,6 +338,7 @@ struct MDRequestImpl : public MutationImpl, public TrackedOp {
   void set_filepath2(const filepath& fp);
 
   void print(ostream &out);
+  void dump(Formatter *f) const;
 
   // TrackedOp stuff
   typedef ceph::shared_ptr<MDRequestImpl> Ref;