From c8cf0aeaebaa5b09026f6d8ba5a443a6fc959034 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Thu, 2 Feb 2012 12:43:38 -0800 Subject: [PATCH] osd: new encoding for watch_info_t Signed-off-by: Sage Weil --- src/osd/osd_types.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 8f56750251c60..3f84348c0e6c1 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1756,22 +1756,22 @@ ostream& operator<<(ostream& out, const SnapSet& cs) void watch_info_t::encode(bufferlist& bl) const { - const __u8 v = 2; - ::encode(v, bl); + ENCODE_START(3, 3, bl); ::encode(cookie, bl); ::encode(timeout_seconds, bl); + ENCODE_FINISH(bl); } void watch_info_t::decode(bufferlist::iterator& bl) { - __u8 v; - ::decode(v, bl); + DECODE_START_LEGACY_COMPAT_LEN(3, 3, 3, bl); ::decode(cookie, bl); - if (v < 2) { + if (struct_v < 2) { uint64_t ver; ::decode(ver, bl); } ::decode(timeout_seconds, bl); + DECODE_FINISH(bl); } void watch_info_t::dump(Formatter *f) const -- 2.39.5