]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: clear CDir::STATE_REJOINUNDEF after fetching dirfrag 4886/head
authorYan, Zheng <zyan@redhat.com>
Tue, 12 May 2015 06:52:30 +0000 (14:52 +0800)
committerAbhishek Lekshmanan <abhishek.lekshmanan@ril.com>
Sun, 7 Jun 2015 07:40:07 +0000 (13:10 +0530)
Fixes: #11541
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit ab1e5394dc778f6799472bd79a4d9ba7197107c2)

src/mds/CDir.cc

index 235b0dd8cb23aabb757a3148a7a44ebd800ff162..5b72d5176a9c4aca2fd35f21f976c0d33383d13d 100644 (file)
@@ -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;