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: v0.94.3~60^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F4886%2Fhead;p=ceph.git mds: clear CDir::STATE_REJOINUNDEF after fetching dirfrag Fixes: #11541 Signed-off-by: Yan, Zheng (cherry picked from commit ab1e5394dc778f6799472bd79a4d9ba7197107c2) --- diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index 235b0dd8cb23..5b72d5176a9c 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -1402,9 +1402,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;