From 81bee4c6f6483118114844f7a78edef4a2f3cad0 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sat, 26 Aug 2017 15:13:01 -0400 Subject: [PATCH] mon: remove some upgrade-specific bits of PGStatService Signed-off-by: Sage Weil --- src/mon/OSDMonitor.cc | 14 -------------- src/mon/PGStatService.h | 19 +------------------ 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/src/mon/OSDMonitor.cc b/src/mon/OSDMonitor.cc index 68ac3a3957954..256d03abe8ee4 100644 --- a/src/mon/OSDMonitor.cc +++ b/src/mon/OSDMonitor.cc @@ -651,14 +651,6 @@ OSDMonitor::update_pending_pgs(const OSDMap::Incremental& inc) } // check for new or old pools if (pending_creatings.last_scan_epoch < inc.epoch) { - if (osdmap.get_epoch() && - osdmap.require_osd_release < CEPH_RELEASE_LUMINOUS) { - auto added = - mon->pgservice->maybe_add_creating_pgs(creating_pgs.last_scan_epoch, - osdmap.get_pools(), - &pending_creatings); - dout(7) << __func__ << " " << added << " pgs added from pgmap" << dendl; - } unsigned queued = 0; queued += scan_for_creating_pgs(osdmap.get_pools(), inc.old_pools, @@ -1172,12 +1164,6 @@ void OSDMonitor::encode_pending(MonitorDBStore::TransactionRef t) if (mon->monmap->get_required_features().contains_all( ceph::features::mon::FEATURE_LUMINOUS)) { auto pending_creatings = update_pending_pgs(pending_inc); - if (osdmap.get_epoch() && - osdmap.require_osd_release < CEPH_RELEASE_LUMINOUS) { - dout(7) << __func__ << " in the middle of upgrading, " - << " trimming pending creating_pgs using pgmap" << dendl; - mon->pgservice->maybe_trim_creating_pgs(&pending_creatings); - } bufferlist creatings_bl; ::encode(pending_creatings, creatings_bl); t->put(OSD_PG_CREATING_PREFIX, "creating", creatings_bl); diff --git a/src/mon/PGStatService.h b/src/mon/PGStatService.h index 1354ed3d4cbb9..f179b9c767f0b 100644 --- a/src/mon/PGStatService.h +++ b/src/mon/PGStatService.h @@ -96,24 +96,7 @@ class MonPGStatService : virtual public PGStatService { public: MonPGStatService() : PGStatService() {} virtual ~MonPGStatService() {} - /** - * For upgrades. If the PGMap has newer data than the monitor's new - * creating_pgs (scan_epoch), insert them into the passed pending_creates. - */ - virtual unsigned maybe_add_creating_pgs(epoch_t scan_epoch, - const mempool::osdmap::map& pools, - creating_pgs_t *pending_creates) const { - ceph_abort(); - return 0; - } - /** - * For upgrades. If some PGs are created before all OSDs are luminous - * and start sending MOSDPGCreated, we need to be sync with pgmap - * - */ - virtual void maybe_trim_creating_pgs(creating_pgs_t *creates) const { - ceph_abort(); - } + virtual int reweight_by_utilization(const OSDMap &osd_map, int oload, double max_changef, -- 2.39.5