]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/PGMap: remove Incremental encode/decode
authorSage Weil <sage@redhat.com>
Mon, 28 Aug 2017 21:07:09 +0000 (17:07 -0400)
committerSage Weil <sage@redhat.com>
Wed, 6 Sep 2017 14:18:04 +0000 (10:18 -0400)
Unused!

Signed-off-by: Sage Weil <sage@redhat.com>
src/mon/PGMap.cc
src/mon/PGMap.h
src/test/encoding/types.h

index 03434abd213cda65aebd5bfb640fea499b1456c0..7e42a124db64ce700bb90ef786a855f01faaa7a4 100644 (file)
@@ -936,86 +936,6 @@ void PGMap::get_rules_avail(const OSDMap& osdmap,
 // ---------------------
 // PGMap
 
-void PGMap::Incremental::encode(bufferlist &bl, uint64_t features) const
-{
-  if ((features & CEPH_FEATURE_MONENC) == 0) {
-    __u8 v = 4;
-    ::encode(v, bl);
-    ::encode(version, bl);
-    ::encode(pg_stat_updates, bl);
-    ::encode(osd_stat_updates, bl);
-    ::encode(osd_stat_rm, bl);
-    ::encode(osdmap_epoch, bl);
-    ::encode(pg_scan, bl);
-    ::encode((float).95, bl);
-    ::encode((float).85, bl);
-    ::encode(pg_remove, bl);
-    return;
-  }
-
-  ENCODE_START(7, 5, bl);
-  ::encode(version, bl);
-  ::encode(pg_stat_updates, bl);
-  ::encode(osd_stat_updates, bl);
-  ::encode(osd_stat_rm, bl);
-  ::encode(osdmap_epoch, bl);
-  ::encode(pg_scan, bl);
-  ::encode((float).95, bl); // full_ratio
-  ::encode((float).85, bl); // nearfull_ratio
-  ::encode(pg_remove, bl);
-  ::encode(stamp, bl);
-  {
-    map<int32_t,epoch_t> osd_epochs;
-    ::encode(osd_epochs, bl);
-  }
-  ENCODE_FINISH(bl);
-}
-
-void PGMap::Incremental::decode(bufferlist::iterator &bl)
-{
-  DECODE_START_LEGACY_COMPAT_LEN(7, 5, 5, bl);
-  ::decode(version, bl);
-  if (struct_v < 3) {
-    pg_stat_updates.clear();
-    __u32 n;
-    ::decode(n, bl);
-    while (n--) {
-      old_pg_t opgid;
-      ::decode(opgid, bl);
-      pg_t pgid = opgid;
-      ::decode(pg_stat_updates[pgid], bl);
-    }
-  } else {
-    ::decode(pg_stat_updates, bl);
-  }
-  ::decode(osd_stat_updates, bl);
-  ::decode(osd_stat_rm, bl);
-  ::decode(osdmap_epoch, bl);
-  ::decode(pg_scan, bl);
-  float full_ratio;
-  ::decode(full_ratio, bl);
-  ::decode(full_ratio, bl);  // nearfull
-  if (struct_v < 3) {
-    pg_remove.clear();
-    __u32 n;
-    ::decode(n, bl);
-    while (n--) {
-      old_pg_t opgid;
-      ::decode(opgid, bl);
-      pg_remove.insert(pg_t(opgid));
-    }
-  } else {
-    ::decode(pg_remove, bl);
-  }
-  if (struct_v >= 6)
-    ::decode(stamp, bl);
-  if (struct_v >= 7) {
-    map<int32_t,epoch_t> osd_epochs;
-    ::decode(osd_epochs, bl);
-  }
-  DECODE_FINISH(bl);
-}
-
 void PGMap::Incremental::dump(Formatter *f) const
 {
   f->dump_unsigned("version", version);
index c40735a364c1ab367fb05d5f3ca75e6b6b8d274c..0258fadd2222a16ddad58872d664874b5735451c 100644 (file)
@@ -266,8 +266,6 @@ public:
       osd_stat_rm.insert(osd);
       osd_stat_updates.erase(osd);
     }
-    void encode(bufferlist &bl, uint64_t features=-1) const;
-    void decode(bufferlist::iterator &bl);
     void dump(Formatter *f) const;
     static void generate_test_instances(list<Incremental*>& o);
 
@@ -454,7 +452,6 @@ public:
 
   static void generate_test_instances(list<PGMap*>& o);
 };
-WRITE_CLASS_ENCODER_FEATURES(PGMap::Incremental)
 WRITE_CLASS_ENCODER_FEATURES(PGMap)
 
 inline ostream& operator<<(ostream& out, const PGMapDigest& m) {
index e4b36c05d91fea64f18ee3fc641c1f51edeb7ebf..a0105eec7311966415d816c0d899359602866005 100644 (file)
@@ -143,7 +143,6 @@ TYPE(ghobject_t)
 TYPE_FEATUREFUL(AuthMonitor::Incremental)
 
 #include "mon/PGMap.h"
-TYPE_FEATUREFUL(PGMap::Incremental)
 TYPE_FEATUREFUL_NONDETERMINISTIC(PGMap)
 TYPE_FEATUREFUL_NONDETERMINISTIC(PGMapDigest)