bool need_snapflush() const { return (state & STATE_NEED_SNAPFLUSH); }
bool is_export_ephemeral_random() const { return (state & STATE_EPHEMERAL_RANDOM); }
- void print(ostream& out) const {
+ void print(std::ostream& out) const {
out << " fullbit dn " << dn << " [" << dnfirst << "," << dnlast << "] dnv " << dnv
<< " inode " << inode->ino
<< " state=" << state;
}
out << std::endl;
}
- string state_string() const {
- string state_string;
+ std::string state_string() const {
+ std::string state_string;
bool marked_already = false;
if (is_dirty()) {
state_string.append("dirty");
void encode(bufferlist& bl) const;
void decode(bufferlist::const_iterator &bl);
- void print(ostream& out) const {
+ void print(std::ostream& out) const {
out << " remotebit dn " << dn << " [" << dnfirst << "," << dnlast << "] dnv " << dnv
<< " ino " << ino
<< " dirty=" << dirty;
void decode(bufferlist::const_iterator &bl);
void dump(Formatter *f) const;
static void generate_test_instances(std::list<nullbit*>& ls);
- void print(ostream& out) const {
+ void print(std::ostream& out) const {
out << " nullbit dn " << dn << " [" << dnfirst << "," << dnlast << "] dnv " << dnv
<< " dirty=" << dirty << std::endl;
}
private:
mutable bufferlist dnbl;
mutable bool dn_decoded;
- mutable list<fullbit> dfull;
- mutable vector<remotebit> dremote;
- mutable vector<nullbit> dnull;
+ mutable std::list<fullbit> dfull;
+ mutable std::vector<remotebit> dremote;
+ mutable std::vector<nullbit> dnull;
public:
dirlump() : state(0), nfull(0), nremote(0), nnull(0), dn_decoded(true) { }
bool is_dirty_dft() { return state & STATE_DIRTYDFT; }
void mark_dirty_dft() { state |= STATE_DIRTYDFT; }
- const list<fullbit> &get_dfull() const { return dfull; }
- list<fullbit> &_get_dfull() { return dfull; }
- const vector<remotebit> &get_dremote() const { return dremote; }
- const vector<nullbit> &get_dnull() const { return dnull; }
+ const std::list<fullbit> &get_dfull() const { return dfull; }
+ std::list<fullbit> &_get_dfull() { return dfull; }
+ const std::vector<remotebit> &get_dremote() const { return dremote; }
+ const std::vector<nullbit> &get_dnull() const { return dnull; }
template< class... Args>
void add_dfull(Args&&... args) {
dnull.emplace_back(std::forward<Args>(args)...);
}
- void print(dirfrag_t dirfrag, ostream& out) const {
+ void print(dirfrag_t dirfrag, std::ostream& out) const {
out << "dirlump " << dirfrag << " v " << fnode->version
<< " state " << state
<< " num " << nfull << "/" << nremote << "/" << nnull
p.print(out);
}
- string state_string() const {
- string state_string;
+ std::string state_string() const {
+ std::string state_string;
bool marked_already = false;
if (is_complete()) {
state_string.append("complete");
WRITE_CLASS_ENCODER_FEATURES(dirlump)
// my lumps. preserve the order we added them in a list.
- vector<dirfrag_t> lump_order;
- map<dirfrag_t, dirlump> lump_map;
- list<fullbit> roots;
+ std::vector<dirfrag_t> lump_order;
+ std::map<dirfrag_t, dirlump> lump_map;
+ std::list<fullbit> roots;
public:
- vector<pair<__u8,version_t> > table_tids; // tableclient transactions
+ std::vector<std::pair<__u8,version_t> > table_tids; // tableclient transactions
inodeno_t opened_ino;
public:
inodeno_t renamed_dirino;
- vector<frag_t> renamed_dir_frags;
+ std::vector<frag_t> renamed_dir_frags;
private:
// ino (pre)allocation. may involve both inotable AND session state.
entity_name_t client_name; // session
// inodes i've truncated
- vector<inodeno_t> truncate_start; // start truncate
- map<inodeno_t, LogSegment::seq_t> truncate_finish; // finished truncate (started in segment blah)
+ std::vector<inodeno_t> truncate_start; // start truncate
+ std::map<inodeno_t, LogSegment::seq_t> truncate_finish; // finished truncate (started in segment blah)
public:
- vector<inodeno_t> destroyed_inodes;
+ std::vector<inodeno_t> destroyed_inodes;
private:
// idempotent op(s)
- vector<pair<metareqid_t,uint64_t> > client_reqs;
- vector<pair<metareqid_t,uint64_t> > client_flushes;
+ std::vector<std::pair<metareqid_t,uint64_t> > client_reqs;
+ std::vector<std::pair<metareqid_t,uint64_t> > client_flushes;
public:
void encode(bufferlist& bl, uint64_t features) const;
~EMetaBlob() { }
EMetaBlob& operator=(const EMetaBlob&) = delete;
- void print(ostream& out) {
+ void print(std::ostream& out) {
for (const auto &p : lump_order)
lump_map[p].print(p, out);
}
void add_client_req(metareqid_t r, uint64_t tid=0) {
- client_reqs.push_back(pair<metareqid_t,uint64_t>(r, tid));
+ client_reqs.push_back(std::pair<metareqid_t,uint64_t>(r, tid));
}
void add_client_flush(metareqid_t r, uint64_t tid=0) {
- client_flushes.push_back(pair<metareqid_t,uint64_t>(r, tid));
+ client_flushes.push_back(std::pair<metareqid_t,uint64_t>(r, tid));
}
void add_table_transaction(int table, version_t tid) {
- table_tids.push_back(pair<__u8, version_t>(table, tid));
+ table_tids.emplace_back(table, tid);
}
void add_opened_ino(inodeno_t ino) {
}
}
- string empty;
+ std::string empty;
roots.emplace_back(empty, "", in->first, in->last, 0, pi, pdft, px, in->symlink,
in->oldest_snap, snapbl, (dirty ? fullbit::STATE_DIRTY : 0),
in->get_old_inodes());
opened_ino == 0 && inotablev == 0 && sessionmapv == 0;
}
- void print(ostream& out) const {
+ void print(std::ostream& out) const {
out << "[metablob";
if (!lump_order.empty())
out << " " << lump_order.front() << ", " << lump_map.size() << " dirs";
WRITE_CLASS_ENCODER(EMetaBlob::nullbit)
WRITE_CLASS_ENCODER_FEATURES(EMetaBlob::dirlump)
-inline ostream& operator<<(ostream& out, const EMetaBlob& t) {
+inline std::ostream& operator<<(std::ostream& out, const EMetaBlob& t) {
t.print(out);
return out;
}