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>
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();