diff options
author | Sage Weil <sage@newdream.net> | 2011-11-16 11:01:59 -0800 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2011-11-16 11:01:59 -0800 |
commit | 17fa1e0d4eff7c8f661c181acbd4c2fdd2e14af6 (patch) | |
tree | c20307235c759ffe54570e8a843f6bbc161a902b | |
parent | b9d5fbe494fae46fcd5968fb17e8233aa214401d (diff) | |
download | ceph-17fa1e0d4eff7c8f661c181acbd4c2fdd2e14af6.tar.gz |
mon: renamed get_latest* -> get_stashed*
This makes e.g. get_latest_version() vs get_last_committed() less
confusing.
Signed-off-by: Sage Weil <sage@newdream.net>
-rw-r--r-- | src/mon/AuthMonitor.cc | 4 | ||||
-rw-r--r-- | src/mon/LogMonitor.cc | 4 | ||||
-rw-r--r-- | src/mon/Monitor.cc | 4 | ||||
-rw-r--r-- | src/mon/MonmapMonitor.cc | 8 | ||||
-rw-r--r-- | src/mon/OSDMonitor.cc | 4 | ||||
-rw-r--r-- | src/mon/PGMonitor.cc | 4 | ||||
-rw-r--r-- | src/mon/Paxos.cc | 10 | ||||
-rw-r--r-- | src/mon/Paxos.h | 4 |
8 files changed, 21 insertions, 21 deletions
diff --git a/src/mon/AuthMonitor.cc b/src/mon/AuthMonitor.cc index 01d6c75a57a..1dd8b7314aa 100644 --- a/src/mon/AuthMonitor.cc +++ b/src/mon/AuthMonitor.cc @@ -118,9 +118,9 @@ bool AuthMonitor::update_from_paxos() return true; assert(paxosv >= keys_ver); - if (keys_ver != paxos->get_latest_version()) { + if (keys_ver != paxos->get_stashed_version()) { bufferlist latest; - keys_ver = paxos->get_latest(latest); + keys_ver = paxos->get_stashed(latest); dout(7) << "update_from_paxos loading summary e" << keys_ver << dendl; bufferlist::iterator p = latest.begin(); __u8 struct_v; diff --git a/src/mon/LogMonitor.cc b/src/mon/LogMonitor.cc index 17608e96092..1e305d34242 100644 --- a/src/mon/LogMonitor.cc +++ b/src/mon/LogMonitor.cc @@ -104,9 +104,9 @@ bool LogMonitor::update_from_paxos() bufferlist blogerr; bufferlist blogsec; - if (summary.version != paxos->get_latest_version()) { + if (summary.version != paxos->get_stashed_version()) { bufferlist latest; - version_t v = paxos->get_latest(latest); + version_t v = paxos->get_stashed(latest); dout(7) << "update_from_paxos loading summary e" << v << dendl; bufferlist::iterator p = latest.begin(); ::decode(summary, p); diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 67ac8f1349a..92e45322cd0 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -474,7 +474,7 @@ void Monitor::slurp() // latest? if (pax->get_first_committed() > 1 && // don't need it! - pax->get_latest_version() < pax->get_first_committed()) { + pax->get_stashed_version() < pax->get_first_committed()) { MMonProbe *m = new MMonProbe(monmap->fsid, MMonProbe::OP_SLURP_LATEST, name); m->machine_name = p->first; m->oldest_version = pax->get_first_committed(); @@ -531,7 +531,7 @@ void Monitor::handle_probe_slurp_latest(MMonProbe *m) r->machine_name = m->machine_name; r->oldest_version = pax->get_first_committed(); r->newest_version = pax->get_version(); - r->latest_version = pax->get_latest(r->latest_value); + r->latest_version = pax->get_stashed(r->latest_value); messenger->send_message(r, m->get_connection()); diff --git a/src/mon/MonmapMonitor.cc b/src/mon/MonmapMonitor.cc index 5d84c2ddc3e..f50766c369c 100644 --- a/src/mon/MonmapMonitor.cc +++ b/src/mon/MonmapMonitor.cc @@ -50,20 +50,20 @@ void MonmapMonitor::create_initial() bool MonmapMonitor::update_from_paxos() { version_t paxosv = paxos->get_version(); - if (paxosv <= paxos->get_latest_version() && + if (paxosv <= paxos->get_stashed_version() && paxosv <= mon->monmap->get_epoch()) return true; dout(10) << "update_from_paxos paxosv " << paxosv << ", my v " << mon->monmap->epoch << dendl; - version_t orig_latest = paxos->get_latest_version(); + version_t orig_latest = paxos->get_stashed_version(); bool need_restart = paxosv != mon->monmap->get_epoch(); if (paxosv > 0 && (mon->monmap->get_epoch() == 0 || - paxos->get_latest_version() != paxosv)) { + paxos->get_stashed_version() != paxosv)) { bufferlist latest; - version_t v = paxos->get_latest(latest); + version_t v = paxos->get_stashed(latest); if (v) { mon->monmap->decode(latest); } diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 843d93973bf..61c7bf58538 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -95,9 +95,9 @@ bool OSDMonitor::update_from_paxos() dout(15) << "update_from_paxos paxos e " << paxosv << ", my e " << osdmap.epoch << dendl; - if (osdmap.epoch != paxos->get_latest_version()) { + if (osdmap.epoch != paxos->get_stashed_version()) { bufferlist latest; - version_t v = paxos->get_latest(latest); + version_t v = paxos->get_stashed(latest); dout(7) << "update_from_paxos loading latest full map e" << v << dendl; osdmap.decode(latest); } diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index fcf9c64e80a..1a21a291a04 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -118,9 +118,9 @@ bool PGMonitor::update_from_paxos() return true; assert(paxosv >= pg_map.version); - if (pg_map.version != paxos->get_latest_version()) { + if (pg_map.version != paxos->get_stashed_version()) { bufferlist latest; - version_t v = paxos->get_latest(latest); + version_t v = paxos->get_stashed(latest); dout(7) << "update_from_paxos loading latest full pgmap v" << v << dendl; try { PGMap tmp_pg_map; diff --git a/src/mon/Paxos.cc b/src/mon/Paxos.cc index 99aba7f6152..05a00038e4e 100644 --- a/src/mon/Paxos.cc +++ b/src/mon/Paxos.cc @@ -161,7 +161,7 @@ void Paxos::share_state(MMonPaxos *m, version_t peer_first_committed, version_t // start with a stashed full copy? if (peer_last_committed + 1 < first_committed) { bufferlist bl; - version_t l = get_latest(bl); + version_t l = get_stashed(bl); assert(l <= last_committed); dout(10) << "share_state starting with latest " << l << " (" << bl.length() << " bytes)" << dendl; m->latest_value.claim(bl); @@ -914,7 +914,7 @@ void Paxos::update_observers() if (observer->last_version == 0 || observer->last_version < first_committed) { - ver = get_latest(bl); + ver = get_stashed(bl); if (ver) { dout(10) << " sending summary state v" << ver << " to " << observer->inst << dendl; mon->messenger->send_message(new MMonObserveNotify(mon->monmap->fsid, machine_id, bl, ver, true), @@ -1029,11 +1029,11 @@ void Paxos::stash_latest(version_t v, bufferlist& bl) latest_stashed = v; } -version_t Paxos::get_latest(bufferlist& bl) +version_t Paxos::get_stashed(bufferlist& bl) { bufferlist full; if (mon->store->get_bl_ss(full, machine_name, "latest") <= 0) { - dout(10) << "get_latest not found" << dendl; + dout(10) << "get_stashed not found" << dendl; return 0; } bufferlist::iterator p = full.begin(); @@ -1042,6 +1042,6 @@ version_t Paxos::get_latest(bufferlist& bl) ::decode(bl, p); latest_stashed = v; - dout(10) << "get_latest v" << latest_stashed << " len " << bl.length() << dendl; + dout(10) << "get_stashed v" << latest_stashed << " len " << bl.length() << dendl; return latest_stashed; } diff --git a/src/mon/Paxos.h b/src/mon/Paxos.h index 360ae1f1db9..a340cdab3b9 100644 --- a/src/mon/Paxos.h +++ b/src/mon/Paxos.h @@ -298,8 +298,8 @@ public: // if state values are incrementals, it is usefult to keep // the latest copy of the complete structure. void stash_latest(version_t v, bufferlist& bl); - version_t get_latest(bufferlist& bl); - version_t get_latest_version() { return latest_stashed; } + version_t get_stashed(bufferlist& bl); + version_t get_stashed_version() { return latest_stashed; } version_t get_first_committed() { return first_committed; } |