summaryrefslogtreecommitdiffstats
path: root/src/mds/journal.cc
diff options
context:
space:
mode:
authorJohn Spray <jspray@redhat.com>2017-05-23 14:14:43 +0200
committerGitHub <noreply@github.com>2017-05-23 14:14:43 +0200
commite875d7ddf965bef16361bd3c0a960e1c047d94b7 (patch)
tree8d8b66c5b0eaff26543ee34ed209d9fa655f6ae1 /src/mds/journal.cc
parentMerge pull request #15220 from joscollin/wip-cleanup-rados-typo (diff)
parentmds: properly set new dirfrag's dir_auth when merging dirfrags (diff)
downloadceph-e875d7ddf965bef16361bd3c0a960e1c047d94b7.tar.xz
ceph-e875d7ddf965bef16361bd3c0a960e1c047d94b7.zip
Merge pull request #14550 from ukernel/wip-multimds-misc
mds: miscellaneous multimds fixes Reviewed-by: John Spray <john.spray@redhat.com>
Diffstat (limited to 'src/mds/journal.cc')
-rw-r--r--src/mds/journal.cc24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/mds/journal.cc b/src/mds/journal.cc
index a2849154721..a65b45725a8 100644
--- a/src/mds/journal.cc
+++ b/src/mds/journal.cc
@@ -1305,8 +1305,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
dout(0) << ss.str() << dendl;
mds->clog->warn(ss);
}
- dir->unlink_inode(dn);
- mds->mdcache->touch_dentry_bottom(dn);
+ dir->unlink_inode(dn, false);
}
if (unlinked.count(in))
linked.insert(in);
@@ -1318,9 +1317,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
if (dn->get_linkage()->get_inode() != in && in->get_parent_dn()) {
dout(10) << "EMetaBlob.replay unlinking " << *in << dendl;
unlinked[in] = in->get_parent_dir();
- CDentry *unlinked_dn = in->get_parent_dn();
in->get_parent_dir()->unlink_inode(in->get_parent_dn());
- mds->mdcache->touch_dentry_bottom(unlinked_dn);
}
if (dn->get_linkage()->get_inode() != in) {
if (!dn->get_linkage()->is_null()) { // note: might be remote. as with stray reintegration.
@@ -1332,8 +1329,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
dout(0) << ss.str() << dendl;
mds->clog->warn(ss);
}
- dir->unlink_inode(dn);
- mds->mdcache->touch_dentry_bottom(dn);
+ dir->unlink_inode(dn, false);
}
if (unlinked.count(in))
linked.insert(in);
@@ -1378,8 +1374,7 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
<< " " << *dn->get_linkage()->get_inode() << " should be remote " << p->ino;
dout(0) << ss.str() << dendl;
}
- dir->unlink_inode(dn);
- mds->mdcache->touch_dentry_bottom(dn);
+ dir->unlink_inode(dn, false);
}
dir->link_remote_inode(dn, p->ino, p->d_type);
dn->set_version(p->dnv);
@@ -1414,7 +1409,6 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
if (dn->get_linkage()->is_primary())
unlinked[in] = dir;
dir->unlink_inode(dn);
- mds->mdcache->touch_dentry_bottom(dn);
}
}
dn->set_version(p->dnv);
@@ -1428,7 +1422,6 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
// Make null dentries the first things we trim
dout(10) << "EMetaBlob.replay pushing to bottom of lru " << *dn << dendl;
- mds->mdcache->touch_dentry_bottom(dn);
}
}
@@ -1637,7 +1630,6 @@ void EMetaBlob::replay(MDSRank *mds, LogSegment *logseg, MDSlaveUpdate *slaveup)
if (parent) {
dout(10) << "EMetaBlob.replay unlinked from dentry " << *parent << dendl;
assert(parent->get_linkage()->is_null());
- mds->mdcache->touch_dentry_bottom(parent);
}
} else {
dout(10) << "EMetaBlob.replay destroyed " << *p << ", not in cache" << dendl;
@@ -2874,11 +2866,12 @@ void EExport::replay(MDSRank *mds)
void EExport::encode(bufferlist& bl, uint64_t features) const
{
- ENCODE_START(3, 3, bl);
+ ENCODE_START(4, 3, bl);
::encode(stamp, bl);
::encode(metablob, bl, features);
::encode(base, bl);
::encode(bounds, bl);
+ ::encode(target, bl);
ENCODE_FINISH(bl);
}
@@ -2890,6 +2883,8 @@ void EExport::decode(bufferlist::iterator &bl)
::decode(metablob, bl);
::decode(base, bl);
::decode(bounds, bl);
+ if (struct_v >= 4)
+ ::decode(target, bl);
DECODE_FINISH(bl);
}
@@ -2968,13 +2963,14 @@ void EImportStart::replay(MDSRank *mds)
}
void EImportStart::encode(bufferlist &bl, uint64_t features) const {
- ENCODE_START(3, 3, bl);
+ ENCODE_START(4, 3, bl);
::encode(stamp, bl);
::encode(base, bl);
::encode(metablob, bl, features);
::encode(bounds, bl);
::encode(cmapv, bl);
::encode(client_map, bl);
+ ::encode(from, bl);
ENCODE_FINISH(bl);
}
@@ -2987,6 +2983,8 @@ void EImportStart::decode(bufferlist::iterator &bl) {
::decode(bounds, bl);
::decode(cmapv, bl);
::decode(client_map, bl);
+ if (struct_v >= 4)
+ ::decode(from, bl);
DECODE_FINISH(bl);
}