]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly set error_dentry for discover reply
authorYan, Zheng <zheng.z.yan@intel.com>
Sun, 6 Jan 2013 01:15:55 +0000 (09:15 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 28 Jan 2013 02:18:15 +0000 (10:18 +0800)
If MDCache::handle_discover() receives an 'discover path' request but
can not find the base inode. It should properly set the 'error_dentry'
to make sure MDCache::handle_discover_reply() checks correct object's
wait queue.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index 9557436bb9dd882da084f067542fbf4ca90a9c2c..adcf8c1ef28e336fd623ee3d3d9b24cd78f2f3eb 100644 (file)
@@ -8644,6 +8644,8 @@ void MDCache::handle_discover(MDiscover *dis)
       dout(7) << "handle_discover mds." << from 
              << " don't have base ino " << dis->get_base_ino() << "." << snapid
              << dendl;
+      if (!dis->wants_base_dir() && dis->get_want().depth() > 0)
+       reply->set_error_dentry(dis->get_dentry(0));
       reply->set_flag_error_dir();
     } else if (dis->wants_base_dir()) {
       dout(7) << "handle_discover mds." << from