]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client/MetaRequest: Add age to MetaRequest dump 31382/head 31383/head 31384/head
authorVarsha Rao <varao@redhat.com>
Wed, 28 Aug 2019 07:37:32 +0000 (13:07 +0530)
committerNathan Cutler <ncutler@suse.com>
Mon, 4 Nov 2019 18:25:41 +0000 (19:25 +0100)
Fixes: https://tracker.ceph.com/issues/40821
Signed-off-by: Varsha Rao <varao@redhat.com>
(cherry picked from commit 7af024345a8c5ef7d65401713fc73eed9ea9c6bb)

src/client/MetaRequest.cc

index b6574def51721eda98223959004318232840c01b..623b0f254ab7fb082fe22b3f698046c6cd2f3cd8 100644 (file)
@@ -10,6 +10,8 @@
 
 void MetaRequest::dump(Formatter *f) const
 {
+  auto age = std::chrono::duration<double>(ceph_clock_now() - op_stamp);
+
   f->dump_unsigned("tid", tid);
   f->dump_string("op", ceph_mds_op_name(head.op));
   f->dump_stream("path") << path;
@@ -29,6 +31,7 @@ void MetaRequest::dump(Formatter *f) const
   f->dump_stream("hint_ino") << inodeno_t(head.ino);
 
   f->dump_stream("sent_stamp") << sent_stamp;
+  f->dump_float("age", age.count());
   f->dump_int("mds", mds);
   f->dump_int("resend_mds", resend_mds);
   f->dump_int("send_to_auth", send_to_auth);