diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-01-06 09:15:55 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2013-01-28 10:18:15 +0800 |
commit | 659d1a39458fdc2b73ad2d3512d1ea2ce6f7566d (patch) | |
tree | dfee1c965ca1324c7db9fc2c5c338ff0fbb4891e | |
parent | 6daec53059b60346eda928fbc7b4d8696cca6041 (diff) | |
download | ceph-659d1a39458fdc2b73ad2d3512d1ea2ce6f7566d.tar.gz |
mds: properly set error_dentry for discover reply
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>
-rw-r--r-- | src/mds/MDCache.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 9557436bb9d..adcf8c1ef28 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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 |