]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: load root inode on replay if auth
authorSage Weil <sage@newdream.net>
Mon, 3 Jan 2011 22:32:48 +0000 (14:32 -0800)
committerSage Weil <sage@newdream.net>
Mon, 3 Jan 2011 22:33:03 +0000 (14:33 -0800)
If we are auth for the root inode, load it's initial value off of disk. We
may not see it in the log if it has not been modified.  If it has, this
is useless but fast/harmless.  This only occurs for brand-new filesystems
where the mds is immediately restarted.

Fixes #671.

Signed-off-by: Sage Weil <sage@newdream.net>
src/mds/MDS.cc

index 30dccd81a6b2ba25bfbc232168091bf556b87191..4b7fa844e616bb088df4ad811d18cc81a1d56814 100644 (file)
@@ -1118,7 +1118,8 @@ void MDS::boot_start(int step, int r)
     break;
 
   case 2:
-    if (is_starting()) {
+    if (is_starting() ||
+       whoami == mdsmap->get_root()) {  // load root inode off disk if we are auth
       dout(2) << "boot_start " << step << ": loading/discovering root inode" << dendl;
       mdcache->open_root_inode(new C_MDS_BootStart(this, 3));
       break;