]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mds/Server: fix stray reintegration
authorJohn Spray <john.spray@redhat.com>
Thu, 29 Jan 2015 19:00:21 +0000 (19:00 +0000)
committerJohn Spray <john.spray@redhat.com>
Fri, 20 Mar 2015 12:32:47 +0000 (12:32 +0000)
This was checking tracei's primary parent DN for remoteness
as a condition to calling eval_remote.  However, the *primary*
parent DN in this case is the stray, which is not remote.

The correct check is tracedn (the remote dentry that got us here)
rather than tracei->get_parent_dn() (the primary dentry for the
inode that we have looked up).

This leads to eval_remote being invoked, and reintegration
of stray hard-linked inodes working.

Signed-off-by: John Spray <john.spray@redhat.com>
src/mds/Server.cc

index b5a31e6adb39b80ba105a353dc7d4e7fc8c62335..61ca3cc314a7ed0d7e00c886d301f464b7ebdd8d 100644 (file)
@@ -1146,9 +1146,10 @@ void Server::reply_client_request(MDRequestRef& mdr, MClientReply *reply)
 
   // take a closer look at tracei, if it happens to be a remote link
   if (tracei && 
-      tracei->get_parent_dn() &&
-      tracei->get_parent_dn()->get_projected_linkage()->is_remote())
-    mdcache->eval_remote(tracei->get_parent_dn());
+      tracedn &&
+      tracedn->get_projected_linkage()->is_remote()) {
+    mdcache->eval_remote(tracedn);
+  }
 }