void pg_history_t::encode(bufferlist &bl) const
{
- ENCODE_START(6, 4, bl);
+ ENCODE_START(7, 4, bl);
::encode(epoch_created, bl);
::encode(last_epoch_started, bl);
::encode(last_epoch_clean, bl);
::encode(last_deep_scrub, bl);
::encode(last_deep_scrub_stamp, bl);
::encode(last_clean_scrub_stamp, bl);
+ ::encode(last_epoch_marked_full, bl);
ENCODE_FINISH(bl);
}
void pg_history_t::decode(bufferlist::iterator &bl)
{
- DECODE_START_LEGACY_COMPAT_LEN(6, 4, 4, bl);
+ DECODE_START_LEGACY_COMPAT_LEN(7, 4, 4, bl);
::decode(epoch_created, bl);
::decode(last_epoch_started, bl);
if (struct_v >= 3)
if (struct_v >= 6) {
::decode(last_clean_scrub_stamp, bl);
}
+ if (struct_v >= 7) {
+ ::decode(last_epoch_marked_full, bl);
+ }
DECODE_FINISH(bl);
}
f->dump_int("last_epoch_started", last_epoch_started);
f->dump_int("last_epoch_clean", last_epoch_clean);
f->dump_int("last_epoch_split", last_epoch_split);
+ f->dump_int("last_epoch_marked_full", last_epoch_marked_full);
f->dump_int("same_up_since", same_up_since);
f->dump_int("same_interval_since", same_interval_since);
f->dump_int("same_primary_since", same_primary_since);
o.back()->last_deep_scrub = eversion_t(12, 13);
o.back()->last_deep_scrub_stamp = utime_t(14, 15);
o.back()->last_clean_scrub_stamp = utime_t(16, 17);
+ o.back()->last_epoch_marked_full = 18;
}
epoch_t last_epoch_started; // lower bound on last epoch started (anywhere, not necessarily locally)
epoch_t last_epoch_clean; // lower bound on last epoch the PG was completely clean.
epoch_t last_epoch_split; // as parent
+ epoch_t last_epoch_marked_full; // pool or cluster
/**
* In the event of a map discontinuity, same_*_since may reflect the first
pg_history_t()
: epoch_created(0),
last_epoch_started(0), last_epoch_clean(0), last_epoch_split(0),
+ last_epoch_marked_full(0),
same_up_since(0), same_interval_since(0), same_primary_since(0) {}
bool merge(const pg_history_t &other) {
last_epoch_split = other.last_epoch_split;
modified = true;
}
+ if (last_epoch_marked_full < other.last_epoch_marked_full) {
+ last_epoch_marked_full = other.last_epoch_marked_full;
+ modified = true;
+ }
if (other.last_scrub > last_scrub) {
last_scrub = other.last_scrub;
modified = true;
inline ostream& operator<<(ostream& out, const pg_history_t& h) {
return out << "ec=" << h.epoch_created
- << " les/c " << h.last_epoch_started << "/" << h.last_epoch_clean
+ << " les/c/f " << h.last_epoch_started << "/" << h.last_epoch_clean
+ << "/" << h.last_epoch_marked_full
<< " " << h.same_up_since << "/" << h.same_interval_since << "/" << h.same_primary_since;
}