From: Sage Weil Date: Tue, 31 Jan 2017 17:31:12 +0000 (-0500) Subject: mon/PGMonitor: clean up some send_pg_creates cruft X-Git-Tag: v12.0.1~465^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=b79a85e80a1a660c5a5746270edb86d3f09cd983;p=ceph.git mon/PGMonitor: clean up some send_pg_creates cruft ff1fd4b4b69b52ef5ae734115b1d733aad03b03e already removed most of this; remove the now useless stub and clean up the unneede con check. Signed-off-by: Sage Weil --- diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 79b95049d09f..13e342b2bf5f 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -236,8 +236,12 @@ void PGMonitor::upgrade_format() void PGMonitor::post_paxos_update() { dout(10) << __func__ << dendl; - if (mon->osdmon()->osdmap.get_epoch()) { - send_pg_creates(); + OSDMap& osdmap = mon->osdmon()->osdmap; + if (osdmap.get_epoch()) { + if (osdmap.get_num_up_osds() > 0) { + assert(osdmap.get_up_osd_features() & CEPH_FEATURE_MON_STATEFUL_SUB); + check_subs(); + } } } @@ -879,17 +883,6 @@ void PGMonitor::check_osd_map(epoch_t epoch) propose_pending(); } -void PGMonitor::send_pg_creates() -{ - OSDMap& osdmap = mon->osdmon()->osdmap; - if (osdmap.get_num_up_osds() == 0) - return; - - assert(osdmap.get_up_osd_features() & CEPH_FEATURE_MON_STATEFUL_SUB); - check_subs(); - return; -} - epoch_t PGMonitor::send_pg_creates(int osd, Connection *con, epoch_t next) { dout(30) << __func__ << " " << pg_map.creating_pgs_by_osd_epoch << dendl; @@ -927,12 +920,7 @@ epoch_t PGMonitor::send_pg_creates(int osd, Connection *con, epoch_t next) return next; } - if (con) { - con->send_message(m); - } else { - assert(mon->osdmon()->osdmap.is_up(osd)); - mon->messenger->send_message(m, mon->osdmon()->osdmap.get_inst(osd)); - } + con->send_message(m); last_sent_pg_create[osd] = ceph_clock_now(); // sub is current through last + 1 diff --git a/src/mon/PGMonitor.h b/src/mon/PGMonitor.h index 2fce01200b06..e1c9c822f98f 100644 --- a/src/mon/PGMonitor.h +++ b/src/mon/PGMonitor.h @@ -92,7 +92,6 @@ private: void register_new_pgs(); - void send_pg_creates(); epoch_t send_pg_creates(int osd, Connection *con, epoch_t next); /**