bufferlist bl;
::encode(recovery_info.oi, bl,
get_osdmap()->get_features(CEPH_ENTITY_TYPE_OSD, nullptr));
- assert(!pool.info.require_rollback());
+ assert(!pool.info.is_erasure());
t->setattr(coll, ghobject_t(recovery_info.soid), OI_ATTR, bl);
if (obc)
obc->attr_cache[OI_ATTR] = bl;
csum_init_value_size);
bl_it->advance(csum_init_value_size);
- if (pool.info.require_rollback() && op.checksum.length > 0) {
+ if (pool.info.is_erasure() && op.checksum.length > 0) {
// If there is a data digest and it is possible we are reading
// entire object, pass the digest.
boost::optional<uint32_t> maybe_crc;
} else if (!ctx->obs->exists || ctx->obs->oi.is_whiteout()) {
dout(20) << __func__ << " object DNE" << dendl;
return finish_extent_cmp(osd_op, {});
- } else if (pool.info.require_rollback()) {
+ } else if (pool.info.is_erasure()) {
// If there is a data digest and it is possible we are reading
// entire object, pass the digest.
boost::optional<uint32_t> maybe_crc;
// read size was trimmed to zero and it is expected to do nothing
// a read operation of 0 bytes does *not* do nothing, this is why
// the trimmed_read boolean is needed
- } else if (pool.info.require_rollback()) {
+ } else if (pool.info.is_erasure()) {
boost::optional<uint32_t> maybe_crc;
// If there is a data digest and it is possible we are reading
// entire object, pass the digest. FillInVerifyExtent will
break;
case CEPH_OSD_OP_SYNC_READ:
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
result = -EOPNOTSUPP;
break;
}
/* map extents */
case CEPH_OSD_OP_MAPEXT:
tracepoint(osd, do_osd_op_pre_mapext, soid.oid.name.c_str(), soid.snap.val, op.extent.offset, op.extent.length);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
result = -EOPNOTSUPP;
break;
}
op.flags = op.flags | CEPH_OSD_OP_FLAG_FADVISE_DONTNEED;
maybe_create_new_object(ctx);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
t->truncate(soid, 0);
} else if (obs.exists && op.extent.length < oi.size) {
t->truncate(soid, op.extent.length);
// -- trivial map --
case CEPH_OSD_OP_TMAPGET:
tracepoint(osd, do_osd_op_pre_tmapget, soid.oid.name.c_str(), soid.snap.val);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
result = -EOPNOTSUPP;
break;
}
case CEPH_OSD_OP_TMAPPUT:
tracepoint(osd, do_osd_op_pre_tmapput, soid.oid.name.c_str(), soid.snap.val);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
result = -EOPNOTSUPP;
break;
}
case CEPH_OSD_OP_TMAPUP:
tracepoint(osd, do_osd_op_pre_tmapup, soid.oid.name.c_str(), soid.snap.val);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
result = -EOPNOTSUPP;
break;
}
ctx->clone_obc->obs.exists = true;
ctx->clone_obc->ssc = ctx->obc->ssc;
ctx->clone_obc->ssc->ref++;
- if (pool.info.require_rollback())
+ if (pool.info.is_erasure())
ctx->clone_obc->attr_cache = ctx->obc->attr_cache;
snap_oi = &ctx->clone_obc->obs.oi;
bool got = ctx->lock_manager.get_write_greedy(
bool async_read_started = false;
object_copy_data_t _reply_obj;
C_CopyFrom_AsyncReadCb *cb = nullptr;
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
cb = new C_CopyFrom_AsyncReadCb(&osd_op, features);
}
object_copy_data_t &reply_obj = cb ? cb->reply_obj : _reply_obj;
if (is_active())
populate_obc_watchers(obc);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
if (attrs) {
obc->attr_cache = *attrs;
} else {
int PrimaryLogPG::rep_repair_primary_object(const hobject_t& soid, OpRequestRef op)
{
// Only supports replicated pools
- assert(!pool.info.require_rollback());
+ assert(!pool.info.is_erasure());
assert(is_primary());
dout(10) << __func__ << " " << soid
const string &key,
bufferlist *val)
{
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
map<string, bufferlist>::iterator i = obc->attr_cache.find(key);
if (i != obc->attr_cache.end()) {
if (val)
{
int r = 0;
assert(out);
- if (pool.info.require_rollback()) {
+ if (pool.info.is_erasure()) {
*out = obc->attr_cache;
} else {
r = pgbackend->objects_get_attrs(obc->obs.oi.soid, out);