diff options
author | Xuehan Xu <xuxuehan@qianxin.com> | 2024-08-26 11:42:04 +0200 |
---|---|---|
committer | Xuehan Xu <xuxuehan@qianxin.com> | 2024-08-26 11:42:04 +0200 |
commit | e397216e0cd49161e56cf61ab6e850aa6948b1ee (patch) | |
tree | 081e2a977e683f175e628e37d8494e20b4753c20 /src/crimson | |
parent | crimson/osd/pg: Seperate mutate_object from submit_transaction (diff) | |
download | ceph-e397216e0cd49161e56cf61ab6e850aa6948b1ee.tar.xz ceph-e397216e0cd49161e56cf61ab6e850aa6948b1ee.zip |
crimson/osd: drop PGBackend::mutate_object()
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
Diffstat (limited to 'src/crimson')
-rw-r--r-- | src/crimson/osd/ec_backend.cc | 12 | ||||
-rw-r--r-- | src/crimson/osd/ec_backend.h | 12 | ||||
-rw-r--r-- | src/crimson/osd/pg.cc | 4 | ||||
-rw-r--r-- | src/crimson/osd/pg_backend.cc | 16 | ||||
-rw-r--r-- | src/crimson/osd/pg_backend.h | 22 | ||||
-rw-r--r-- | src/crimson/osd/replicated_backend.cc | 14 | ||||
-rw-r--r-- | src/crimson/osd/replicated_backend.h | 3 |
7 files changed, 30 insertions, 53 deletions
diff --git a/src/crimson/osd/ec_backend.cc b/src/crimson/osd/ec_backend.cc index d555d6cdc16..26f7e5dedde 100644 --- a/src/crimson/osd/ec_backend.cc +++ b/src/crimson/osd/ec_backend.cc @@ -24,12 +24,12 @@ ECBackend::_read(const hobject_t& hoid, } ECBackend::rep_op_fut_t -ECBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards, - const hobject_t& hoid, - ceph::os::Transaction&& txn, - osd_op_params_t&& osd_op_p, - epoch_t min_epoch, epoch_t max_epoch, - std::vector<pg_log_entry_t>&& log_entries) +ECBackend::submit_transaction(const std::set<pg_shard_t> &pg_shards, + const hobject_t& hoid, + ceph::os::Transaction&& txn, + osd_op_params_t&& osd_op_p, + epoch_t min_epoch, epoch_t max_epoch, + std::vector<pg_log_entry_t>&& log_entries) { // todo return {seastar::now(), diff --git a/src/crimson/osd/ec_backend.h b/src/crimson/osd/ec_backend.h index 56fbb445423..90a7e2b1f4d 100644 --- a/src/crimson/osd/ec_backend.h +++ b/src/crimson/osd/ec_backend.h @@ -26,12 +26,12 @@ private: ll_read_ierrorator::future<ceph::bufferlist> _read(const hobject_t& hoid, uint64_t off, uint64_t len, uint32_t flags) override; rep_op_fut_t - _submit_transaction(std::set<pg_shard_t>&& pg_shards, - const hobject_t& hoid, - ceph::os::Transaction&& txn, - osd_op_params_t&& req, - epoch_t min_epoch, epoch_t max_epoch, - std::vector<pg_log_entry_t>&& log_entries) final; + submit_transaction(const std::set<pg_shard_t> &pg_shards, + const hobject_t& hoid, + ceph::os::Transaction&& txn, + osd_op_params_t&& req, + epoch_t min_epoch, epoch_t max_epoch, + std::vector<pg_log_entry_t>&& log_entries) final; CollectionRef coll; seastar::future<> request_committed(const osd_reqid_t& reqid, const eversion_t& version) final { diff --git a/src/crimson/osd/pg.cc b/src/crimson/osd/pg.cc index 9104dc5e0ec..f4536a7ecac 100644 --- a/src/crimson/osd/pg.cc +++ b/src/crimson/osd/pg.cc @@ -911,9 +911,9 @@ PG::submit_transaction( ceph_assert(log_entries.rbegin()->version >= projected_last_update); projected_last_update = log_entries.rbegin()->version; - auto [submitted, all_completed] = backend->mutate_object( + auto [submitted, all_completed] = backend->submit_transaction( peering_state.get_acting_recovery_backfill(), - std::move(obc), + obc->obs.oi.soid, std::move(txn), std::move(osd_op_p), peering_state.get_last_peering_reset(), diff --git a/src/crimson/osd/pg_backend.cc b/src/crimson/osd/pg_backend.cc index 935de309479..00427e7192f 100644 --- a/src/crimson/osd/pg_backend.cc +++ b/src/crimson/osd/pg_backend.cc @@ -151,22 +151,6 @@ PGBackend::load_metadata(const hobject_t& oid) })); } -PGBackend::rep_op_fut_t -PGBackend::mutate_object( - std::set<pg_shard_t> pg_shards, - crimson::osd::ObjectContextRef &&obc, - ceph::os::Transaction&& txn, - osd_op_params_t&& osd_op_p, - epoch_t min_epoch, - epoch_t map_epoch, - std::vector<pg_log_entry_t>&& log_entries) -{ - logger().trace("mutate_object: num_ops={}", txn.get_num_ops()); - return _submit_transaction( - std::move(pg_shards), obc->obs.oi.soid, std::move(txn), - std::move(osd_op_p), min_epoch, map_epoch, std::move(log_entries)); -} - static inline bool _read_verify_data( const object_info_t& oi, const ceph::bufferlist& data) diff --git a/src/crimson/osd/pg_backend.h b/src/crimson/osd/pg_backend.h index 579e2bdee79..21dce24b899 100644 --- a/src/crimson/osd/pg_backend.h +++ b/src/crimson/osd/pg_backend.h @@ -220,14 +220,6 @@ public: ceph::os::Transaction& trans, osd_op_params_t& osd_op_params, object_stat_sum_t& delta_stats); - rep_op_fut_t mutate_object( - std::set<pg_shard_t> pg_shards, - crimson::osd::ObjectContextRef &&obc, - ceph::os::Transaction&& txn, - osd_op_params_t&& osd_op_p, - epoch_t min_epoch, - epoch_t map_epoch, - std::vector<pg_log_entry_t>&& log_entries); /** * list_objects @@ -418,6 +410,13 @@ public: ceph::os::Transaction& trans, osd_op_params_t& osd_op_params, object_stat_sum_t& delta_stats); + virtual rep_op_fut_t + submit_transaction(const std::set<pg_shard_t> &pg_shards, + const hobject_t& hoid, + ceph::os::Transaction&& txn, + osd_op_params_t&& osd_op_p, + epoch_t min_epoch, epoch_t max_epoch, + std::vector<pg_log_entry_t>&& log_entries) = 0; virtual void got_rep_op_reply(const MOSDRepOpReply&) {} virtual seastar::future<> stop() = 0; @@ -475,13 +474,6 @@ private: object_stat_sum_t& delta_stats, object_info_t& oi, uint64_t truncate_size); - virtual rep_op_fut_t - _submit_transaction(std::set<pg_shard_t>&& pg_shards, - const hobject_t& hoid, - ceph::os::Transaction&& txn, - osd_op_params_t&& osd_op_p, - epoch_t min_epoch, epoch_t max_epoch, - std::vector<pg_log_entry_t>&& log_entries) = 0; friend class ReplicatedRecoveryBackend; friend class ::crimson::osd::PG; diff --git a/src/crimson/osd/replicated_backend.cc b/src/crimson/osd/replicated_backend.cc index d227b9c89e9..b3244845ccc 100644 --- a/src/crimson/osd/replicated_backend.cc +++ b/src/crimson/osd/replicated_backend.cc @@ -36,14 +36,14 @@ ReplicatedBackend::_read(const hobject_t& hoid, } ReplicatedBackend::rep_op_fut_t -ReplicatedBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards, - const hobject_t& hoid, - ceph::os::Transaction&& txn, - osd_op_params_t&& osd_op_p, - epoch_t min_epoch, epoch_t map_epoch, - std::vector<pg_log_entry_t>&& log_entries) +ReplicatedBackend::submit_transaction(const std::set<pg_shard_t>& pg_shards, + const hobject_t& hoid, + ceph::os::Transaction&& txn, + osd_op_params_t&& osd_op_p, + epoch_t min_epoch, epoch_t map_epoch, + std::vector<pg_log_entry_t>&& log_entries) { - LOG_PREFIX(ReplicatedBackend::_submit_transaction); + LOG_PREFIX(ReplicatedBackend::submit_transaction); DEBUGDPP("object {}", dpp, hoid); const ceph_tid_t tid = shard_services.get_tid(); diff --git a/src/crimson/osd/replicated_backend.h b/src/crimson/osd/replicated_backend.h index 78366060d89..fb8704d8742 100644 --- a/src/crimson/osd/replicated_backend.h +++ b/src/crimson/osd/replicated_backend.h @@ -32,7 +32,8 @@ private: ll_read_ierrorator::future<ceph::bufferlist> _read(const hobject_t& hoid, uint64_t off, uint64_t len, uint32_t flags) override; - rep_op_fut_t _submit_transaction(std::set<pg_shard_t>&& pg_shards, + rep_op_fut_t submit_transaction( + const std::set<pg_shard_t> &pg_shards, const hobject_t& hoid, ceph::os::Transaction&& txn, osd_op_params_t&& osd_op_p, |