From: Yan, Zheng Date: Mon, 16 Jan 2017 09:07:49 +0000 (+0800) Subject: Revert "mds: only send slave rmdir prepare to auth mds of subtree" X-Git-Tag: v12.0.0~43^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=369baa205cafc7dee9db0ace1966e69850514938;p=ceph.git Revert "mds: only send slave rmdir prepare to auth mds of subtree" This reverts commit 99c9147452fa8a1b1cd7f1b03a0aa86ec5ad3124. Sending slave requests to all replica mds simplify the subtree reolve process of mds recovery. It guarantee all mds have a consistent subtree map. Otherwise replica mds can failed to receive the MDentryUnlink message if the master mds fails. When the master mds recovers, its subtree map is different from the replica mds. Signed-off-by: Yan, Zheng --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 2ee086d330c..2525fe48173 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -5581,14 +5581,7 @@ void Server::handle_client_unlink(MDRequestRef& mdr) if (in->is_dir() && in->has_subtree_root_dirfrag()) { // subtree root auths need to be witnesses set witnesses; - - list dfls; - in->get_subtree_dirfrags(dfls); - for (auto p : dfls) { - if (mds->get_nodeid() != p->get_dir_auth().first) - witnesses.insert(p->get_dir_auth().first); - } - + in->list_replicas(witnesses); dout(10) << " witnesses " << witnesses << ", have " << mdr->more()->witnessed << dendl; for (set::iterator p = witnesses.begin();