]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: make sure snap inode's last matches its parent dentry's last 17994/head
authorYan, Zheng <zyan@redhat.com>
Wed, 27 Sep 2017 14:19:06 +0000 (22:19 +0800)
committerYan, Zheng <zyan@redhat.com>
Wed, 27 Sep 2017 22:30:34 +0000 (06:30 +0800)
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" <zyan@redhat.com>
src/mds/MDCache.cc

index e6600dbd4ea77e4cd6b10d2fb93842c24299f505..db5733e9665378a0e60466226c5d0076d866d464 100644 (file)
@@ -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();