From 335f02bf7dde417350dec9cef9c3e6bdb3cfeab5 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Thu, 18 Dec 2014 20:01:50 +0800 Subject: [PATCH] mds: properly update trace vector when quiting path traverse rdlock_path_pin_ref() uses the trace vector to setup request reply's tracedn Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index cdf59a6a8bbcc..3e2203e021ce8 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -7536,6 +7536,12 @@ int MDCache::path_traverse(MDRequestRef& mdr, Message *req, MDSInternalContextBa if (dn->lock.can_read(client) || (dn->lock.is_xlocked() && dn->lock.get_xlock_by() == mdr)) { dout(10) << "traverse: miss on null+readable dentry " << path[depth] << " " << *dn << dendl; + if (pdnvec) { + if (depth == path.depth() - 1) + pdnvec->push_back(dn); + else + pdnvec->clear(); // do not confuse likes of rdlock_path_pin_ref(); + } return -ENOENT; } else { dout(10) << "miss on dentry " << *dn << ", can't read due to lock" << dendl; -- 2.39.5