From: "Yan, Zheng" <[email protected]>
Signed-off-by: Yan, Zheng <[email protected]>
---
src/mds/MDCache.cc | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc
index 5d88075..9ad6919 100644
--- a/src/mds/MDCache.cc
+++ b/src/mds/MDCache.cc
@@ -2343,11 +2343,17 @@ ESubtreeMap *MDCache::create_subtree_map()
if (oldparent->get_dir_auth() != newparent->get_dir_auth()) {
dout(10) << " creating subtree for " << dir->dirfrag() << dendl;
// if oldparent is auth, subtree is mine; include it.
- if (oldparent->get_dir_auth().first == mds->whoami)
+ if (oldparent->get_dir_auth().first == mds->whoami) {
le->subtrees[dir->dirfrag()].clear();
+ le->metablob.add_dir_context(dir, EMetaBlob::TO_ROOT);
+ le->metablob.add_dir(dir, false);
+ }
// if newparent is auth, subtree is a new bound
- if (le->subtrees.count(newparent->dirfrag()))
+ if (le->subtrees.count(newparent->dirfrag())) {
le->subtrees[newparent->dirfrag()].push_back(dir->dirfrag()); //
newparent is auth; new bound
+ le->metablob.add_dir_context(dir, EMetaBlob::TO_ROOT);
+ le->metablob.add_dir(dir, false);
+ }
newparent = dir;
}
--
1.7.11.7
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html