From da1e2614aba17d1507d722688f0e4d91c9bf9edd Mon Sep 17 00:00:00 2001 From: "Yan, Zheng" Date: Wed, 28 Dec 2016 16:48:33 +0800 Subject: [PATCH] mds: add replicas of destdn to rename witness list it's possible that null dentry is replicated Signed-off-by: Yan, Zheng --- src/mds/Server.cc | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 88ded97796f..1ad52eaff02 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -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;