From: John Spray Date: Mon, 16 Feb 2015 17:03:42 +0000 (+0000) Subject: mds: eval stray on remove dentry replica X-Git-Tag: v9.0.0~115^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=763e26c41e0a56ea12f9bc39b5821cdb48d8cdbf;p=ceph.git mds: eval stray on remove dentry replica This happens because when handling an MCacheExpire, we expire inodes first and then dentries, so when the inodes are put() their dentries still are replicated so eval_stray fails. Do an explicit call to maybe_eval_stray when handling the expire for the dentry in order to catch this. One hits this path when migrating a stray away from a stopping MDS rank. Signed-off-by: John Spray --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index 85e0634d1136..4898af301d64 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -7097,6 +7097,12 @@ void MDCache::dentry_remove_replica(CDentry *dn, mds_rank_t from, setlock.remove_replica(from)) gather_locks.insert(&dn->lock); + + // Replicated strays might now be elegible for purge + CDentry::linkage_t *dnl = dn->get_linkage(); + if (dnl->is_primary()) { + maybe_eval_stray(dnl->get_inode()); + } } void MDCache::trim_client_leases()