]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rbd_replay: call the member decode() explicitly
authorKefu Chai <kchai@redhat.com>
Mon, 22 Apr 2019 11:26:54 +0000 (19:26 +0800)
committerKefu Chai <kchai@redhat.com>
Tue, 23 Apr 2019 12:33:13 +0000 (20:33 +0800)
otherwise, the one defined using WRITE_RAW_ENCODER is called instead.
so in this change, rename the the member function which happens to have
the same signature with

decode(type &v, ::ceph::bufferlist::const_iterator& p)

where `type` is `__u8`.

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/rbd_replay/ActionTypes.cc
src/rbd_replay/ActionTypes.h

index 61cd7579f655f3007730be74e037df074de1403b..e86aa6479c2d42beaea6bddd5736ef692e36e829 100644 (file)
@@ -276,15 +276,15 @@ void ActionEntry::encode(bufferlist &bl) const {
 
 void ActionEntry::decode(bufferlist::const_iterator &it) {
   DECODE_START(1, it);
-  decode(struct_v, it);
+  decode_versioned(struct_v, it);
   DECODE_FINISH(it);
 }
 
 void ActionEntry::decode_unversioned(bufferlist::const_iterator &it) {
-  decode(0, it);
+  decode_versioned(0, it);
 }
 
-void ActionEntry::decode(__u8 version, bufferlist::const_iterator &it) {
+void ActionEntry::decode_versioned(__u8 version, bufferlist::const_iterator &it) {
   using ceph::decode;
   uint8_t action_type;
   decode(action_type, it);
index 880b2040201c4b8bc0b3b88a73cf294d4bc2e9a9..19e1bb8fabfef3131b377b2c71dfcf9d08ec8634 100644 (file)
@@ -325,7 +325,7 @@ public:
   static void generate_test_instances(std::list<ActionEntry *> &o);
 
 private:
-  void decode(__u8 version, bufferlist::const_iterator &it);
+  void decode_versioned(__u8 version, bufferlist::const_iterator &it);
 };
 
 WRITE_CLASS_ENCODER(ActionEntry);