Skip to content

Commit

Permalink
osd: Decode use_gmt_hitset with a unique version
Browse files Browse the repository at this point in the history
Signed-off-by: David Zafman <dzafman@redhat.com>
  • Loading branch information
dzafman committed Aug 27, 2015
1 parent f1e1ada commit 2bc5a48
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/osd/osd_types.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit 2bc5a48

Please # to comment.