]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMonitor: assert(format_version == 1) 15272/head
authorKefu Chai <kchai@redhat.com>
Sat, 20 May 2017 05:07:24 +0000 (13:07 +0800)
committerKefu Chai <kchai@redhat.com>
Wed, 24 May 2017 17:24:47 +0000 (01:24 +0800)
we have been PGMonitor's formart_version has been 1 since v0.67
(dumpling). so let's drop it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/mon/PGMap.cc
src/mon/PGMap.h
src/mon/PGMonitor.cc

index 7b0e5247b0870e2b2911208fd584508bf0eb96ca..d420d9eea49f87a396133b118f0c7b862382a428 100644 (file)
@@ -674,24 +674,6 @@ void PGMap::decode(bufferlist::iterator &bl)
   calc_stats();
 }
 
-void PGMap::dirty_all(Incremental& inc)
-{
-  inc.osdmap_epoch = last_osdmap_epoch;
-  inc.pg_scan = last_pg_scan;
-  inc.full_ratio = full_ratio;
-  inc.nearfull_ratio = nearfull_ratio;
-
-  for (ceph::unordered_map<pg_t,pg_stat_t>::const_iterator p = pg_stat.begin(); p != pg_stat.end(); ++p) {
-    inc.pg_stat_updates[p->first] = p->second;
-  }
-  for (ceph::unordered_map<int32_t, osd_stat_t>::const_iterator p = osd_stat.begin(); p != osd_stat.end(); ++p) {
-    assert(osd_epochs.count(p->first));
-    inc.update_stat(p->first,
-                    inc.get_osd_epochs().find(p->first)->second,
-                    p->second);
-  }
-}
-
 void PGMap::dump(Formatter *f) const
 {
   dump_basic(f);
index e2d01cd2a777dae751e721f36ec2ddabe5b733e4..556cc8929bc2e476ba1fdf759e5b2475198ce5a3 100644 (file)
@@ -282,8 +282,6 @@ public:
   void encode(bufferlist &bl, uint64_t features=-1) const;
   void decode(bufferlist::iterator &bl);
 
-  void dirty_all(Incremental& inc);
-
   void dump(Formatter *f) const; 
   void dump_pool_stats(const OSDMap &osd_map, stringstream *ss, Formatter *f,
       bool verbose) const;
index f2db6bbbf204bfcbe3956db86202f5f179b1d0d6..c764394d9d881c44cdca4785371e6970633f8bae 100644 (file)
@@ -216,17 +216,7 @@ void PGMonitor::on_upgrade()
 void PGMonitor::upgrade_format()
 {
   unsigned current = 1;
-  assert(format_version <= current);
-  if (format_version == current)
-    return;
-
-  dout(1) << __func__ << " to " << current << dendl;
-
-  // upgrade by dirtying it all
-  pg_map.dirty_all(pending_inc);
-
-  format_version = current;
-  propose_pending();
+  assert(format_version == current);
 }
 
 void PGMonitor::post_paxos_update()