]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: cleanup MDCache::eval_remote()
authorYan, Zheng <zyan@redhat.com>
Thu, 8 Jun 2017 02:19:02 +0000 (10:19 +0800)
committerYan, Zheng <zyan@redhat.com>
Thu, 8 Jun 2017 05:04:58 +0000 (13:04 +0800)
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" <zyan@redhat.com>
src/mds/MDCache.cc

index b03e0ac4aae595b2e5e43d27b7c993a8b902582f..837439a7eeb5f30c5d019725062c0a94f9e1273a 100644 (file)
@@ -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 <me> when <I> 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;
   }