From 10a2a5604cae545271d5362cd7e7a45312cd1834 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 25 May 2018 10:53:52 -0500 Subject: [PATCH] common/LogEntry: no need for LogEntryKey encode/decode Signed-off-by: Sage Weil --- src/common/LogEntry.cc | 17 ----------------- src/common/LogEntry.h | 3 --- src/test/encoding/types.h | 1 - 3 files changed, 21 deletions(-) diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc index f8659b7f1743a..7fbb5d33fe949 100644 --- a/src/common/LogEntry.cc +++ b/src/common/LogEntry.cc @@ -11,23 +11,6 @@ // ---- // LogEntryKey -void LogEntryKey::encode(bufferlist& bl, uint64_t features) const -{ - using ceph::encode; - encode(who, bl, features); - encode(stamp, bl); - encode(seq, bl); -} - -void LogEntryKey::decode(bufferlist::const_iterator& bl) -{ - using ceph::decode; - decode(who, bl); - decode(stamp, bl); - decode(seq, bl); - _calc_hash(); -} - void LogEntryKey::dump(Formatter *f) const { f->dump_stream("who") << who; diff --git a/src/common/LogEntry.h b/src/common/LogEntry.h index 9808b0b18673b..ead28cfd48c8d 100644 --- a/src/common/LogEntry.h +++ b/src/common/LogEntry.h @@ -77,8 +77,6 @@ public: return _hash; } - void encode(bufferlist& bl, uint64_t features) const; - void decode(bufferlist::const_iterator& bl); void dump(Formatter *f) const; static void generate_test_instances(list& o); @@ -86,7 +84,6 @@ public: return l.who == r.who && l.stamp == r.stamp && l.seq == r.seq; } }; -WRITE_CLASS_ENCODER_FEATURES(LogEntryKey) namespace std { template<> struct hash { diff --git a/src/test/encoding/types.h b/src/test/encoding/types.h index 5d989d02344a9..72b4820468ee2 100644 --- a/src/test/encoding/types.h +++ b/src/test/encoding/types.h @@ -30,7 +30,6 @@ TYPE(SnapRealmInfo) TYPE(DecayCounter) #include "common/LogEntry.h" -TYPE_FEATUREFUL(LogEntryKey) TYPE_FEATUREFUL(LogEntry) TYPE_FEATUREFUL(LogSummary) -- 2.39.5