uint64_t offset;
uint32_t length;
uint64_t tgt_offset;
- bool enable_with_reference;
SetChunkOp(int n,
RadosTestContext *context,
const string &oid,
const string &oid_tgt,
const string &tgt_pool_name,
uint64_t tgt_offset,
- TestOpStat *stat = 0,
- bool enable_with_reference = false)
+ TestOpStat *stat = 0)
: TestOp(n, context, stat),
oid(oid), oid_tgt(oid_tgt), tgt_pool_name(tgt_pool_name),
comp(NULL), done(0),
r(0), offset(offset), length(length),
- tgt_offset(tgt_offset), enable_with_reference(enable_with_reference)
+ tgt_offset(tgt_offset)
{}
void _begin() override
if (src_value.version != 0 && !src_value.deleted())
op.assert_version(src_value.version);
- if (enable_with_reference) {
- op.set_chunk(offset, length, context->low_tier_io_ctx,
- context->prefix+oid_tgt, tgt_offset, CEPH_OSD_OP_FLAG_WITH_REFERENCE);
- } else {
- op.set_chunk(offset, length, context->low_tier_io_ctx,
- context->prefix+oid_tgt, tgt_offset);
- }
+ op.set_chunk(offset, length, context->low_tier_io_ctx,
+ context->prefix+oid_tgt, tgt_offset, CEPH_OSD_OP_FLAG_WITH_REFERENCE);
pair<TestOp*, TestOp::CallbackInfo*> *cb_arg =
new pair<TestOp*, TestOp::CallbackInfo*>(this,
<< " length: " << rand_length << " target oid " << oid2.str()
<< " tgt_offset: " << rand_tgt_offset << std::endl;
op = new SetChunkOp(m_op, &context, oid.str(), rand_offset, rand_length, oid2.str(),
- context.low_tier_pool_name, rand_tgt_offset, m_stats, m_enable_dedup);
+ context.low_tier_pool_name, rand_tgt_offset, m_stats);
return true;
}
} else if (m_op == make_manifest_end + 1) {
IoCtx target_ctx;
ret = rados.ioctx_create(target, target_ctx);
ObjectReadOperation op;
- if (with_reference) {
- op.set_chunk(offset, length, target_ctx, tgt_oid, tgt_offset, CEPH_OSD_OP_FLAG_WITH_REFERENCE);
- } else {
- op.set_chunk(offset, length, target_ctx, tgt_oid, tgt_offset);
- }
+ op.set_chunk(offset, length, target_ctx, tgt_oid, tgt_offset, CEPH_OSD_OP_FLAG_WITH_REFERENCE);
ret = io_ctx.operate(nargs[1], &op, NULL);
if (ret < 0) {
cerr << "error set-chunk " << pool_name << "/" << nargs[1] << " " << " offset " << offset