From: Kefu Chai Date: Mon, 22 Apr 2019 11:26:54 +0000 (+0800) Subject: rbd_replay: call the member decode() explicitly X-Git-Tag: v15.1.0~2869^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ca9bba4ef674c6b3c50ee4c55a7af970598cc19;p=ceph.git rbd_replay: call the member decode() explicitly 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 --- diff --git a/src/rbd_replay/ActionTypes.cc b/src/rbd_replay/ActionTypes.cc index 61cd7579f655..e86aa6479c2d 100644 --- a/src/rbd_replay/ActionTypes.cc +++ b/src/rbd_replay/ActionTypes.cc @@ -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); diff --git a/src/rbd_replay/ActionTypes.h b/src/rbd_replay/ActionTypes.h index 880b2040201c..19e1bb8fabfe 100644 --- a/src/rbd_replay/ActionTypes.h +++ b/src/rbd_replay/ActionTypes.h @@ -325,7 +325,7 @@ public: static void generate_test_instances(std::list &o); private: - void decode(__u8 version, bufferlist::const_iterator &it); + void decode_versioned(__u8 version, bufferlist::const_iterator &it); }; WRITE_CLASS_ENCODER(ActionEntry);