]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: Adjust mydir auth when starting MDS that was stopped cleanly
authorYan, Zheng <zheng.z.yan@intel.com>
Tue, 25 Sep 2012 05:46:06 +0000 (13:46 +0800)
committerSamuel Just <sam.just@inktank.com>
Tue, 25 Sep 2012 21:09:28 +0000 (14:09 -0700)
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 <zheng.z.yan@intel.com>
src/mds/MDCache.cc
src/mds/MDS.cc

index da3affbe1a1d9e64e2bd4c6b532190188acfcde2..3784b14af96f989ed6aedfd3c8e20fe69d88fe2d 100644 (file)
@@ -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();
 }
index d0aac301d8703c9707c4d01b6315ead10c0bf258..8ad901aa273550ee865f2c7bbb61125e9c4fa364 100644 (file)
@@ -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();
 }