]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
msg/msg_types: entity_addr_t/entity_inst_t with features 9184/head
authorSage Weil <sage@redhat.com>
Tue, 31 May 2016 19:36:58 +0000 (15:36 -0400)
committerSage Weil <sage@redhat.com>
Tue, 31 May 2016 19:36:58 +0000 (15:36 -0400)
Since all the call sites need features to encode entity_addr_t,
now it's time to commit this require-features-patch.

Signed-off-by: Zhao Junwang <zhjwpku@gmail.com>
src/msg/msg_types.h
src/test/librados_test_stub/LibradosTestStub.cc

index 757c5d4a8635e895583b5cc793e900c91fcb4326..3493cb77a9ef122bf956cf0981c4ccb29fe056dc 100644 (file)
@@ -365,7 +365,7 @@ struct entity_addr_t {
   // broader study
 
 
-  void encode(bufferlist& bl, uint64_t features = 0) const {
+  void encode(bufferlist& bl, uint64_t features) const {
     ::encode(type, bl);
     ::encode(nonce, bl);
     sockaddr_storage ss = get_sockaddr_storage();
@@ -400,7 +400,7 @@ struct entity_addr_t {
 
   static void generate_test_instances(list<entity_addr_t*>& o);
 };
-WRITE_CLASS_ENCODER_OPTIONAL_FEATURES(entity_addr_t)
+WRITE_CLASS_ENCODER_FEATURES(entity_addr_t)
 
 inline ostream& operator<<(ostream& out, const entity_addr_t &addr)
 {
@@ -442,7 +442,7 @@ struct entity_inst_t {
     return i;
   }
 
-  void encode(bufferlist& bl, uint64_t features = 0) const {
+  void encode(bufferlist& bl, uint64_t features) const {
     ::encode(name, bl);
     ::encode(addr, bl, features);
   }
@@ -454,7 +454,7 @@ struct entity_inst_t {
   void dump(Formatter *f) const;
   static void generate_test_instances(list<entity_inst_t*>& o);
 };
-WRITE_CLASS_ENCODER_OPTIONAL_FEATURES(entity_inst_t)
+WRITE_CLASS_ENCODER_FEATURES(entity_inst_t)
 
 
 inline bool operator==(const entity_inst_t& a, const entity_inst_t& b) { 
index 64088805fbbd6fcd3cc96123df6baea5a92b38ca..d56001e2cebcda56ab02d5db6b7ca9124100fb4b 100644 (file)
@@ -1184,7 +1184,7 @@ int cls_cxx_list_watchers(cls_method_context_t hctx,
 }
 
 uint64_t cls_get_features(cls_method_context_t hctx) {
-  return CEPH_FEATURES_DEFAULT_SUPPORTED;
+  return CEPH_FEATURES_SUPPORTED_DEFAULT;
 }
 
 int cls_log(int level, const char *format, ...) {