]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: EUpdate event now uses modern encoding
authorGreg Farnum <greg@inktank.com>
Fri, 18 Jan 2013 21:08:03 +0000 (13:08 -0800)
committerGreg Farnum <greg@inktank.com>
Fri, 8 Feb 2013 21:17:54 +0000 (13:17 -0800)
Signed-off-by: Greg Farnum <greg@inktank.com>
src/mds/events/EUpdate.h

index a302a5a2b6f74810cb422934f52e2a6ba5fcb1d3..9a1aceb3857897a1699fb2da53092faf19f02552 100644 (file)
@@ -39,8 +39,7 @@ public:
   }
 
   void encode(bufferlist &bl) const {
-    __u8 struct_v = 3;
-    ::encode(struct_v, bl);
+    ENCODE_START(4, 4, bl);
     ::encode(stamp, bl);
     ::encode(type, bl);
     ::encode(metablob, bl);
@@ -48,10 +47,10 @@ public:
     ::encode(cmapv, bl);
     ::encode(reqid, bl);
     ::encode(had_slaves, bl);
+    ENCODE_FINISH(bl);
   } 
   void decode(bufferlist::iterator &bl) {
-    __u8 struct_v;
-    ::decode(struct_v, bl);
+    DECODE_START_LEGACY_COMPAT_LEN(4, 4, 4, bl);
     if (struct_v >= 2)
       ::decode(stamp, bl);
     ::decode(type, bl);
@@ -61,6 +60,7 @@ public:
       ::decode(cmapv, bl);
     ::decode(reqid, bl);
     ::decode(had_slaves, bl);
+    DECODE_FINISH(bl);
   }
 
   void update_segment();