From: "Yan, Zheng" <zheng.z.yan@xxxxxxxxx> We can avoid save parent snaprealm if current_parent_since is greater than parent snaprealm's newest sequence. Signed-off-by: Yan, Zheng <zheng.z.yan@xxxxxxxxx> --- src/mds/CInode.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index 8fed424..8566e55 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -386,8 +386,10 @@ void CInode::project_past_snaprealm_parent(SnapRealm *newparent) if (newparent != oldparent) { snapid_t oldparentseq = oldparent->get_newest_seq(); - new_snap->past_parents[oldparentseq].ino = oldparent->inode->ino(); - new_snap->past_parents[oldparentseq].first = new_snap->current_parent_since; + if (oldparentseq + 1 > new_snap->current_parent_since) { + new_snap->past_parents[oldparentseq].ino = oldparent->inode->ino(); + new_snap->past_parents[oldparentseq].first = new_snap->current_parent_since; + } new_snap->current_parent_since = MAX(oldparentseq, newparent->get_last_created()) + 1; } } -- 1.7.11.4 -- 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