]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
src/test: fix wrong link between manifest and chunk object
authormyoungwon oh <ohmyoungwon@gmail.com>
Tue, 9 Feb 2021 06:42:12 +0000 (15:42 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Mon, 29 Mar 2021 08:11:48 +0000 (17:11 +0900)
manifest object will generate fingerprint oid, otherwise
ceph_test_rados will use prefix+oid

Signed-off-by: Myoungwon Oh <myoungwon.oh@samsung.com>
src/test/osd/RadosModel.h

index 22c6501121d9fc2e52aff29d8750362182b975e1..7bf598d1d842faa66408895f66902f031e88cce3 100644 (file)
@@ -2386,10 +2386,10 @@ public:
 
     string target_oid;
     if (!oid_tgt.empty()) {
-      target_oid = oid_tgt;
+      target_oid = context->prefix+oid_tgt;
     } else {
       bufferlist bl;
-      int r = context->io_ctx.read(context->prefix+oid, bl, offset, length);
+      int r = context->io_ctx.read(context->prefix+oid, bl, length, offset);
       ceph_assert(r > 0);
       string fp_oid = ceph::crypto::digest<ceph::crypto::SHA256>(bl).to_str();
       r = context->low_tier_io_ctx.write(fp_oid, bl, bl.length(), 0);
@@ -2403,7 +2403,7 @@ public:
          << " offset: " << tgt_offset << std::endl;
 
     op.set_chunk(offset, length, context->low_tier_io_ctx, 
-                context->prefix+target_oid, tgt_offset, CEPH_OSD_OP_FLAG_WITH_REFERENCE);
+                target_oid, tgt_offset, CEPH_OSD_OP_FLAG_WITH_REFERENCE);
 
     pair<TestOp*, TestOp::CallbackInfo*> *cb_arg =
       new pair<TestOp*, TestOp::CallbackInfo*>(this,