a25221e55172c326b48dea6f08c16d700921864e introduced a new, 64bit
pg state field, retaining encoding and decoding of least significant
32 bits for compatibility reasons.
This commit also adds encoding of entire 64bit state field, meaning
that the least significant bits are encoded and decoded twice.
Fix this by encoding each half of 64bit field separately.
Signed-off-by: Piotr Dałek <piotr.dalek@corp.ovh.com>
encode(last_became_peered, bl);
encode(pin_stats_invalid, bl);
encode(snaptrimq_len, bl);
- encode(state, bl);
+ __u32 top_state = (state >> 32);
+ encode(top_state, bl);
encode(purged_snaps, bl);
ENCODE_FINISH(bl);
}
if (struct_v >= 23) {
decode(snaptrimq_len, bl);
if (struct_v >= 24) {
- decode(state, bl);
+ __u32 top_state;
+ decode(top_state, bl);
+ state = (uint64_t)old_state | ((uint64_t)top_state << 32);
decode(purged_snaps, bl);
} else {
state = old_state;