From 797950ef3928f7ee0703d43eef184a0d72e64005 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 9 Sep 2010 11:09:57 -0700 Subject: [PATCH] mon: fix up variable names to be more clear this is an inclusive range --- src/mon/OSDMonitor.cc | 20 ++++++++++---------- src/mon/OSDMonitor.h | 6 +++--- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index e2633156676e2..6dfd4a8667d22 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -751,7 +751,7 @@ void OSDMonitor::send_full(PaxosServiceMessage *m) MOSDMap *OSDMonitor::build_incremental(epoch_t from, epoch_t to) { - dout(10) << "build_incremental from " << from << " to " << to << dendl; + dout(10) << "build_incremental [" << from << ".." << to << "]" << dendl; MOSDMap *m = new MOSDMap(mon->monmap->fsid); for (epoch_t e = to; @@ -773,23 +773,23 @@ MOSDMap *OSDMonitor::build_incremental(epoch_t from, epoch_t to) return m; } -void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t from) +void OSDMonitor::send_incremental(PaxosServiceMessage *req, epoch_t first) { - dout(5) << "send_incremental from " << from << " -> " << osdmap.get_epoch() + dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]" << " to " << req->get_orig_source_inst() << dendl; - MOSDMap *m = build_incremental(from, osdmap.get_epoch()); + MOSDMap *m = build_incremental(first, osdmap.get_epoch()); mon->send_reply(req, m); } -void OSDMonitor::send_incremental(epoch_t from, entity_inst_t& dest) +void OSDMonitor::send_incremental(epoch_t first, entity_inst_t& dest) { - dout(5) << "send_incremental from " << from << " -> " << osdmap.get_epoch() + dout(5) << "send_incremental [" << first << ".." << osdmap.get_epoch() << "]" << " to " << dest << dendl; - while (from <= osdmap.get_epoch()) { - epoch_t to = MIN(from + 100, osdmap.get_epoch()); - MOSDMap *m = build_incremental(from, to); + while (first <= osdmap.get_epoch()) { + epoch_t last = MIN(first + 100, osdmap.get_epoch()); + MOSDMap *m = build_incremental(first, last); mon->messenger->send_message(m, dest); - from = to + 1; + first = last + 1; } } diff --git a/src/mon/OSDMonitor.h b/src/mon/OSDMonitor.h index 0ac005067226b..0de8862906fb8 100644 --- a/src/mon/OSDMonitor.h +++ b/src/mon/OSDMonitor.h @@ -66,9 +66,9 @@ private: // ... void send_to_waiting(); // send current map to waiters. void send_full(PaxosServiceMessage *m); - MOSDMap *build_incremental(epoch_t from, epoch_t to); - void send_incremental(PaxosServiceMessage *m, epoch_t since); - void send_incremental(epoch_t from, entity_inst_t& dest); + MOSDMap *build_incremental(epoch_t first, epoch_t last); + void send_incremental(PaxosServiceMessage *m, epoch_t first); + void send_incremental(epoch_t first, entity_inst_t& dest); bool preprocess_failure(class MOSDFailure *m); -- 2.39.5