From: Yan, Zheng Date: Wed, 27 Sep 2017 14:19:06 +0000 (+0800) Subject: mds: make sure snap inode's last matches its parent dentry's last X-Git-Tag: v12.2.2~91^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=06c31a6ceecf1c33e1456c746169961802903001;p=ceph.git mds: make sure snap inode's last matches its parent dentry's last This patch is for luminous only. The issue has been fixed in master branch in another way (change is much bigger) Fixes: http://tracker.ceph.com/issues/21337 Signed-off-by: "Yan, Zheng" --- diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index e6600dbd4ea7..db5733e96653 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -1680,7 +1680,7 @@ void MDCache::journal_cow_dentry(MutationImpl *mut, EMetaBlob *metablob, mut->add_cow_inode(oldin); if (pcow_inode) *pcow_inode = oldin; - CDentry *olddn = dn->dir->add_primary_dentry(dn->name, oldin, oldfirst, follows); + CDentry *olddn = dn->dir->add_primary_dentry(dn->name, oldin, oldfirst, oldin->last); oldin->inode.version = olddn->pre_dirty(); dout(10) << " olddn " << *olddn << dendl; bool need_snapflush = !oldin->client_snap_caps.empty();