summaryrefslogtreecommitdiffstats
path: root/src/common/LogEntry.cc
diff options
context:
space:
mode:
authorSage Weil <sage.weil@dreamhost.com>2012-02-10 07:01:27 +0100
committerSage Weil <sage.weil@dreamhost.com>2012-02-10 07:06:38 +0100
commit5b8d0c734c4403db62dc387486452ee489aacd33 (patch)
tree65ed74079cfc5ecc03599c18e5fae8f810e74c5d /src/common/LogEntry.cc
parentos: new encoding for hobject_t (diff)
downloadceph-5b8d0c734c4403db62dc387486452ee489aacd33.tar.xz
ceph-5b8d0c734c4403db62dc387486452ee489aacd33.zip
new encoding for Log{Entry,Summary}
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
Diffstat (limited to 'src/common/LogEntry.cc')
-rw-r--r--src/common/LogEntry.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/LogEntry.cc b/src/common/LogEntry.cc
index f495102e597..3e7a01e5bca 100644
--- a/src/common/LogEntry.cc
+++ b/src/common/LogEntry.cc
@@ -33,20 +33,19 @@ void LogEntryKey::generate_test_instances(list<LogEntryKey*>& o)
void LogEntry::encode(bufferlist& bl) const
{
- __u8 v = 1;
- ::encode(v, bl);
+ ENCODE_START(2, 2, bl);
__u16 t = type;
::encode(who, bl);
::encode(stamp, bl);
::encode(seq, bl);
::encode(t, bl);
::encode(msg, bl);
+ ENCODE_FINISH(bl);
}
void LogEntry::decode(bufferlist::iterator& bl)
{
- __u8 v;
- ::decode(v, bl);
+ DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
__u16 t;
::decode(who, bl);
::decode(stamp, bl);
@@ -54,6 +53,7 @@ void LogEntry::decode(bufferlist::iterator& bl)
::decode(t, bl);
type = (clog_type)t;
::decode(msg, bl);
+ DECODE_FINISH(bl);
}
void LogEntry::dump(Formatter *f) const
@@ -75,18 +75,18 @@ void LogEntry::generate_test_instances(list<LogEntry*>& o)
void LogSummary::encode(bufferlist& bl) const
{
- __u8 v = 1;
- ::encode(v, bl);
+ ENCODE_START(2, 2, bl);
::encode(version, bl);
::encode(tail, bl);
+ ENCODE_FINISH(bl);
}
void LogSummary::decode(bufferlist::iterator& bl)
{
- __u8 v;
- ::decode(v, bl);
+ DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
::decode(version, bl);
::decode(tail, bl);
+ DECODE_FINISH(bl);
}
void LogSummary::dump(Formatter *f) const