]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Rename filestore_perf_t to objectstore_perf_t 926/head
authorHaomai Wang <haomaiwang@gmail.com>
Mon, 16 Dec 2013 07:27:39 +0000 (15:27 +0800)
committerHaomai Wang <haomaiwang@gmail.com>
Mon, 16 Dec 2013 07:27:39 +0000 (15:27 +0800)
The name "filestore_perf_t" isn't suitable for other backends, so we
need to rename it.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
src/os/FileStore.h
src/os/MemStore.cc
src/os/MemStore.h
src/os/ObjectStore.h
src/osd/osd_types.cc
src/osd/osd_types.h
src/test/encoding/types.h

index a8493666f388270fd6c93cd5a939fc3bac0d604d..88e6c66e9c3bc17a3923b8d4cb261e814fa637f1 100644 (file)
@@ -137,8 +137,8 @@ public:
     PerfCounters::avg_tracker<uint64_t> os_commit_latency;
     PerfCounters::avg_tracker<uint64_t> os_apply_latency;
 
-    filestore_perf_stat_t get_cur_stats() const {
-      filestore_perf_stat_t ret;
+    objectstore_perf_stat_t get_cur_stats() const {
+      objectstore_perf_stat_t ret;
       ret.filestore_commit_latency = os_commit_latency.avg();
       ret.filestore_apply_latency = os_apply_latency.avg();
       return ret;
@@ -146,7 +146,7 @@ public:
 
     void update_from_perfcounters(PerfCounters &logger);
   } perf_tracker;
-  filestore_perf_stat_t get_cur_stats() {
+  objectstore_perf_stat_t get_cur_stats() {
     perf_tracker.update_from_perfcounters(*logger);
     return perf_tracker.get_cur_stats();
   }
index 0d1303cfb7a0a840cbebcbb8e6606ae250ac7e66..e448a2ff383d6a19ff4daca42487161872881581 100644 (file)
@@ -218,10 +218,10 @@ int MemStore::statfs(struct statfs *st)
   return 0;
 }
 
-filestore_perf_stat_t MemStore::get_cur_stats()
+objectstore_perf_stat_t MemStore::get_cur_stats()
 {
   // fixme
-  return filestore_perf_stat_t();
+  return objectstore_perf_stat_t();
 }
 
 MemStore::CollectionRef MemStore::get_collection(coll_t cid)
index 423ea7a5555d1f80c3778c922a37c0bc1ed4fc03..6b212ee28f13ec1d80369cca52db598b91069f49 100644 (file)
@@ -344,7 +344,7 @@ public:
   void set_fsid(uuid_d u);
   uuid_d get_fsid();
 
-  filestore_perf_stat_t get_cur_stats();
+  objectstore_perf_stat_t get_cur_stats();
 
   int queue_transactions(
     Sequencer *osr, list<Transaction*>& tls,
index fe535ff728617e6f9ba2eb402c6aac6b87815745..90db986b2954e65b6bd935f736154ded89ab3afc 100644 (file)
@@ -71,7 +71,7 @@ public:
 
   Logger *logger;
 
-  virtual filestore_perf_stat_t get_cur_stats() = 0;
+  virtual objectstore_perf_stat_t get_cur_stats() = 0;
 
   /**
    * a sequencer orders transactions
index ef0f437c6ea617c37b65a0c152f22c78518d054b..cc0d389c80fa2c8e131ffc89b47741e04a2f28e6 100644 (file)
@@ -185,13 +185,13 @@ void pow2_hist_t::generate_test_instances(list<pow2_hist_t*>& ls)
   ls.back()->h.push_back(2);
 }
 
-void filestore_perf_stat_t::dump(Formatter *f) const
+void objectstore_perf_stat_t::dump(Formatter *f) const
 {
   f->dump_unsigned("commit_latency_ms", filestore_commit_latency);
   f->dump_unsigned("apply_latency_ms", filestore_apply_latency);
 }
 
-void filestore_perf_stat_t::encode(bufferlist &bl) const
+void objectstore_perf_stat_t::encode(bufferlist &bl) const
 {
   ENCODE_START(1, 1, bl);
   ::encode(filestore_commit_latency, bl);
@@ -199,7 +199,7 @@ void filestore_perf_stat_t::encode(bufferlist &bl) const
   ENCODE_FINISH(bl);
 }
 
-void filestore_perf_stat_t::decode(bufferlist::iterator &bl)
+void objectstore_perf_stat_t::decode(bufferlist::iterator &bl)
 {
   DECODE_START(1, bl);
   ::decode(filestore_commit_latency, bl);
@@ -207,10 +207,10 @@ void filestore_perf_stat_t::decode(bufferlist::iterator &bl)
   DECODE_FINISH(bl);
 }
 
-void filestore_perf_stat_t::generate_test_instances(std::list<filestore_perf_stat_t*>& o)
+void objectstore_perf_stat_t::generate_test_instances(std::list<objectstore_perf_stat_t*>& o)
 {
-  o.push_back(new filestore_perf_stat_t());
-  o.push_back(new filestore_perf_stat_t());
+  o.push_back(new objectstore_perf_stat_t());
+  o.push_back(new objectstore_perf_stat_t());
   o.back()->filestore_commit_latency = 20;
   o.back()->filestore_apply_latency = 30;
 }
index 5ca10277ab001f074d9e11059efb527ca9d52a00..06583ab33130a57ad5c1263fe3ac2ef938e13046 100644 (file)
@@ -547,32 +547,32 @@ inline ostream& operator<<(ostream& out, const eversion_t e) {
 }
 
 /**
- * filestore_perf_stat_t
+ * objectstore_perf_stat_t
  *
  * current perf information about the osd
  */
-struct filestore_perf_stat_t {
+struct objectstore_perf_stat_t {
   // cur_op_latency is in ms since double add/sub are not associative
   uint32_t filestore_commit_latency;
   uint32_t filestore_apply_latency;
 
-  filestore_perf_stat_t() :
+  objectstore_perf_stat_t() :
     filestore_commit_latency(0), filestore_apply_latency(0) {}
 
-  void add(const filestore_perf_stat_t &o) {
+  void add(const objectstore_perf_stat_t &o) {
     filestore_commit_latency += o.filestore_commit_latency;
     filestore_apply_latency += o.filestore_apply_latency;
   }
-  void sub(const filestore_perf_stat_t &o) {
+  void sub(const objectstore_perf_stat_t &o) {
     filestore_commit_latency -= o.filestore_commit_latency;
     filestore_apply_latency -= o.filestore_apply_latency;
   }
   void dump(Formatter *f) const;
   void encode(bufferlist &bl) const;
   void decode(bufferlist::iterator &bl);
-  static void generate_test_instances(std::list<filestore_perf_stat_t*>& o);
+  static void generate_test_instances(std::list<objectstore_perf_stat_t*>& o);
 };
-WRITE_CLASS_ENCODER(filestore_perf_stat_t)
+WRITE_CLASS_ENCODER(objectstore_perf_stat_t)
 
 /** osd_stat
  * aggregate stats for an osd
@@ -584,7 +584,7 @@ struct osd_stat_t {
 
   pow2_hist_t op_queue_age_hist;
 
-  filestore_perf_stat_t fs_perf_stat;
+  objectstore_perf_stat_t fs_perf_stat;
 
   osd_stat_t() : kb(0), kb_used(0), kb_avail(0),
                 snap_trim_queue_len(0), num_snap_trimming(0) {}
index 597586d9df4fb6a6820f460104034118969ea8f6..c9d75a0ed3fc2000930059a168e1471bcbb077ec 100644 (file)
@@ -45,7 +45,7 @@ TYPE(object_locator_t)
 TYPE(request_redirect_t)
 TYPE(pg_t)
 TYPE(coll_t)
-TYPE(filestore_perf_stat_t)
+TYPE(objectstore_perf_stat_t)
 TYPE(osd_stat_t)
 TYPE(OSDSuperblock)
 TYPE_FEATUREFUL(pool_snap_info_t)