From: Yan, Zheng Date: Tue, 12 May 2015 06:52:30 +0000 (+0800) Subject: mds: clear CDir::STATE_REJOINUNDEF after fetching dirfrag X-Git-Tag: v9.0.2~185^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=ab1e5394dc778f6799472bd79a4d9ba7197107c2;p=ceph.git mds: clear CDir::STATE_REJOINUNDEF after fetching dirfrag Fixes: #11541 Signed-off-by: Yan, Zheng --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index f17740eb79dc..97e05a637d3e 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -1413,9 +1413,17 @@ void CDir::fetch(MDSInternalContextBase *c, const string& want_dn, bool ignore_a // unlinked directory inode shouldn't have any entry if (inode->inode.nlink == 0 && !inode->snaprealm) { dout(7) << "fetch dirfrag for unlinked directory, mark complete" << dendl; - if (get_version() == 0) + if (get_version() == 0) { set_version(1); + + if (state_test(STATE_REJOINUNDEF)) { + assert(cache->mds->is_rejoin()); + state_clear(STATE_REJOINUNDEF); + cache->opened_undef_dirfrag(this); + } + } mark_complete(); + if (c) cache->mds->queue_waiter(c); return;