]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: properly update mdsdir's authority during recovery
authorYan, Zheng <zheng.z.yan@intel.com>
Thu, 12 Dec 2013 02:37:27 +0000 (10:37 +0800)
committerYan, Zheng <zheng.z.yan@intel.com>
Mon, 16 Dec 2013 06:24:52 +0000 (14:24 +0800)
dirfrag of mdsdir doesn't inherit its parent inode's authority.

Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
src/mds/MDCache.cc

index e25df16cf284c9d82cfd2b7bbeb9c714ab862968..451db8afc5ecf621a1f473613e0e73a6b9edd18a 100644 (file)
@@ -4649,8 +4649,9 @@ void MDCache::handle_cache_rejoin_ack(MMDSCacheRejoin *ack)
       }
       // barebones dirfrag; the full dirfrag loop below will clean up.
       dir = diri->add_dirfrag(new CDir(diri, p->first.frag, this, false));
-      if (dir->authority() != CDIR_AUTH_UNDEF &&
-         dir->authority().first != from)
+      if (MDS_INO_MDSDIR(from) == p->first.ino ||
+         (dir->authority() != CDIR_AUTH_UNDEF &&
+          dir->authority().first != from))
        adjust_subtree_auth(dir, from);
       dout(10) << " add dirfrag " << *dir << dendl;
     }