]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: open mydir after replay
authorSage Weil <sage@inktank.com>
Fri, 18 Jan 2013 06:00:42 +0000 (22:00 -0800)
committerSage Weil <sage@inktank.com>
Wed, 30 Jan 2013 00:24:45 +0000 (16:24 -0800)
In certain cases, we may replay the journal and not end up with the
dirfrag for mydir open.  This is fine--we just need to open it up and
fetch it below.

Signed-off-by: Sage Weil <sage@inktank.com>
src/mds/MDCache.cc

index 545ffdca2e15c92f69c37f0baf37f005389eff99..2eb8220b3f8c9118ea083d02d02c649d908bf5ea 100644 (file)
@@ -575,7 +575,7 @@ void MDCache::open_root()
 void MDCache::populate_mydir()
 {
   assert(myin);
-  CDir *mydir = myin->get_dirfrag(frag_t());
+  CDir *mydir = myin->get_or_open_dirfrag(this, frag_t());
   assert(mydir);
 
   dout(10) << "populate_mydir " << *mydir << dendl;