]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tool, test: make with-reference default when called set-chunk
authormyoungwon oh <ohmyoungwon@gmail.com>
Thu, 27 Aug 2020 13:50:12 +0000 (22:50 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Thu, 27 Aug 2020 13:50:12 +0000 (22:50 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/test/osd/RadosModel.h
src/test/osd/TestRados.cc
src/tools/rados/rados.cc

index f71abc552a522bb60c04a9d0fee6e79053ef0d06..3b9977acb22c4048d8794b248f25889dd26f3ba6 100644 (file)
@@ -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<TestOp*, TestOp::CallbackInfo*> *cb_arg =
       new pair<TestOp*, TestOp::CallbackInfo*>(this,
index e966a79a4002b7fecad193679691e00d3abcdd65..3be5699cac3755d9c1d4a6ade087292466473809 100644 (file)
@@ -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) {
index b21f264167dc88c42788a55760ea25b0047611ea..1be08f8be0325ac26c7922e36232869f22baca7d 100644 (file)
@@ -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