From: Yan, Zheng Date: Thu, 8 Jun 2017 02:19:02 +0000 (+0800) Subject: mds: cleanup MDCache::eval_remote() X-Git-Tag: v12.1.0~5^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=cddef419afde696b90574734e25e2b947d7cfb71;p=ceph.git mds: cleanup MDCache::eval_remote() MDCache::eval_remote() tries migrating stray to current mds even remote dentry's auth mds is not current mds. This doesn't make sense. Signed-off-by: "Yan, Zheng" --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index b03e0ac4aae5..837439a7eeb5 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -9496,25 +9496,7 @@ void MDCache::eval_remote(CDentry *remote_dn) CDentry *primary_dn = in->get_projected_parent_dn(); assert(primary_dn != NULL); if (primary_dn->get_dir()->get_inode()->is_stray()) { - if (in->is_auth()) { - dout(20) << __func__ << ": have auth for inode, evaluating" << dendl; - - stray_manager.eval_remote_stray(primary_dn, remote_dn); - } else { - dout(20) << __func__ << ": do not have auth for inode, migrating " << dendl; - /* - * Inodes get filed into a stray dentry when a client unlinks - * the primary DN for them. However, that doesn't mean there - * isn't a remote DN still in the world. The remote DN just - * ends up pointing at a stray. Strays can pretty much live - * forever in this scenario. - * - * Therefore, we have a special behaviour here: migrate a stray - * to when handle a client request with a trace referring - * to a stray inode on another MDS. - */ - stray_manager.migrate_stray(primary_dn, mds->get_nodeid()); - } + stray_manager.eval_remote_stray(primary_dn, remote_dn); } else { dout(20) << __func__ << ": inode's primary dn not stray" << dendl; }