]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly update trace vector when quiting path traverse
authorYan, Zheng <zyan@redhat.com>
Thu, 18 Dec 2014 12:01:50 +0000 (20:01 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 5 Feb 2015 14:40:38 +0000 (22:40 +0800)
rdlock_path_pin_ref() uses the trace vector to setup request reply's
tracedn

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/MDCache.cc

index cdf59a6a8bbcc43ff0fc282e66cb502a553b05d1..3e2203e021ce8e196cf2b251303063e2d81fe2a9 100644 (file)
@@ -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;