]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: set up root inode properly on replay
authorSage Weil <sage@newdream.net>
Tue, 4 Aug 2009 21:10:33 +0000 (14:10 -0700)
committerSage Weil <sage@newdream.net>
Tue, 4 Aug 2009 22:33:36 +0000 (15:33 -0700)
src/mds/MDCache.cc
src/mds/MDS.cc

index f9a9adae83b76557ea62372c77f57db9be52f1a8..a0b8ab768ec5eb1bf61046c01005e64536abb880 100644 (file)
@@ -2631,6 +2631,9 @@ void MDCache::recalc_auth_bits()
 {
   dout(7) << "recalc_auth_bits" << dendl;
 
+  if (mds->whoami != mds->mdsmap->get_root())
+    root->state_clear(CInode::STATE_AUTH);
+
   set<CInode*> subtree_inodes;
   for (map<CDir*,set<CDir*> >::iterator p = subtrees.begin();
        p != subtrees.end();
index 9c87808aef82c5d1a4c5553f5c5e2f93fc8624c3..05e82bd7278bc0c688ef46edab9450efa25aa875 100644 (file)
@@ -886,9 +886,15 @@ void MDS::boot_start(int step, int r)
     break;
 
   case 2:
-    dout(2) << "boot_start " << step << ": loading/discovering root inode" << dendl;
-    mdcache->open_root_inode(new C_MDS_BootStart(this, 3));
-    break;
+    if (is_starting()) {
+      dout(2) << "boot_start " << step << ": loading/discovering root inode" << dendl;
+      mdcache->open_root_inode(new C_MDS_BootStart(this, 3));
+      break;
+    } else {
+      // replay.  make up fake root inode to start with
+      mdcache->create_root_inode();
+      step = 3;
+    }
 
   case 3:
     if (is_replay() || is_standby_replay()) {