From: Haomai Wang Date: Mon, 16 Dec 2013 07:27:39 +0000 (+0800) Subject: Rename filestore_perf_t to objectstore_perf_t X-Git-Tag: v0.75~79^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fae569d333365381e58cb2ca5a8cc5c32c64b778;p=ceph.git Rename filestore_perf_t to objectstore_perf_t The name "filestore_perf_t" isn't suitable for other backends, so we need to rename it. Signed-off-by: Haomai Wang --- diff --git a/src/os/FileStore.h b/src/os/FileStore.h index a8493666f388..88e6c66e9c3b 100644 --- a/src/os/FileStore.h +++ b/src/os/FileStore.h @@ -137,8 +137,8 @@ public: PerfCounters::avg_tracker os_commit_latency; PerfCounters::avg_tracker 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(); } diff --git a/src/os/MemStore.cc b/src/os/MemStore.cc index 0d1303cfb7a0..e448a2ff383d 100644 --- a/src/os/MemStore.cc +++ b/src/os/MemStore.cc @@ -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) diff --git a/src/os/MemStore.h b/src/os/MemStore.h index 423ea7a5555d..6b212ee28f13 100644 --- a/src/os/MemStore.h +++ b/src/os/MemStore.h @@ -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& tls, diff --git a/src/os/ObjectStore.h b/src/os/ObjectStore.h index fe535ff72861..90db986b2954 100644 --- a/src/os/ObjectStore.h +++ b/src/os/ObjectStore.h @@ -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 diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index ef0f437c6ea6..cc0d389c80fa 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -185,13 +185,13 @@ void pow2_hist_t::generate_test_instances(list& 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& o) +void objectstore_perf_stat_t::generate_test_instances(std::list& 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; } diff --git a/src/osd/osd_types.h b/src/osd/osd_types.h index 5ca10277ab00..06583ab33130 100644 --- a/src/osd/osd_types.h +++ b/src/osd/osd_types.h @@ -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& o); + static void generate_test_instances(std::list& 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) {} diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h index 597586d9df4f..c9d75a0ed3fc 100644 --- a/src/test/encoding/types.h +++ b/src/test/encoding/types.h @@ -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)