From: Samuel Just Date: Fri, 8 Nov 2024 00:25:47 +0000 (+0000) Subject: crimson/.../ops_executer: no reason to return cloning_ctx X-Git-Tag: v20.0.0~524^2~24 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bb2c45f8696b9c2857e347de3f1b72fabae7a1df;p=ceph.git crimson/.../ops_executer: no reason to return cloning_ctx Signed-off-by: Samuel Just --- diff --git a/src/crimson/osd/ops_executer.cc b/src/crimson/osd/ops_executer.cc index 97b241fdce40..4ecb68ccc26d 100644 --- a/src/crimson/osd/ops_executer.cc +++ b/src/crimson/osd/ops_executer.cc @@ -871,7 +871,7 @@ version_t OpsExecuter::get_last_user_version() const return pg->get_last_user_version(); } -std::unique_ptr 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::execute_clone( __func__, soid, initial_snapset, snapc); - auto cloning_ctx = std::make_unique(); + cloning_ctx = std::make_unique(); 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::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, { 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); }); } } diff --git a/src/crimson/osd/ops_executer.h b/src/crimson/osd/ops_executer.h index 51436f19da7e..a198ee483b4e 100644 --- a/src/crimson/osd/ops_executer.h +++ b/src/crimson/osd/ops_executer.h @@ -205,7 +205,6 @@ private: }; std::unique_ptr 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 execute_clone( + void execute_clone( const SnapContext& snapc, const ObjectState& initial_obs, const SnapSet& initial_snapset,