]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Revert "mds: only send slave rmdir prepare to auth mds of subtree"
authorYan, Zheng <zyan@redhat.com>
Mon, 16 Jan 2017 09:07:49 +0000 (17:07 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 19 Jan 2017 06:59:19 +0000 (14:59 +0800)
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 <zyan@redhat.com>
src/mds/Server.cc

index 2ee086d330c51525143a13dd65b89fb34fbfe88e..2525fe48173e630a1e1c5f16c9a541701286d38a 100644 (file)
@@ -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<mds_rank_t> witnesses;
-
-    list<CDir*> 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<mds_rank_t>::iterator p = witnesses.begin();