]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: print internal_request filepaths if present
authorPatrick Donnelly <pdonnell@redhat.com>
Wed, 31 Jan 2024 19:28:14 +0000 (14:28 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 22 Mar 2024 15:38:02 +0000 (11:38 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit eaea93e05018294e893e0e5241b3293e10971f5e)

src/mds/Mutation.cc
src/mds/Mutation.h

index 9b71e244e08a4fc52f95e98d3ef645bd2a876ac1..f866f663359c6f66ece9047f178819a0c5203bc2 100644 (file)
@@ -287,6 +287,12 @@ MDRequestImpl::More* MDRequestImpl::more()
   return _more;
 }
 
+MDRequestImpl::More const* MDRequestImpl::more() const
+{
+  ceph_assert(_more);
+  return _more;
+}
+
 bool MDRequestImpl::has_more() const
 {
   return _more != nullptr;
@@ -373,14 +379,14 @@ void MDRequestImpl::drop_local_auth_pins()
   MutationImpl::drop_local_auth_pins();
 }
 
-const filepath& MDRequestImpl::get_filepath()
+const filepath& MDRequestImpl::get_filepath() const
 {
   if (client_request)
     return client_request->get_filepath();
   return more()->filepath1;
 }
 
-const filepath& MDRequestImpl::get_filepath2()
+const filepath& MDRequestImpl::get_filepath2() const
 {
   if (client_request)
     return client_request->get_filepath2();
@@ -549,6 +555,16 @@ void MDRequestImpl::_dump_op_descriptor(ostream& os) const
     os << "peer_request:" << reqid;
   } else if (internal_op >= 0) {
     os << "internal op " << ceph_mds_op_name(internal_op) << ":" << reqid;
+    if (has_more()) {
+      auto& fp = get_filepath();
+      if (!fp.empty()) {
+        os << " fp=" << fp;
+      }
+      auto& fp2 = get_filepath2();
+      if (!fp2.empty()) {
+        os << " fp2=" << fp2;
+      }
+    }
   } else {
     // drat, it's triggered by a peer request, but we don't have a message
     // FIXME
index 297524a28c025d796fd6a1019a7f537094f6ad28..a8a89e1ef3ffa6b2919d061ccc89f853aaa43c2c 100644 (file)
@@ -389,6 +389,7 @@ struct MDRequestImpl : public MutationImpl {
   ~MDRequestImpl() override;
   
   More* more();
+  More const* more() const;
   bool has_more() const;
   bool has_witnesses();
   bool peer_did_prepare();
@@ -400,8 +401,8 @@ struct MDRequestImpl : public MutationImpl {
   void drop_local_auth_pins();
   void set_ambiguous_auth(CInode *inode);
   void clear_ambiguous_auth();
-  const filepath& get_filepath();
-  const filepath& get_filepath2();
+  const filepath& get_filepath() const;
+  const filepath& get_filepath2() const;
   void set_filepath(const filepath& fp);
   void set_filepath2(const filepath& fp);
   bool is_queued_for_replay() const;