void PG::upgrade(ObjectStore *store)
{
- assert(info_struct_v <= 9);
+ assert(info_struct_v <= 10);
ObjectStore::Transaction t;
assert(info_struct_v >= 7);
+ // no special action needed for 9->10, just write out the biginfo
+
// 8 -> 9
if (info_struct_v <= 8) {
// no special action needed.
::decode(info, p);
p = values[biginfo_key].begin();
- ::decode(past_intervals, p);
+ if (struct_v >= 10) {
+ ::decode(past_intervals, p);
+ } else {
+ past_intervals.decode_classic(p);
+ }
::decode(info.purged_snaps, p);
p = values[fastinfo_key].begin();
pg_info_t info; ///< current pg info
pg_info_t last_written_info; ///< last written info
__u8 info_struct_v;
- static const __u8 cur_struct_v = 9;
+ static const __u8 cur_struct_v = 10;
+ // v10 is the new past_intervals encoding
// v9 was fastinfo_key addition
// v8 was the move to a per-pg pgmeta object
// v7 was SnapMapper addition in 86658392516d5175b2756659ef7ffaaf95b0f8ad