From 761eb16125a795a445f115c24741364c741f29f2 Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Wed, 31 Jul 2024 10:48:01 +0800 Subject: [PATCH] mds: print the path depth to help debug mds issue From the path depth we can get more useful info, such as whether the path_traverse() acquired any locks, etc. Fixes: https://tracker.ceph.com/issues/67280 Signed-off-by: Xiubo Li (cherry picked from commit 5d8aa5245cb7e5d819651898533130e463b373fe) --- src/mds/MDCache.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 44f08189527..8aa1386c34a 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -8331,7 +8331,8 @@ int MDCache::path_traverse(const MDRequestRef& mdr, MDSContextFactory& cf, if (mds->logger) mds->logger->inc(l_mds_traverse); - dout(7) << "traverse: opening base ino " << path.get_ino() << " snap " << snapid << dendl; + dout(7) << "traverse: opening base ino " << path.get_ino() << " snap " << snapid + << " path depth " << path.depth() << dendl; CInode *cur = get_inode(path.get_ino()); if (!cur) { if (MDS_INO_IS_MDSDIR(path.get_ino())) { -- 2.39.5