From: Yan, Zheng Date: Thu, 12 Dec 2013 02:37:27 +0000 (+0800) Subject: mds: properly update mdsdir's authority during recovery X-Git-Tag: v0.75~93^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=802df76f68be867b6143d6f5d9577d245ac25a8a;p=ceph.git mds: properly update mdsdir's authority during recovery dirfrag of mdsdir doesn't inherit its parent inode's authority. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e25df16cf284..451db8afc5ec 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -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; }