From 3ca9bba4ef674c6b3c50ee4c55a7af970598cc19 Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Mon, 22 Apr 2019 19:26:54 +0800 Subject: [PATCH] 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 --- src/rbd_replay/ActionTypes.cc | 6 +++--- src/rbd_replay/ActionTypes.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) 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); -- 2.47.3