]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: add replicas of destdn to rename witness list
authorYan, Zheng <zyan@redhat.com>
Wed, 28 Dec 2016 08:48:33 +0000 (16:48 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 10 Jan 2017 07:23:34 +0000 (15:23 +0800)
it's possible that null dentry is replicated

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/Server.cc

index 88ded97796f4b4f48a05f2aa39e8c14966661516..1ad52eaff02044160170ce2ea872abc23c6fdfbf 100644 (file)
@@ -6342,11 +6342,9 @@ void Server::handle_client_rename(MDRequestRef& mdr)
     witnesses.insert(srcdn->authority().first);
   if (srcdnl->is_remote() && !srci->is_auth())
     witnesses.insert(srci->authority().first);
-  if (!destdnl->is_null()) {
-    destdn->list_replicas(witnesses);
-    if (destdnl->is_remote() && !oldin->is_auth())
-      witnesses.insert(oldin->authority().first);
-  }
+  destdn->list_replicas(witnesses);
+  if (destdnl->is_remote() && !oldin->is_auth())
+    witnesses.insert(oldin->authority().first);
   dout(10) << " witnesses " << witnesses << ", have " << mdr->more()->witnessed << dendl;