object_locator_t oloc;
oloc.clear();
oloc.pool = info.pgid.pool();
- object_info_t oi(lost_soid, oloc, true);
+ object_info_t oi(lost_soid, oloc);
if (r >= 0) {
// Some version of this lost object exists in our filestore.
snaps[i] = snapc.snaps[i];
// prepare clone
- object_info_t static_snap_oi(coid, oi.oloc, oi.lost);
+ object_info_t static_snap_oi(oi);
object_info_t *snap_oi;
if (is_primary()) {
ctx->clone_obc = new ObjectContext(static_snap_oi, true, NULL);
if (r < 0) {
if (!can_create)
return NULL; // -ENOENT!
- object_info_t oi(soid, oloc, false);
+ object_info_t oi(soid, oloc);
obc = new ObjectContext(oi, false, NULL);
}
else {
// TODO: this is severely broken because we don't know whether this object is really lost or
// not. We just always assume that it's not right now.
// Also, we're taking the address of a variable on the stack.
- object_info_t oi(soid, op->oloc, false);
+ object_info_t oi(soid, op->oloc);
+ oi.lost = false; // I guess?
oi.version = op->old_version;
oi.size = op->old_size;
ObjectState obs(oi, op->old_exists, NULL);
ObjectContext *headobc = get_object_context(head, OLOC_BLANK, false);
- object_info_t oi(soid, headobc->obs.oi.oloc, headobc->obs.oi.lost);
+ object_info_t oi(headobc->obs.oi);
oi.version = latest->version;
oi.prior_version = latest->prior_version;
::decode(oi.snaps, latest->snaps);
decode(p);
}
- object_info_t(const sobject_t& s, const object_locator_t& o, bool lost_) :
- soid(s), size(0),
- lost(lost_), truncate_seq(0), truncate_size(0) {}
+ object_info_t(const object_info_t &rhs)
+ : soid(rhs.soid), size(rhs.size),
+ lost(rhs.lost), truncate_seq(rhs.truncate_seq),
+ truncate_size(rhs.truncate_size) {}
+
+ object_info_t(const sobject_t& s, const object_locator_t& o)
+ : soid(s), size(0),
+ lost(false), truncate_seq(0), truncate_size(0) {}
+
object_info_t(bufferlist& bl) {
decode(bl);
}