From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> MDCache::handle_cache_expire() processes dentries after inodes, so the MDCache::maybe_eval_stray() in MDCache::inode_remove_replica() always fails to remove stray inode because MDCache::eval_stray() checks if the stray inode's dentry is replicated. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/MDCache.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 3410b0f..5adf4b7 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -6120,9 +6120,11 @@ void MDCache::dentry_remove_replica(CDentry *dn, int from) // fix lock if (dn->lock.remove_replica(from)) mds->locker->eval_gather(&dn->lock); -} - + CDentry::linkage_t *dnl = dn->get_projected_linkage(); + if (dnl->is_primary()) + maybe_eval_stray(dnl->get_inode()); +} void MDCache::trim_client_leases() { -- 1.7.11.7 -- To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html