From: Sage Weil Date: Wed, 23 Nov 2016 18:51:59 +0000 (-0500) Subject: osd/osd_types: encode pg_pool_t like hammer if features indicate hammer X-Git-Tag: v11.1.0~119^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2f8cfb632823ba4e63eaff394392d6af7979d7c8;p=ceph.git osd/osd_types: encode pg_pool_t like hammer if features indicate hammer If the target features are missing the new OSDOp encoding, the first feature we added post-hammer, encode like hammer. Signed-off-by: Sage Weil --- diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 6e7e5a3d30ab..7c87ee1cbd72 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1489,6 +1489,12 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const } uint8_t v = 24; + if (!(features & CEPH_FEATURE_NEW_OSDOP_ENCODING)) { + // this was the first post-hammer thing we added; if it's missing, encode + // like hammer. + v = 21; + } + ENCODE_START(v, 5, bl); ::encode(type, bl); ::encode(size, bl);