diff options
author | Yan, Zheng <zheng.z.yan@intel.com> | 2013-05-11 18:47:49 +0800 |
---|---|---|
committer | Yan, Zheng <zheng.z.yan@intel.com> | 2013-05-28 13:57:21 +0800 |
commit | 9424298f27e3736c5584eb2bb5728070daeb184f (patch) | |
tree | ed46b7126dbccdf49b9959ab67702b0ea0725b47 | |
parent | c9707f636cf2196ca45ebcb63234a2ca12c69151 (diff) | |
download | ceph-9424298f27e3736c5584eb2bb5728070daeb184f.tar.gz |
mds: fix check for base inode discovery
If a MDiscover message is for discovering base inode, want_base_dir
should be false, path should be empty.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
-rw-r--r-- | src/mds/MDCache.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 5e8f2a5fdea..5c2732bf0f3 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9175,7 +9175,8 @@ void MDCache::handle_discover(MDiscover *dis) snapid_t snapid = dis->get_snapid(); // get started. - if (MDS_INO_IS_BASE(dis->get_base_ino())) { + if (MDS_INO_IS_BASE(dis->get_base_ino()) && + !dis->wants_base_dir() && dis->get_want().depth() == 0) { // wants root dout(7) << "handle_discover from mds." << from << " wants base + " << dis->get_want().get_path() |