::decode(end, p);
// handle hobject_t format upgrade
- if (begin.pool == -1)
+ if (!begin.is_max() && begin.pool == -1)
begin.pool = pgid.pool();
- if (end.pool == -1)
+ if (!end.is_max() && end.pool == -1)
end.pool = pgid.pool();
}
if (header.version < 7) {
// Handle hobject_t format change
- if (poid.pool == -1)
+ if (!poid.is_max() && poid.pool == -1)
poid.pool = pgid.pool();
hobject_incorrect_pool = true;
}
::decode(peer_stat, p);
::decode(attrset, p);
- if (poid.pool == -1)
+ if (!poid.is_max() && poid.pool == -1)
poid.pool = pgid.pool();
}
virtual void encode_payload(uint64_t features) {
} else {
::decode(oid, p);
if (use_pool_override && pool_override != -1 &&
- oid.hobj.pool == -1) {
+ !oid.hobj.is_max() && oid.hobj.pool == -1) {
oid.hobj.pool = pool_override;
}
}
for (; a != end; ++a) {
int peer = *a;
map<int,pg_info_t>::const_iterator pi = peer_info.find(peer);
- if (pi->second.last_backfill != hobject_t::get_max()) {
+ if (!pi->second.last_backfill.is_max()) {
dout(10) << __func__ << " osd." << peer << " has last_backfill " << pi->second.last_backfill << dendl;
ret = true;
}
/// true if interval extends to the end of the range
bool extends_to_end() {
- return end == hobject_t::get_max();
+ return end.is_max();
}
/// removes items <= soid and adjusts begin to the first object
i != tmp.end();
++i) {
hobject_t first(i->first);
- if (first.pool == -1)
+ if (!first.is_max() && first.pool == -1)
first.pool = info.pgid.pool();
bi.objects[first] = i->second;
}
for (vector<pg_log_entry_t>::iterator i = log.begin();
i != log.end();
++i) {
- if (i->soid.pool == -1)
+ if (!i->soid.is_max() && i->soid.pool == -1)
i->soid.pool = info.pgid.pool();
}
rm->opt.set_pool_override(info.pgid.pool());
int backfill_target = get_backfill_target();
if (backfill_target != -1) {
last_backfill_started = peer_info[backfill_target].last_backfill;
- assert(last_backfill_started != hobject_t::get_max());
+ assert(!last_backfill_started.is_max());
dout(10) << " chose backfill target osd." << backfill_target
<< " from " << last_backfill_started << dendl;
}
for (list<pg_log_entry_t>::iterator i = log.begin();
i != log.end();
++i) {
- if (i->soid.pool == -1)
+ if (!i->soid.is_max() && i->soid.pool == -1)
i->soid.pool = pool;
}
}
for (map<hobject_t, item>::iterator i = missing.begin();
i != missing.end();
) {
- if (i->first.pool == -1) {
+ if (!i->first.is_max() && i->first.pool == -1) {
hobject_t to_insert(i->first);
to_insert.pool = pool;
tmp[to_insert] = i->second;
DECODE_FINISH(bl);
if (struct_v < 2) {
- if (soid.pool == -1)
+ if (!soid.is_max() && soid.pool == -1)
soid.pool = pool;
map<hobject_t, interval_set<uint64_t> > tmp;
tmp.swap(clone_subset);
i != tmp.end();
++i) {
hobject_t first(i->first);
- if (first.pool == -1)
+ if (!first.is_max() && first.pool == -1)
first.pool = pool;
clone_subset[first].swap(i->second);
}
i != tmp.end();
++i) {
hobject_t first(i->first);
- if (first.pool == -1)
+ if (!first.is_max() && first.pool == -1)
first.pool = pool;
objects[first] = i->second;
}
bool is_empty() const { return last_update.version == 0; }
bool dne() const { return history.epoch_created == 0; }
- bool is_incomplete() const { return last_backfill != hobject_t::get_max(); }
+ bool is_incomplete() const { return !last_backfill.is_max(); }
void encode(bufferlist& bl) const;
void decode(bufferlist::iterator& p);