From 2bc5a48f4c5d3667213be3a7b5a0e0f5ef9daf4f Mon Sep 17 00:00:00 2001 From: David Zafman Date: Thu, 27 Aug 2015 11:24:25 -0700 Subject: [PATCH] osd: Decode use_gmt_hitset with a unique version Signed-off-by: David Zafman --- src/osd/osd_types.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/osd/osd_types.cc b/src/osd/osd_types.cc index 975d51391cd8..50a80b06cb1f 100644 --- a/src/osd/osd_types.cc +++ b/src/osd/osd_types.cc @@ -1256,7 +1256,7 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const return; } - ENCODE_START(20, 5, bl); + ENCODE_START(21, 5, bl); ::encode(type, bl); ::encode(size, bl); ::encode(crush_ruleset, bl); @@ -1306,7 +1306,7 @@ void pg_pool_t::encode(bufferlist& bl, uint64_t features) const void pg_pool_t::decode(bufferlist::iterator& bl) { - DECODE_START_LEGACY_COMPAT_LEN(20, 5, 5, bl); + DECODE_START_LEGACY_COMPAT_LEN(21, 5, 5, bl); ::decode(type, bl); ::decode(size, bl); ::decode(crush_ruleset, bl); @@ -1425,9 +1425,12 @@ void pg_pool_t::decode(bufferlist::iterator& bl) } if (struct_v >= 20) { ::decode(min_write_recency_for_promote, bl); - ::decode(use_gmt_hitset, bl); } else { min_write_recency_for_promote = 1; + } + if (struct_v >= 21) { + ::decode(use_gmt_hitset, bl); + } else { use_gmt_hitset = false; } DECODE_FINISH(bl); -- 2.47.3