Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
* away.
*/
void MDCache::maybe_eval_stray(CInode *in, bool delay) {
- if (in->inode.nlink > 0 || in->is_base() || is_readonly() || mds->is_standby_replay())
+ if (in->inode.nlink > 0 || in->is_base() || is_readonly() ||
+ mds->get_state() <= MDSMap::STATE_REJOIN)
return;
+
CDentry *dn = in->get_projected_parent_dn();
if (dn->state_test(CDentry::STATE_PURGING)) {
dout(10) << " inode is " << *dnl->get_inode() << dendl;
CInode *in = dnl->get_inode();
assert(in);
+ assert(!in->state_test(CInode::STATE_REJOINUNDEF));
// The only dentries elegible for purging are those
// in the stray directories