summaryrefslogtreecommitdiffstats
path: root/src/mds/journal.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/mds/journal.cc')
-rw-r--r--src/mds/journal.cc19
1 files changed, 8 insertions, 11 deletions
diff --git a/src/mds/journal.cc b/src/mds/journal.cc
index a0feaed3bec..aaefd373151 100644
--- a/src/mds/journal.cc
+++ b/src/mds/journal.cc
@@ -501,10 +501,9 @@ void EMetaBlob::fullbit::dump(Formatter *f) const
inode.dump(f);
f->close_section(); // inode
f->open_object_section("xattrs");
- for (map<string, bufferptr>::const_iterator iter = xattrs.begin();
- iter != xattrs.end(); ++iter) {
- string s(iter->second.c_str(), iter->second.length());
- f->dump_string(iter->first.c_str(), s);
+ for (const auto &p : xattrs) {
+ std::string s(p.second.c_str(), p.second.length());
+ f->dump_string(p.first.c_str(), s);
}
f->close_section(); // xattrs
if (inode.is_symlink()) {
@@ -523,12 +522,10 @@ void EMetaBlob::fullbit::dump(Formatter *f) const
f->dump_string("state", state_string());
if (!old_inodes.empty()) {
f->open_array_section("old inodes");
- for (old_inodes_t::const_iterator iter = old_inodes.begin();
- iter != old_inodes.end();
- ++iter) {
+ for (const auto &p : old_inodes) {
f->open_object_section("inode");
- f->dump_int("snapid", iter->first);
- iter->second.dump(f);
+ f->dump_int("snapid", p.first);
+ p.second.dump(f);
f->close_section(); // inode
}
f->close_section(); // old inodes
@@ -537,9 +534,9 @@ void EMetaBlob::fullbit::dump(Formatter *f) const
void EMetaBlob::fullbit::generate_test_instances(list<EMetaBlob::fullbit*>& ls)
{
- inode_t inode;
+ CInode::mempool_inode inode;
fragtree_t fragtree;
- map<string,bufferptr> empty_xattrs;
+ CInode::mempool_xattr_map empty_xattrs;
bufferlist empty_snapbl;
fullbit *sample = new fullbit("/testdn", 0, 0, 0,
inode, fragtree, empty_xattrs, "", 0, empty_snapbl,