From: Sage Weil Date: Mon, 3 Jan 2011 22:32:48 +0000 (-0800) Subject: mds: load root inode on replay if auth X-Git-Tag: v0.24.1~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b40e7dc0f73bc24631e8cd79d68d790733aafb99;p=ceph.git mds: load root inode on replay if auth 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 --- diff --git a/src/mds/MDS.cc b/src/mds/MDS.cc index 30dccd81a6b2..4b7fa844e616 100644 --- a/src/mds/MDS.cc +++ b/src/mds/MDS.cc @@ -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;