From: Sage Weil Date: Sun, 28 Aug 2011 03:45:15 +0000 (-0700) Subject: osd: decode pg_t in old PG::Info X-Git-Tag: v0.35~191^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6c27367d66e271e99c97b7b7a52bdf5cda986512;p=ceph.git osd: decode pg_t in old PG::Info Signed-off-by: Sage Weil --- diff --git a/src/osd/PG.h b/src/osd/PG.h index 1460f5d60f43..6d75bd966dd5 100644 --- a/src/osd/PG.h +++ b/src/osd/PG.h @@ -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);