]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/osd/OSDMap.h
update sources to 12.2.7
[ceph.git] / ceph / src / osd / OSDMap.h
index 847c7ecb39fa16b72c73aa01f4f4c8bc1d47e6bf..5d59754cef911a2186de7284d75aa9952af9d8a8 100644 (file)
@@ -507,6 +507,20 @@ private:
   int32_t max_osd;
   vector<uint32_t> osd_state;
 
+  // These features affect OSDMap[::Incremental] encoding, or the
+  // encoding of some type embedded therein (CrushWrapper, something
+  // from osd_types, etc.).
+  static constexpr uint64_t SIGNIFICANT_FEATURES =
+    CEPH_FEATUREMASK_PGID64 |
+    CEPH_FEATUREMASK_PGPOOL3 |
+    CEPH_FEATUREMASK_OSDENC |
+    CEPH_FEATUREMASK_OSDMAP_ENC |
+    CEPH_FEATUREMASK_OSD_POOLRESEND |
+    CEPH_FEATUREMASK_NEW_OSDOP_ENCODING |
+    CEPH_FEATUREMASK_MSG_ADDR2 |
+    CEPH_FEATUREMASK_CRUSH_TUNABLES5 |
+    CEPH_FEATUREMASK_CRUSH_CHOOSE_ARGS |
+    CEPH_FEATUREMASK_SERVER_LUMINOUS ;
   struct addrs_s {
     mempool::osdmap::vector<ceph::shared_ptr<entity_addr_t> > client_addr;
     mempool::osdmap::vector<ceph::shared_ptr<entity_addr_t> > cluster_addr;
@@ -591,6 +605,13 @@ private:
   OSDMap& operator=(const OSDMap& other) = default;
 public:
 
+  /// return feature mask subset that is relevant to OSDMap encoding
+  static uint64_t get_significant_features(uint64_t features) {
+    return SIGNIFICANT_FEATURES & features;
+  }
+
+  uint64_t get_encoding_features() const;
+
   void deepish_copy_from(const OSDMap& o) {
     *this = o;
     primary_temp.reset(new mempool::osdmap::map<pg_t,int32_t>(*o.primary_temp));