]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osd: fix initialization for C_SetDedupChunks
authormyoungwon oh <ohmyoungwon@gmail.com>
Fri, 6 Nov 2020 00:28:12 +0000 (09:28 +0900)
committermyoungwon oh <ohmyoungwon@gmail.com>
Fri, 6 Nov 2020 00:28:12 +0000 (09:28 +0900)
Signed-off-by: Myoungwon Oh <myoungwon.oh@samsumg.com>
src/osd/PrimaryLogPG.cc

index a93274b1cfd80b5cdea282f5805c470ec20a2ab2..62dabed95438c88e0f6f3c39f115fad5bb4ca03a 100644 (file)
@@ -9989,9 +9989,9 @@ struct C_SetDedupChunks : public Context {
   ceph_tid_t tid;
   uint64_t offset;
   
-  C_SetDedupChunks(PrimaryLogPG *p, hobject_t o, epoch_t lpr)
+  C_SetDedupChunks(PrimaryLogPG *p, hobject_t o, epoch_t lpr, uint64_t offset)
     : pg(p), oid(o), last_peering_reset(lpr),
-      tid(0), offset(0)
+      tid(0), offset(offset)
   {}
   void finish(int r) override {
     if (r == -ECANCELED)
@@ -10071,8 +10071,7 @@ int PrimaryLogPG::start_dedup(OpRequestRef op, ObjectContextRef obc)
       obj_op.call("cas", "chunk_create_or_get_ref", t);
 
       // issue create_or_get_ref_op
-      C_SetDedupChunks *fin = new C_SetDedupChunks(this, soid, get_last_peering_reset());
-      fin->offset = p.first;
+      C_SetDedupChunks *fin = new C_SetDedupChunks(this, soid, get_last_peering_reset(), p.first);
       object_locator_t oloc(target);
       unsigned flags = CEPH_OSD_FLAG_IGNORE_CACHE | CEPH_OSD_FLAG_IGNORE_OVERLAY |
                        CEPH_OSD_FLAG_RWORDERED;