From: Sage Weil Date: Mon, 16 Aug 2010 23:45:14 +0000 (-0700) Subject: mds: make inode first track dn first on rename X-Git-Tag: v0.22~273 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=945c62c687453ccfdc1e561a66301c5490901da1;p=ceph.git mds: make inode first track dn first on rename This mirrors the logic in cc8f5ac47c77d1e336e16d8deb024d507e0e8c59. Make the renamed inode first match the destdn to avoid problems down the line. Do this after we've (potentially) cowed the inode in the journal_cow_dentry on srcdn. --- diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 934df441d640b..2bde1fb03a434 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -4853,6 +4853,10 @@ void Server::_rename_prepare(MDRequest *mdr, mdcache->journal_cow_dentry(mdr, metablob, srcdn, CEPH_NOSNAP, 0, srcdnl); metablob->add_null_dentry(srcdn, true); + // make renamed inode first track the dn + if (srcdnl->is_primary() && destdn->is_auth()) + srcdnl->get_inode()->first = destdn->first; + // do inode updates in journal, even if we aren't auth (hmm, is this necessary?) if (!silent) { if (ji && !pi) {