]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: decode pg_t in old PG::Info
authorSage Weil <sage.weil@dreamhost.com>
Sun, 28 Aug 2011 03:45:15 +0000 (20:45 -0700)
committerSage Weil <sage.weil@dreamhost.com>
Sun, 28 Aug 2011 03:45:15 +0000 (20:45 -0700)
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
src/osd/PG.h

index 1460f5d60f430cf0b6d6c253ed4493661cdca536..6d75bd966dd5c6399f87a8a867252fc1c03e788c 100644 (file)
@@ -252,7 +252,7 @@ public:
     bool dne() const { return history.epoch_created == 0; }
 
     void encode(bufferlist &bl) const {
-      __u8 v = 22;
+      __u8 v = 23;
       ::encode(v, bl);
 
       ::encode(pgid, bl);
@@ -268,7 +268,13 @@ public:
       __u8 v;
       ::decode(v, bl);
 
-      ::decode(pgid, bl);
+      if (v < 23) {
+       old_pg_t opgid;
+       ::decode(opgid, bl);
+       pgid = opgid;
+      } else {
+       ::decode(pgid, bl);
+      }
       ::decode(last_update, bl);
       ::decode(last_complete, bl);
       ::decode(log_tail, bl);