]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: trigger stray reintegration when loading dentry 44342/head
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 16 Dec 2021 15:44:40 +0000 (10:44 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Thu, 16 Dec 2021 19:29:47 +0000 (14:29 -0500)
During recursive scrub, the MDS will load a remote dentry into cache but
not necessarily check if reintegration is necessary. Before this commit,
it would only happen when the dentry is returned from a client request.
To effect global reintegration when there are too many strays, this
means a cluster admin would have to do `find` on the CephFS file system.
This is unsavory because of the cache / cap explosion involved.

Fixes: https://tracker.ceph.com/issues/53641
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/CDentry.cc

index 85d8bc5fb58d8204608d9b907602586d6fe598b7..3a9aa5ef4f53b550a3351b287b68ab4758b49c39 100644 (file)
@@ -256,6 +256,9 @@ void CDentry::link_remote(CDentry::linkage_t *dnl, CInode *in)
 
   if (dnl == &linkage)
     in->add_remote_parent(this);
+
+  // check for reintegration
+  dir->mdcache->eval_remote(this);
 }
 
 void CDentry::unlink_remote(CDentry::linkage_t *dnl)