From: Yan, Zheng Date: Tue, 25 Sep 2012 05:46:06 +0000 (+0800) Subject: mds: Adjust mydir auth when starting MDS that was stopped cleanly X-Git-Tag: v0.53~41^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=681f6140e717dffae305ab768b9d25ceabcb65cd;p=ceph.git mds: Adjust mydir auth when starting MDS that was stopped cleanly When starting a MDS that was stopped cleanly, we need manually adjust mydir's auth. This is because MDS log is empty in this case, mydir's auth can not be adjusted during log replay. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index da3affbe1a1d..3784b14af96f 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -565,6 +565,7 @@ void MDCache::open_root() } CDir *mydir = myin->get_or_open_dirfrag(this, frag_t()); assert(mydir); + adjust_subtree_auth(mydir, mds->whoami); populate_mydir(); } diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index d0aac301d870..8ad901aa2735 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -1229,10 +1229,10 @@ void MDS::starting_done() assert(is_starting()); request_state(MDSMap::STATE_ACTIVE); + mdcache->open_root(); + // start new segment mdlog->start_new_segment(0); - - mdcache->open_root(); }