From: Yan, Zheng Date: Thu, 18 Dec 2014 12:01:50 +0000 (+0800) Subject: mds: properly update trace vector when quiting path traverse X-Git-Tag: v0.93~87^2~26 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=335f02bf7dde417350dec9cef9c3e6bdb3cfeab5;p=ceph.git 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 --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index cdf59a6a8bbc..3e2203e021ce 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;