From 8723ecfb3ca5f04d6e6ce92bda097fa2a77cb7aa Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 28 Aug 2017 17:07:09 -0400 Subject: [PATCH] mon/PGMap: remove Incremental encode/decode Unused! Signed-off-by: Sage Weil --- src/mon/PGMap.cc | 80 --------------------------------------- src/mon/PGMap.h | 3 -- src/test/encoding/types.h | 1 - 3 files changed, 84 deletions(-) diff --git a/src/mon/PGMap.cc b/src/mon/PGMap.cc index 03434abd213cd..7e42a124db64c 100644 --- a/src/mon/PGMap.cc +++ b/src/mon/PGMap.cc @@ -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 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 osd_epochs; - ::decode(osd_epochs, bl); - } - DECODE_FINISH(bl); -} - void PGMap::Incremental::dump(Formatter *f) const { f->dump_unsigned("version", version); diff --git a/src/mon/PGMap.h b/src/mon/PGMap.h index c40735a364c1a..0258fadd2222a 100644 --- a/src/mon/PGMap.h +++ b/src/mon/PGMap.h @@ -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& o); @@ -454,7 +452,6 @@ public: static void generate_test_instances(list& o); }; -WRITE_CLASS_ENCODER_FEATURES(PGMap::Incremental) WRITE_CLASS_ENCODER_FEATURES(PGMap) inline ostream& operator<<(ostream& out, const PGMapDigest& m) { diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h index e4b36c05d91fe..a0105eec73119 100644 --- a/src/test/encoding/types.h +++ b/src/test/encoding/types.h @@ -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) -- 2.39.5