From: Patrick Donnelly Date: Wed, 21 Feb 2018 19:33:33 +0000 (-0800) Subject: mds: various fixes for backport X-Git-Tag: v12.2.5~99^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3fea9655eda843f0cfeb826e115dceadc4c2687e;p=ceph.git mds: various fixes for backport Luminous uses C++11. These fixes correct compiler errors. Signed-off-by: Patrick Donnelly --- diff --git a/src/client/SyntheticClient.cc b/src/client/SyntheticClient.cc index 88574e07a20..ffa11933c06 100644 --- a/src/client/SyntheticClient.cc +++ b/src/client/SyntheticClient.cc @@ -3358,7 +3358,7 @@ int SyntheticClient::chunk_file(string &filename) uint64_t size = st.st_size; dout(0) << "file " << filename << " size is " << size << dendl; - inode_t inode; + inode_t<> inode; memset(&inode, 0, sizeof(inode)); inode.ino = st.st_ino; ret = client->fdescribe_layout(fd, &inode.layout); diff --git a/src/common/Formatter.cc b/src/common/Formatter.cc index 5479a6e3b36..d39a96f5a2c 100644 --- a/src/common/Formatter.cc +++ b/src/common/Formatter.cc @@ -58,7 +58,7 @@ Formatter *Formatter::create(boost::string_view type, { std::string mytype(type); if (mytype == "") - mytype = default_type; + mytype = std::string(default_type); if (mytype == "json") return new JSONFormatter(false); diff --git a/src/common/escape.h b/src/common/escape.h index 54520414149..bea5f919bb3 100644 --- a/src/common/escape.h +++ b/src/common/escape.h @@ -15,6 +15,8 @@ #ifndef CEPH_RGW_ESCAPE_H #define CEPH_RGW_ESCAPE_H +#include + #ifdef __cplusplus extern "C" { #endif diff --git a/src/include/encoding.h b/src/include/encoding.h index 65fe7326688..5dd62adce29 100644 --- a/src/include/encoding.h +++ b/src/include/encoding.h @@ -26,7 +26,6 @@ #include "include/unordered_map.h" #include "include/unordered_set.h" -#include "common/ceph_time.h" #include "include/int_types.h" diff --git a/src/include/filepath.h b/src/include/filepath.h index a2bba2d1ac1..8439b3fc985 100644 --- a/src/include/filepath.h +++ b/src/include/filepath.h @@ -97,16 +97,16 @@ class filepath { } void set_path(boost::string_view s, inodeno_t b) { - path = s; + path = std::string(s); ino = b; } void set_path(boost::string_view s) { if (s[0] == '/') { - path = s.substr(1); + path = std::string(s.substr(1)); ino = 1; } else { ino = 0; - path = s; + path = std::string(s); } bits.clear(); } @@ -173,8 +173,8 @@ class filepath { parse_bits(); if (!bits.empty()) path += "/"; - path += s; - bits.emplace_back(s); + path += std::string(s); + bits.emplace_back(std::string(s)); } void push_dentry(const string& s) { push_dentry(boost::string_view(s)); diff --git a/src/mds/CDentry.cc b/src/mds/CDentry.cc index ed7fcc50ea6..b530ae2a6e3 100644 --- a/src/mds/CDentry.cc +++ b/src/mds/CDentry.cc @@ -423,7 +423,7 @@ void CDentry::decode_replica(bufferlist::iterator& p, bool is_new) void CDentry::set_object_info(MDSCacheObjectInfo &info) { info.dirfrag = dir->dirfrag(); - info.dname = name; + info.dname = std::string(boost::string_view(name)); info.snapid = last; } diff --git a/src/mds/CDir.cc b/src/mds/CDir.cc index 46e250fc9e6..4fb09597609 100644 --- a/src/mds/CDir.cc +++ b/src/mds/CDir.cc @@ -1341,7 +1341,8 @@ void CDir::finish_waiting(uint64_t mask, int result) fnode_t *CDir::project_fnode() { assert(get_version() != 0); - auto &p = projected_fnode.emplace_back(*get_projected_fnode()); + projected_fnode.emplace_back(*get_projected_fnode()); + auto &p = projected_fnode.back(); if (scrub_infop && scrub_infop->last_scrub_dirty) { p.localized_scrub_stamp = scrub_infop->last_local.time; @@ -1933,7 +1934,7 @@ void CDir::_omap_fetched(bufferlist& hdrbl, map& omap, continue; } - if (dn && (wanted_items.count(mempool::mds_co::string(dname)) > 0 || !complete)) { + if (dn && (wanted_items.count(mempool::mds_co::string(boost::string_view(dname))) > 0 || !complete)) { dout(10) << " touching wanted dn " << *dn << dendl; inode->mdcache->touch_dentry(dn); } @@ -2018,7 +2019,7 @@ void CDir::go_bad_dentry(snapid_t last, boost::string_view dname) dout(10) << __func__ << " " << dname << dendl; std::string path(get_path()); path += "/"; - path += dname; + path += std::string(dname); const bool fatal = cache->mds->damage_table.notify_dentry( inode->ino(), frag, last, dname, path); if (fatal) { @@ -2127,7 +2128,7 @@ void CDir::_omap_commit(int op_prio) if (!stale_items.empty()) { for (const auto &p : stale_items) { - to_remove.insert(std::string(p)); + to_remove.insert(std::string(boost::string_view(p))); write_size += p.length(); } stale_items.clear(); diff --git a/src/mds/CInode.cc b/src/mds/CInode.cc index a2c39513019..ab436375eab 100644 --- a/src/mds/CInode.cc +++ b/src/mds/CInode.cc @@ -384,9 +384,12 @@ sr_t &CInode::project_snaprealm(projected_inode &pi) CInode::projected_inode &CInode::project_inode(bool xattr, bool snap) { - auto &pi = projected_nodes.empty() ? - projected_nodes.emplace_back(inode) : + if (projected_nodes.empty()) { + projected_nodes.emplace_back(inode); + } else { projected_nodes.emplace_back(projected_nodes.back().inode); + } + auto &pi = projected_nodes.back(); if (scrub_infop && scrub_infop->last_scrub_dirty) { pi.inode.last_scrub_stamp = scrub_infop->last_scrub_stamp; @@ -1328,8 +1331,8 @@ void InodeStoreBase::decode_bare(bufferlist::iterator &bl, ::decode(inode, bl); if (is_symlink()) { std::string tmp; - decode(tmp, bl); - symlink = boost::string_view(tmp); + ::decode(tmp, bl); + symlink = mempool::mds_co::string(boost::string_view(tmp)); } ::decode(dirfragtree, bl); ::decode(xattrs, bl); @@ -3492,7 +3495,7 @@ void CInode::_decode_base(bufferlist::iterator& p) { std::string tmp; ::decode(tmp, p); - symlink = boost::string_view(tmp); + symlink = mempool::mds_co::string(boost::string_view(tmp)); } ::decode(dirfragtree, p); ::decode(xattrs, p); diff --git a/src/mds/CInode.h b/src/mds/CInode.h index c87d30c4a4c..3721a0273ad 100644 --- a/src/mds/CInode.h +++ b/src/mds/CInode.h @@ -481,11 +481,9 @@ public: } sr_t *get_projected_srnode() { if (num_projected_srnodes > 0) { - for (std::list::reverse_iterator p = projected_nodes.rbegin(); - p != projected_nodes.rend(); - ++p) - if ((*p)->snapnode) - return (*p)->snapnode; + for (auto it = projected_nodes.rbegin(); it != projected_nodes.rend(); ++it) + if (it->snapnode) + return it->snapnode.get(); } if (snaprealm) return &snaprealm->srnode; diff --git a/src/mds/DamageTable.cc b/src/mds/DamageTable.cc index 2921f26d46e..17054b53d8b 100644 --- a/src/mds/DamageTable.cc +++ b/src/mds/DamageTable.cc @@ -151,7 +151,7 @@ bool DamageTable::notify_dentry( if (dentries.count(key) == 0) { DamageEntryRef entry = std::make_shared( ino, frag, dname, snap_id); - entry->path = path; + entry->path = std::string(path); dentries[key][DentryIdent(dname, snap_id)] = entry; by_id[entry->id] = std::move(entry); } @@ -181,7 +181,7 @@ bool DamageTable::notify_dirfrag(inodeno_t ino, frag_t frag, auto key = DirFragIdent(ino, frag); if (dirfrags.count(key) == 0) { DamageEntryRef entry = std::make_shared(ino, frag); - entry->path = path; + entry->path = std::string(path); dirfrags[key] = entry; by_id[entry->id] = std::move(entry); } @@ -197,7 +197,7 @@ bool DamageTable::notify_remote_damaged(inodeno_t ino, boost::string_view path) if (remotes.count(ino) == 0) { auto entry = std::make_shared(ino); - entry->path = path; + entry->path = std::string(path); remotes[ino] = entry; by_id[entry->id] = std::move(entry); } diff --git a/src/mds/FSMap.cc b/src/mds/FSMap.cc index 0ad1e8b1096..d2ba81aeb09 100644 --- a/src/mds/FSMap.cc +++ b/src/mds/FSMap.cc @@ -230,7 +230,7 @@ void FSMap::create_filesystem(boost::string_view name, uint64_t features) { auto fs = std::make_shared(); - fs->mds_map.fs_name = name; + fs->mds_map.fs_name = std::string(name); fs->mds_map.max_mds = 1; fs->mds_map.data_pools.push_back(data_pool); fs->mds_map.metadata_pool = metadata_pool; diff --git a/src/mds/MDCache.cc b/src/mds/MDCache.cc index b0ff5e8bc2b..400205503e2 100644 --- a/src/mds/MDCache.cc +++ b/src/mds/MDCache.cc @@ -8246,7 +8246,7 @@ void MDCache::_open_remote_dentry_finish(CDentry *dn, inodeno_t ino, MDSInternal if (dir) { dir->get_inode()->make_path_string(path); path += "/"; - path += dn->get_name(); + path += std::string(dn->get_name()); } bool fatal = mds->damage_table.notify_remote_damaged(ino, path); diff --git a/src/mds/Server.cc b/src/mds/Server.cc index 729457b38dc..7825dd2ff43 100644 --- a/src/mds/Server.cc +++ b/src/mds/Server.cc @@ -4832,7 +4832,7 @@ void Server::handle_client_setxattr(MDRequestRef& mdr) // check xattrs kv pairs size size_t cur_xattrs_size = 0; for (const auto& p : *pxattrs) { - if ((flags & CEPH_XATTR_REPLACE) && (name.compare(p.first) == 0)) { + if ((flags & CEPH_XATTR_REPLACE) && (name.compare(std::string(boost::string_view(p.first))) == 0)) { continue; } cur_xattrs_size += p.first.length() + p.second.length(); @@ -4845,12 +4845,12 @@ void Server::handle_client_setxattr(MDRequestRef& mdr) return; } - if ((flags & CEPH_XATTR_CREATE) && pxattrs->count(mempool::mds_co::string(name))) { + if ((flags & CEPH_XATTR_CREATE) && pxattrs->count(mempool::mds_co::string(boost::string_view(name)))) { dout(10) << "setxattr '" << name << "' XATTR_CREATE and EEXIST on " << *cur << dendl; respond_to_request(mdr, -EEXIST); return; } - if ((flags & CEPH_XATTR_REPLACE) && !pxattrs->count(mempool::mds_co::string(name))) { + if ((flags & CEPH_XATTR_REPLACE) && !pxattrs->count(mempool::mds_co::string(boost::string_view(name)))) { dout(10) << "setxattr '" << name << "' XATTR_REPLACE and ENODATA on " << *cur << dendl; respond_to_request(mdr, -ENODATA); return; @@ -4866,12 +4866,12 @@ void Server::handle_client_setxattr(MDRequestRef& mdr) pi.inode.xattr_version++; auto &px = *pi.xattrs; if ((flags & CEPH_XATTR_REMOVE)) { - px.erase(mempool::mds_co::string(name)); + px.erase(mempool::mds_co::string(boost::string_view(name))); } else { bufferptr b = buffer::create(len); if (len) req->get_data().copy(0, len, b.c_str()); - auto em = px.emplace(std::piecewise_construct, std::forward_as_tuple(mempool::mds_co::string(name)), std::forward_as_tuple(b)); + auto em = px.emplace(std::piecewise_construct, std::forward_as_tuple(mempool::mds_co::string(boost::string_view(name))), std::forward_as_tuple(b)); if (!em.second) em.first->second = b; } @@ -4916,7 +4916,7 @@ void Server::handle_client_removexattr(MDRequestRef& mdr) return; auto pxattrs = cur->get_projected_xattrs(); - if (pxattrs->count(mempool::mds_co::string(name)) == 0) { + if (pxattrs->count(mempool::mds_co::string(boost::string_view(name))) == 0) { dout(10) << "removexattr '" << name << "' and ENODATA on " << *cur << dendl; respond_to_request(mdr, -ENODATA); return; @@ -4931,7 +4931,7 @@ void Server::handle_client_removexattr(MDRequestRef& mdr) pi.inode.ctime = mdr->get_op_stamp(); pi.inode.change_attr++; pi.inode.xattr_version++; - px.erase(mempool::mds_co::string(name)); + px.erase(mempool::mds_co::string(boost::string_view(name))); // log + wait mdr->ls = mdlog->get_current_segment(); @@ -5204,7 +5204,7 @@ void Server::handle_client_symlink(MDRequestRef& mdr) // it's a symlink dn->push_projected_linkage(newi); - newi->symlink = req->get_path2(); + newi->symlink = mempool::mds_co::string(boost::string_view(req->get_path2())); newi->inode.size = newi->symlink.length(); newi->inode.rstat.rbytes = newi->inode.size; newi->inode.rstat.rfiles = 1; @@ -5982,7 +5982,7 @@ void Server::_unlink_local(MDRequestRef& mdr, CDentry *dn, CDentry *straydn) { std::string t; dn->make_path_string(t, true); - pi.inode.stray_prior_path = std::move(t); + pi.inode.stray_prior_path = mempool::mds_co::string(boost::string_view(t)); } mdr->add_projected_inode(in); // do this _after_ my dn->pre_dirty().. we apply that one manually. pi.inode.version = in->pre_dirty(); @@ -6163,9 +6163,9 @@ void Server::handle_slave_rmdir_prep(MDRequestRef& mdr) rmdir_rollback rollback; rollback.reqid = mdr->reqid; rollback.src_dir = dn->get_dir()->dirfrag(); - rollback.src_dname = dn->get_name(); + rollback.src_dname = std::string(dn->get_name()); rollback.dest_dir = straydn->get_dir()->dirfrag(); - rollback.dest_dname = straydn->get_name(); + rollback.dest_dname = std::string(straydn->get_name()); ::encode(rollback, mdr->more()->rollback_bl); dout(20) << " rollback is " << mdr->more()->rollback_bl.length() << " bytes" << dendl; @@ -7188,7 +7188,7 @@ void Server::_rename_prepare(MDRequestRef& mdr, { std::string t; destdn->make_path_string(t, true); - tpi->stray_prior_path = std::move(t); + tpi->stray_prior_path = mempool::mds_co::string(boost::string_view(t)); } tpi->nlink--; if (tpi->nlink == 0) @@ -7689,7 +7689,7 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr) rollback.orig_src.dirfrag = srcdn->get_dir()->dirfrag(); rollback.orig_src.dirfrag_old_mtime = srcdn->get_dir()->get_projected_fnode()->fragstat.mtime; rollback.orig_src.dirfrag_old_rctime = srcdn->get_dir()->get_projected_fnode()->rstat.rctime; - rollback.orig_src.dname = srcdn->get_name(); + rollback.orig_src.dname = std::string(srcdn->get_name()); if (srcdnl->is_primary()) rollback.orig_src.ino = srcdnl->get_inode()->ino(); else { @@ -7701,7 +7701,7 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr) rollback.orig_dest.dirfrag = destdn->get_dir()->dirfrag(); rollback.orig_dest.dirfrag_old_mtime = destdn->get_dir()->get_projected_fnode()->fragstat.mtime; rollback.orig_dest.dirfrag_old_rctime = destdn->get_dir()->get_projected_fnode()->rstat.rctime; - rollback.orig_dest.dname = destdn->get_name(); + rollback.orig_dest.dname = std::string(destdn->get_name()); if (destdnl->is_primary()) rollback.orig_dest.ino = destdnl->get_inode()->ino(); else if (destdnl->is_remote()) { @@ -7713,7 +7713,7 @@ void Server::handle_slave_rename_prep(MDRequestRef& mdr) rollback.stray.dirfrag = straydn->get_dir()->dirfrag(); rollback.stray.dirfrag_old_mtime = straydn->get_dir()->get_projected_fnode()->fragstat.mtime; rollback.stray.dirfrag_old_rctime = straydn->get_dir()->get_projected_fnode()->rstat.rctime; - rollback.stray.dname = straydn->get_name(); + rollback.stray.dname = std::string(straydn->get_name()); } ::encode(rollback, mdr->more()->rollback_bl); dout(20) << " rollback is " << mdr->more()->rollback_bl.length() << " bytes" << dendl; @@ -8426,9 +8426,9 @@ void Server::handle_client_lssnap(MDRequestRef& mdr) // actual string snap_name; if (p->second->ino == diri->ino()) - snap_name = p->second->name; + snap_name = std::string(p->second->name); else - snap_name = p->second->get_long_name(); + snap_name = std::string(p->second->get_long_name()); unsigned start_len = dnbl.length(); if (int(start_len + snap_name.length() + sizeof(__u32) + sizeof(LeaseStat)) > max_bytes) @@ -8562,7 +8562,7 @@ void Server::handle_client_mksnap(MDRequestRef& mdr) SnapInfo info; info.ino = diri->ino(); info.snapid = snapid; - info.name = snapname; + info.name = std::string(snapname); info.stamp = mdr->get_op_stamp(); auto &pi = diri->project_inode(false, true); @@ -8847,7 +8847,7 @@ void Server::handle_client_renamesnap(MDRequestRef& mdr) auto &newsnap = *pi.snapnode; auto it = newsnap.snaps.find(snapid); assert(it != newsnap.snaps.end()); - it->second.name = dstname; + it->second.name = std::string(dstname); // journal the inode changes mdr->ls = mdlog->get_current_segment(); diff --git a/src/mds/SessionMap.cc b/src/mds/SessionMap.cc index 189b144ec22..eadae2770df 100644 --- a/src/mds/SessionMap.cc +++ b/src/mds/SessionMap.cc @@ -903,7 +903,7 @@ int Session::check_access(CInode *in, unsigned mask, if (!in->is_base()) diri = in->get_projected_parent_dn()->get_dir()->get_inode(); if (diri && diri->is_stray()){ - path = in->get_projected_inode()->stray_prior_path; + path = std::string(boost::string_view(in->get_projected_inode()->stray_prior_path)); dout(20) << __func__ << " stray_prior_path " << path << dendl; } else { in->make_path_string(path, true); diff --git a/src/mds/SnapRealm.cc b/src/mds/SnapRealm.cc index 2e3fea9573f..b77a5fd19b5 100644 --- a/src/mds/SnapRealm.cc +++ b/src/mds/SnapRealm.cc @@ -379,7 +379,7 @@ snapid_t SnapRealm::resolve_snapname(boost::string_view n, inodeno_t atino, snap n[0] != '_') return 0; int next_ = n.find('_', 1); if (next_ < 0) return 0; - pname = n.substr(1, next_ - 1); + pname = std::string(n.substr(1, next_ - 1)); pino = atoll(n.data() + next_ + 1); dout(10) << " " << n << " parses to name '" << pname << "' dirino " << pino << dendl; } diff --git a/src/mds/events/EMetaBlob.h b/src/mds/events/EMetaBlob.h index bd2b7fad10b..1467b2c2ebd 100644 --- a/src/mds/events/EMetaBlob.h +++ b/src/mds/events/EMetaBlob.h @@ -89,7 +89,7 @@ public: oldest_snap(os), state(st) { if (i.is_symlink()) - symlink = sym; + symlink = std::string(sym); if (i.is_dir()) dirfragtree = dft; if (oi) diff --git a/src/mds/journal.cc b/src/mds/journal.cc index ea7fa6f4ccd..decb7d47b74 100644 --- a/src/mds/journal.cc +++ b/src/mds/journal.cc @@ -574,7 +574,7 @@ void EMetaBlob::fullbit::update_inode(MDSRank *mds, CInode *in) } } } else if (in->inode.is_symlink()) { - in->symlink = symlink; + in->symlink = mempool::mds_co::string(boost::string_view(symlink)); } in->old_inodes = old_inodes; if (!in->old_inodes.empty()) { @@ -988,7 +988,7 @@ void EMetaBlob::get_paths( iter = fb_list.begin(); iter != fb_list.end(); ++iter) { boost::string_view dentry = (*iter)->dn; children[dir_ino].emplace_back(dentry); - ino_locations[(*iter)->inode.ino] = Location(dir_ino, dentry); + ino_locations[(*iter)->inode.ino] = Location(dir_ino, std::string(dentry)); } for (list::const_iterator @@ -1019,9 +1019,9 @@ void EMetaBlob::get_paths( iter = fb_list.begin(); iter != fb_list.end(); ++iter) { std::string dentry((*iter)->dn); children[dir_ino].push_back(dentry); - ino_locations[(*iter)->inode.ino] = Location(dir_ino, dentry); + ino_locations[(*iter)->inode.ino] = Location(dir_ino, std::string(dentry)); if (children.find((*iter)->inode.ino) == children.end()) { - leaf_locations.push_back(Location(dir_ino, dentry)); + leaf_locations.push_back(Location(dir_ino, std::string(dentry))); } } @@ -1030,14 +1030,14 @@ void EMetaBlob::get_paths( for (list::const_iterator iter = nb_list.begin(); iter != nb_list.end(); ++iter) { boost::string_view dentry = iter->dn; - leaf_locations.push_back(Location(dir_ino, dentry)); + leaf_locations.push_back(Location(dir_ino, std::string(dentry))); } list const &rb_list = dl.get_dremote(); for (list::const_iterator iter = rb_list.begin(); iter != rb_list.end(); ++iter) { boost::string_view dentry = iter->dn; - leaf_locations.push_back(Location(dir_ino, dentry)); + leaf_locations.push_back(Location(dir_ino, std::string(dentry))); } } diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index 638924f6b66..0ede619d543 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -758,7 +758,7 @@ void inode_t::decode(bufferlist::iterator &p) if (struct_v >= 12) { std::string tmp; ::decode(tmp, p); - stray_prior_path = boost::string_view(tmp); + stray_prior_path = std::basic_string,Allocator>(boost::string_view(tmp)); } if (struct_v >= 13) { diff --git a/src/messages/MCacheExpire.h b/src/messages/MCacheExpire.h index 2f4331789d3..7046d960cda 100644 --- a/src/messages/MCacheExpire.h +++ b/src/messages/MCacheExpire.h @@ -79,7 +79,7 @@ public: realms[r].dirs[df] = nonce; } void add_dentry(dirfrag_t r, dirfrag_t df, boost::string_view dn, snapid_t last, unsigned nonce) { - realms[r].dentries[df][pair(dn,last)] = nonce; + realms[r].dentries[df][pair(std::string(dn),last)] = nonce; } void add_realm(dirfrag_t df, realm& r) { diff --git a/src/messages/MDiscoverReply.h b/src/messages/MDiscoverReply.h index 12f1d6f2096..b9007b7c2a3 100644 --- a/src/messages/MDiscoverReply.h +++ b/src/messages/MDiscoverReply.h @@ -160,7 +160,7 @@ public: // void set_flag_forward() { flag_forward = true; } void set_flag_error_dn(boost::string_view dn) { flag_error_dn = true; - error_dentry = dn; + error_dentry = std::string(dn); } void set_flag_error_dir() { flag_error_dir = true; @@ -169,7 +169,7 @@ public: dir_auth_hint = a; } void set_error_dentry(boost::string_view dn) { - error_dentry = dn; + error_dentry = std::string(dn); } diff --git a/src/mon/FSCommands.cc b/src/mon/FSCommands.cc index 98f272d4b0f..54869d8b51e 100644 --- a/src/mon/FSCommands.cc +++ b/src/mon/FSCommands.cc @@ -793,7 +793,7 @@ class LegacyHandler : public T return -ENOENT; } std::map modified = cmdmap; - modified["fs_name"] = fs->mds_map.get_fs_name(); + modified["fs_name"] = std::string(fs->mds_map.get_fs_name()); return T::handle(mon, fsmap, op, modified, ss); } }; diff --git a/src/test/fs/mds_types.cc b/src/test/fs/mds_types.cc index b29b95f4c60..1936b13b971 100644 --- a/src/test/fs/mds_types.cc +++ b/src/test/fs/mds_types.cc @@ -20,8 +20,8 @@ TEST(inode_t, compare_equal) { - inode_t foo; - inode_t bar; + inode_t<> foo; + inode_t<> bar; int compare_r; bool divergent; compare_r = foo.compare(bar, &divergent); @@ -51,8 +51,8 @@ TEST(inode_t, compare_equal) TEST(inode_t, compare_aged) { - inode_t foo; - inode_t bar; + inode_t<> foo; + inode_t<> bar; foo.ino = 1234; foo.ctime.set_from_double(10.0); @@ -78,8 +78,8 @@ TEST(inode_t, compare_aged) TEST(inode_t, compare_divergent) { - inode_t foo; - inode_t bar; + inode_t<> foo; + inode_t<> bar; foo.ino = 1234; foo.ctime.set_from_double(10.0); diff --git a/src/tools/cephfs/JournalTool.cc b/src/tools/cephfs/JournalTool.cc index d134769f8b2..cd398b45e08 100644 --- a/src/tools/cephfs/JournalTool.cc +++ b/src/tools/cephfs/JournalTool.cc @@ -1105,7 +1105,7 @@ void JournalTool::encode_fullbit_as_inode( new_inode.xattrs = fb.xattrs; new_inode.dirfragtree = fb.dirfragtree; new_inode.snap_blob = fb.snapbl; - new_inode.symlink = fb.symlink; + new_inode.symlink = mempool::mds_co::string(boost::string_view(fb.symlink)); new_inode.old_inodes = fb.old_inodes; // Serialize InodeStore