]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/.../ops_executer: no reason to return cloning_ctx
authorSamuel Just <sjust@redhat.com>
Fri, 8 Nov 2024 00:25:47 +0000 (00:25 +0000)
committerSamuel Just <sjust@redhat.com>
Tue, 10 Dec 2024 15:32:43 +0000 (15:32 +0000)
Signed-off-by: Samuel Just <sjust@redhat.com>
src/crimson/osd/ops_executer.cc
src/crimson/osd/ops_executer.h

index 97b241fdce40bb6c0df02aaa24e695834d90fa93..4ecb68ccc26da67602ceac69dd62a584e01008d1 100644 (file)
@@ -871,7 +871,7 @@ version_t OpsExecuter::get_last_user_version() const
   return pg->get_last_user_version();
 }
 
-std::unique_ptr<OpsExecuter::CloningContext> OpsExecuter::execute_clone(
+void OpsExecuter::execute_clone(
   const SnapContext& snapc,
   const ObjectState& initial_obs,
   const SnapSet& initial_snapset,
@@ -883,7 +883,7 @@ std::unique_ptr<OpsExecuter::CloningContext> OpsExecuter::execute_clone(
                  __func__, soid,
                  initial_snapset, snapc);
 
-  auto cloning_ctx = std::make_unique<CloningContext>();
+  cloning_ctx = std::make_unique<CloningContext>();
   cloning_ctx->new_snapset = initial_snapset;
 
   // clone object, the snap field is set to the seq of the SnapContext
@@ -941,8 +941,6 @@ std::unique_ptr<OpsExecuter::CloningContext> OpsExecuter::execute_clone(
   encode(cloned_snaps, cloning_ctx->log_entry.snaps);
   cloning_ctx->log_entry.clean_regions.mark_data_region_dirty(0, initial_obs.oi.size);
   cloning_ctx->clone_obc = clone_obc;
-
-  return cloning_ctx;
 }
 
 void OpsExecuter::update_clone_overlap() {
@@ -1036,11 +1034,11 @@ OpsExecuter::OpsExecuter(Ref<PG> pg,
 {
   if (op_info.may_write() && should_clone(*obc, snapc)) {
     do_write_op([this](auto& backend, auto& os, auto& txn) {
-      cloning_ctx = execute_clone(std::as_const(snapc),
-                                  std::as_const(obc->obs),
-                                  std::as_const(obc->ssc->snapset),
-                                  backend,
-                                  txn);
+      execute_clone(std::as_const(snapc),
+                   std::as_const(obc->obs),
+                   std::as_const(obc->ssc->snapset),
+                   backend,
+                   txn);
     });
   }
 }
index 51436f19da7e98acb08aa5d67065b4b9e2406529..a198ee483b4e6bd5370adb4bdb3679a8cda72738 100644 (file)
@@ -205,7 +205,6 @@ private:
   };
   std::unique_ptr<CloningContext> cloning_ctx;
 
-
   /**
    * execute_clone
    *
@@ -227,7 +226,7 @@ private:
    * @param backend [in,out] interface for generating mutations
    * @param txn [out] transaction for the operation
    */
-  std::unique_ptr<CloningContext> execute_clone(
+  void execute_clone(
     const SnapContext& snapc,
     const ObjectState& initial_obs,
     const SnapSet& initial_snapset,