[PATCH 2/6] mds: add projected rename's subtree bounds to ESubtreeMap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx>

Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx>
---
 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 majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [CEPH Users]     [Ceph Large]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux