mds: add replicas of destdn to rename witness list

it's possible that null dentry is replicated

Signed-off-by: Yan, Zheng <zyan@redhat.com>
This commit is contained in:
Yan, Zheng 2016-12-28 16:48:33 +08:00
parent 276d12547f
commit da1e2614ab

View 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;