]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: new encoding for PG::Interval
authorSage Weil <sage.weil@dreamhost.com>
Thu, 2 Feb 2012 21:15:55 +0000 (13:15 -0800)
committerSage Weil <sage.weil@dreamhost.com>
Fri, 10 Feb 2012 05:58:08 +0000 (21:58 -0800)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.h

index 823e125521a4659073b4b98fed0bd8d32cb29857..b0658960d280bdd3a0f000fc86d2d8b74762d38b 100644 (file)
@@ -398,22 +398,22 @@ public:
     Interval() : first(0), last(0), maybe_went_rw(false) {}
 
     void encode(bufferlist& bl) const {
-      __u8 struct_v = 1;
-      ::encode(struct_v, bl);
+      ENCODE_START(2, 2, bl);
       ::encode(first, bl);
       ::encode(last, bl);
       ::encode(up, bl);
       ::encode(acting, bl);
       ::encode(maybe_went_rw, bl);
+      ENCODE_FINISH(bl);
     }
     void decode(bufferlist::iterator& bl) {
-      __u8 struct_v;
-      ::decode(struct_v, bl);
+      DECODE_START_LEGACY_COMPAT_LEN(2, 2, 2, bl);
       ::decode(first, bl);
       ::decode(last, bl);
       ::decode(up, bl);
       ::decode(acting, bl);
       ::decode(maybe_went_rw, bl);
+      DECODE_FINISH(bl);
     }
     void dump(Formatter *f) const {
       f->dump_unsigned("first", first);