From c6ac3a824803ced6ff1825b10f78be22c3e59080 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Wed, 31 Jul 2024 10:14:59 +0800 Subject: [PATCH] mds: add the event when creating the batch head 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 (cherry picked from commit 7e08760a0e560759fa73e7b889494bdb60a03ff3) --- src/mds/Server.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 6e429f7dc24..b7b2d3eb076 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -4079,6 +4079,7 @@ void Server::handle_client_getattr(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(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); @@ -4091,6 +4092,7 @@ void Server::handle_client_getattr(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(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); -- 2.39.5