]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add the event when creating the batch head 58950/head
authorXiubo Li <xiubli@redhat.com>
Wed, 31 Jul 2024 02:14:59 +0000 (10:14 +0800)
committerXiubo Li <xiubli@redhat.com>
Wed, 31 Jul 2024 03:10:08 +0000 (11:10 +0800)
This could help us the debug the slow request or deadlock bugs and
we could know which stage the request has been in.

Fixes: https://tracker.ceph.com/issues/67280
Signed-off-by: Xiubo Li <xiubli@redhat.com>
src/mds/Server.cc

index 011718aa8c96baf897311c563fc831859da5339a..275a62c587aefe2ea2b171baadfe2bb8f957af6b 100644 (file)
@@ -4135,6 +4135,7 @@ void Server::handle_client_getattr(const MDRequestRef& mdr, bool is_lookup)
       auto em = dn->batch_ops.emplace(std::piecewise_construct, std::forward_as_tuple(mask), std::forward_as_tuple());
       if (em.second) {
        em.first->second = std::make_unique<Batch_Getattr_Lookup>(this, mdr);
+        mdr->mark_event("creating lookup batch head");
       } else {
        dout(20) << __func__ << ": LOOKUP op, wait for previous same getattr ops to respond. " << *mdr << dendl;
        em.first->second->add_request(mdr);
@@ -4147,6 +4148,7 @@ void Server::handle_client_getattr(const MDRequestRef& mdr, bool is_lookup)
       auto em = in->batch_ops.emplace(std::piecewise_construct, std::forward_as_tuple(mask), std::forward_as_tuple());
       if (em.second) {
        em.first->second = std::make_unique<Batch_Getattr_Lookup>(this, mdr);
+        mdr->mark_event("creating getattr batch head");
       } else {
        dout(20) << __func__ << ": GETATTR op, wait for previous same getattr ops to respond. " << *mdr << dendl;
        em.first->second->add_request(mdr);