]> git-server-git.apps.pok.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>
Fri, 18 Jan 2013 06:00:42 +0000 (22:00 -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 9557436bb9dd882da084f067542fbf4ca90a9c2c..8b8e8e70f3dd190a275ac01de51ab2155fc42de9 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;