From: huanwen ren Date: Fri, 20 May 2016 08:38:06 +0000 (+0800) Subject: mon/log: clean unused function and comments X-Git-Tag: v11.0.0~487^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dbd6e5709cf9b3b5379e7f2860b523a51c7dccdc;p=ceph.git mon/log: clean unused function and comments clean unused function and comments Signed-off-by: huanwen ren --- diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index 391a3380b79b..f57c830e51f8 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -48,24 +48,6 @@ static ostream& _prefix(std::ostream *_dout, Monitor *mon, version_t v) { ostream& operator<<(ostream& out, LogMonitor& pm) { - /* - std::stringstream ss; - for (ceph::unordered_map::iterator p = pm.pg_map.num_pg_by_state.begin(); - p != pm.pg_map.num_pg_by_state.end(); - ++p) { - if (p != pm.pg_map.num_pg_by_state.begin()) - ss << ", "; - ss << p->second << " " << pg_state_string(p->first); - } - string states = ss.str(); - return out << "v" << pm.pg_map.version << ": " - << pm.pg_map.pg_stat.size() << " pgs: " - << states << "; " - << kb_t(pm.pg_map.total_pg_kb()) << " data, " - << kb_t(pm.pg_map.total_used_kb()) << " used, " - << kb_t(pm.pg_map.total_avail_kb()) << " / " - << kb_t(pm.pg_map.total_kb()) << " free"; - */ return out << "log"; } @@ -223,17 +205,6 @@ void LogMonitor::update_from_paxos(bool *need_bootstrap) check_subs(); } -void LogMonitor::store_do_append(MonitorDBStore::TransactionRef t, - const string& key, bufferlist& bl) -{ - bufferlist existing_bl; - int err = get_value(key, existing_bl); - assert(err == 0); - - existing_bl.append(bl); - put_value(t, key, existing_bl); -} - void LogMonitor::create_pending() { pending_log.clear(); diff --git a/src/mon/LogMonitor.h b/src/mon/LogMonitor.h index 678c5ff3fc9d..8e7a4a9b7213 100644 --- a/src/mon/LogMonitor.h +++ b/src/mon/LogMonitor.h @@ -169,9 +169,6 @@ private: bool _create_sub_summary(MLog *mlog, int level); void _create_sub_incremental(MLog *mlog, int level, version_t sv); - void store_do_append(MonitorDBStore::TransactionRef t, - const string& key, bufferlist& bl); - public: LogMonitor(Monitor *mn, Paxos *p, const string& service_name) : PaxosService(mn, p, service_name) { }