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 <john.spray@redhat.com>
// fix lock
if (dn->lock.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()