From: Sage Weil Date: Fri, 16 Sep 2016 21:03:41 +0000 (-0400) Subject: declare encode/decode for various types that are missing it X-Git-Tag: v11.1.0~617^2~30 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=c974e8d51017b907c6a6dffddc241113ca167a66;p=ceph-ci.git declare encode/decode for various types that are missing it Signed-off-by: Sage Weil --- diff --git a/src/cls/lock/cls_lock_types.h b/src/cls/lock/cls_lock_types.h index c2c137d0b9d..03e6e11f69c 100644 --- a/src/cls/lock/cls_lock_types.h +++ b/src/cls/lock/cls_lock_types.h @@ -100,5 +100,6 @@ namespace rados { } } WRITE_CLASS_ENCODER_FEATURES(rados::cls::lock::locker_info_t) +WRITE_CLASS_ENCODER(rados::cls::lock::locker_id_t) #endif diff --git a/src/common/DecayCounter.h b/src/common/DecayCounter.h index 5abbeb394b3..918e338aa6c 100644 --- a/src/common/DecayCounter.h +++ b/src/common/DecayCounter.h @@ -130,6 +130,11 @@ inline void encode(const DecayCounter &c, bufferlist &bl) { c.encode(bl); } inline void decode(DecayCounter &c, const utime_t &t, bufferlist::iterator &p) { c.decode(t, p); } +// for dencoder +inline void decode(DecayCounter &c, bufferlist::iterator &p) { + utime_t t; + c.decode(t, p); +} #endif diff --git a/src/include/util.h b/src/include/util.h index fa8dd244f06..30c2e30895d 100644 --- a/src/include/util.h +++ b/src/include/util.h @@ -69,6 +69,7 @@ struct ceph_data_stats } }; typedef struct ceph_data_stats ceph_data_stats_t; +WRITE_CLASS_ENCODER(ceph_data_stats) int get_fs_stats(ceph_data_stats_t &stats, const char *path); diff --git a/src/mds/InoTable.h b/src/mds/InoTable.h index ebb24121463..a787d348a32 100644 --- a/src/mds/InoTable.h +++ b/src/mds/InoTable.h @@ -107,5 +107,6 @@ class InoTable : public MDSTable { } } }; +WRITE_CLASS_ENCODER(InoTable) #endif diff --git a/src/mds/JournalPointer.h b/src/mds/JournalPointer.h index 559543b44a1..62bcba298dc 100644 --- a/src/mds/JournalPointer.h +++ b/src/mds/JournalPointer.h @@ -82,5 +82,6 @@ class JournalPointer { ls.back()->back = 0xfeedbead; } }; +WRITE_CLASS_ENCODER(JournalPointer) #endif // JOURNAL_POINTER_H diff --git a/src/mds/SnapServer.h b/src/mds/SnapServer.h index 9dc3d84f489..52598f9ab96 100644 --- a/src/mds/SnapServer.h +++ b/src/mds/SnapServer.h @@ -89,5 +89,6 @@ public: void check_osd_map(bool force); }; +WRITE_CLASS_ENCODER(SnapServer) #endif diff --git a/src/mds/events/ESlaveUpdate.h b/src/mds/events/ESlaveUpdate.h index 7b22935f824..8147455fc62 100644 --- a/src/mds/events/ESlaveUpdate.h +++ b/src/mds/events/ESlaveUpdate.h @@ -89,6 +89,7 @@ struct rename_rollback { void dump(Formatter *f) const; static void generate_test_instances(list& ls); }; +WRITE_CLASS_ENCODER(rename_rollback::drec) WRITE_CLASS_ENCODER(rename_rollback) diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index b50dc2d4677..1e5f5934e95 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -1067,6 +1067,11 @@ inline void encode(const inode_load_vec_t &c, bufferlist &bl) { c.encode(bl); } inline void decode(inode_load_vec_t & c, const utime_t &t, bufferlist::iterator &p) { c.decode(t, p); } +// for dencoder +inline void decode(inode_load_vec_t & c, bufferlist::iterator &p) { + utime_t sample; + c.decode(sample, p); +} class dirfrag_load_vec_t { public: @@ -1146,6 +1151,11 @@ inline void encode(const dirfrag_load_vec_t &c, bufferlist &bl) { c.encode(bl); inline void decode(dirfrag_load_vec_t& c, const utime_t &t, bufferlist::iterator &p) { c.decode(t, p); } +// this for dencoder +inline void decode(dirfrag_load_vec_t& c, bufferlist::iterator &p) { + utime_t sample; + c.decode(sample, p); +} inline std::ostream& operator<<(std::ostream& out, dirfrag_load_vec_t& dl) { @@ -1198,6 +1208,11 @@ inline void encode(const mds_load_t &c, bufferlist &bl) { c.encode(bl); } inline void decode(mds_load_t &c, const utime_t &t, bufferlist::iterator &p) { c.decode(t, p); } +// this one is for dencoder +inline void decode(mds_load_t &c, bufferlist::iterator &p) { + utime_t sample; + c.decode(sample, p); +} inline std::ostream& operator<<( std::ostream& out, mds_load_t& load ) { diff --git a/src/test/encoding/test_ceph_time.h b/src/test/encoding/test_ceph_time.h index 7adcb8f22ba..722d29bf1ea 100644 --- a/src/test/encoding/test_ceph_time.h +++ b/src/test/encoding/test_ceph_time.h @@ -26,5 +26,6 @@ class real_time_wrapper { ls.push_back(new real_time_wrapper(ceph::real_clock::from_time_t(t))); } }; +WRITE_CLASS_ENCODER(real_time_wrapper) #endif