From: myoungwon oh Date: Thu, 27 Aug 2020 13:50:12 +0000 (+0900) Subject: tool, test: make with-reference default when called set-chunk X-Git-Tag: v16.1.0~1248^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=446c46b4e6e47e835392ccb5b7c31fb6e948efbb;p=ceph.git tool, test: make with-reference default when called set-chunk Signed-off-by: Myoungwon Oh --- diff --git a/src/test/osd/RadosModel.h b/src/test/osd/RadosModel.h index f71abc552a52..3b9977acb22c 100644 --- a/src/test/osd/RadosModel.h +++ b/src/test/osd/RadosModel.h @@ -2305,7 +2305,6 @@ public: uint64_t offset; uint32_t length; uint64_t tgt_offset; - bool enable_with_reference; SetChunkOp(int n, RadosTestContext *context, const string &oid, @@ -2314,13 +2313,12 @@ public: 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 @@ -2336,13 +2334,8 @@ public: 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 *cb_arg = new pair(this, diff --git a/src/test/osd/TestRados.cc b/src/test/osd/TestRados.cc index e966a79a4002..3be5699cac37 100644 --- a/src/test/osd/TestRados.cc +++ b/src/test/osd/TestRados.cc @@ -246,7 +246,7 @@ public: << " 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) { diff --git a/src/tools/rados/rados.cc b/src/tools/rados/rados.cc index b21f264167dc..1be08f8be032 100644 --- a/src/tools/rados/rados.cc +++ b/src/tools/rados/rados.cc @@ -3740,11 +3740,7 @@ static int rados_tool_common(const std::map < std::string, std::string > &opts, 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