]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/mds/events/EMetaBlob.h
import quincy beta 17.1.0
[ceph.git] / ceph / src / mds / events / EMetaBlob.h
index d555627a3c638419a672263337683b30e4844407..a766504f5f4bc340ec271b1f7ff72cbd3b6bd9a4 100644 (file)
@@ -112,7 +112,7 @@ public:
     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;
@@ -121,8 +121,8 @@ public:
       }
       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");
@@ -156,7 +156,7 @@ public:
 
     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;
@@ -188,7 +188,7 @@ public:
     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;
     }
@@ -214,9 +214,9 @@ public:
   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) { }
@@ -234,10 +234,10 @@ public:
     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) {
@@ -252,7 +252,7 @@ public:
       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
@@ -266,8 +266,8 @@ public:
        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");
@@ -309,16 +309,16 @@ public:
   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.
@@ -329,16 +329,16 @@ private:
   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;
@@ -365,20 +365,20 @@ private:
   ~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) {
@@ -527,7 +527,7 @@ private:
       }
     }
 
-    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());
@@ -578,7 +578,7 @@ private:
           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";
@@ -605,7 +605,7 @@ WRITE_CLASS_ENCODER(EMetaBlob::remotebit)
 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;
 }