From 4e844c948b2d53595674e676fcc9e5eb040a49f7 Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Sat, 3 May 2014 08:53:01 +0800 Subject: [PATCH] mds: encode dirfrag base in cache rejoin ack Makes sure recovering MDS get uptodate fragstat/rstat for subtree root dirfrags. it's required the codes that fix-up inode's fragstat/rstat. Signed-off-by: Yan, Zheng --- src/mds/MDCache.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 82fb44242c6..342eca0a1fb 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -4054,8 +4054,10 @@ void MDCache::handle_cache_rejoin_weak(MMDSCacheRejoin *weak) dirs_to_share.insert(dir); unsigned nonce = dir->add_replica(from); dout(10) << " have " << p->frag << " -> " << fg << " " << *dir << dendl; - if (ack) + if (ack) { ack->add_strong_dirfrag(dir->dirfrag(), nonce, dir->dir_rep); + ack->add_dirfrag_base(dir); + } } } } -- 2.47.3