dirfrag of mdsdir doesn't inherit its parent inode's authority.
Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
}
// barebones dirfrag; the full dirfrag loop below will clean up.
dir = diri->add_dirfrag(new CDir(diri, p->first.frag, this, false));
- if (dir->authority() != CDIR_AUTH_UNDEF &&
- dir->authority().first != from)
+ if (MDS_INO_MDSDIR(from) == p->first.ino ||
+ (dir->authority() != CDIR_AUTH_UNDEF &&
+ dir->authority().first != from))
adjust_subtree_auth(dir, from);
dout(10) << " add dirfrag " << *dir << dendl;
}