Always will in last_backfill and last_backfill_bitwise together.
Signed-off-by: Sage Weil <sage@redhat.com>
* before the pg is recreated, we'll just start it off backfilling
* instead of just empty */
if (service.deleting_pgs.lookup(pgid))
- empty.last_backfill = hobject_t();
+ empty.set_last_backfill(hobject_t(), true);
if (it->second.type == pg_query_t::LOG ||
it->second.type == pg_query_t::FULLLOG) {
ConnectionRef con = service.get_con_osd_cluster(from, osdmap->get_epoch());
pi.last_update = info.last_update;
pi.last_complete = info.last_update;
- pi.last_backfill = hobject_t();
+ pi.set_last_backfill(hobject_t(), get_sort_bitwise());
pi.last_epoch_started = info.last_epoch_started;
pi.history = info.history;
pi.hit_set = info.hit_set;
// Info
child->info.history = info.history;
child->info.purged_snaps = info.purged_snaps;
- child->info.last_backfill = info.last_backfill;
+ child->info.set_last_backfill(info.last_backfill, info.last_backfill_bitwise);
child->info.stats = info.stats;
info.stats.stats_invalid = true;
if (backfill) {
dout(10) << __func__ << ": Setting backfill" << dendl;
- info.last_backfill = hobject_t();
+ info.set_last_backfill(hobject_t(), get_sort_bitwise());
info.last_complete = info.last_update;
pg_log.mark_log_for_rewrite();
}
{
assert(cct->_conf->osd_kill_backfill_at != 2);
- info.last_backfill = m->last_backfill;
+ info.set_last_backfill(m->last_backfill, get_sort_bitwise());
if (m->compat_stat_sum) {
info.stats.stats = m->stats.stats; // Previously, we only sent sum
} else {
dout(10) << "on_removal" << dendl;
// adjust info to backfill
- info.last_backfill = hobject_t();
+ info.set_last_backfill(hobject_t(), true);
dirty_info = true;
pg_info_t& pinfo = peer_info[bt];
if (new_last_backfill > pinfo.last_backfill) {
- pinfo.last_backfill = new_last_backfill;
+ pinfo.set_last_backfill(new_last_backfill, get_sort_bitwise());
epoch_t e = get_osdmap()->get_epoch();
MOSDPGBackfill *m = NULL;
if (pinfo.last_backfill.is_max()) {
last_backfill_bitwise(false)
{ }
+ void set_last_backfill(hobject_t pos, bool sort) {
+ last_backfill = pos;
+ last_backfill_bitwise = sort;
+ }
+
bool is_empty() const { return last_update.version == 0; }
bool dne() const { return history.epoch_created == 0; }