Skip to content

Commit

Permalink
crimson/osd: do not pass oop as a const ref
Browse files Browse the repository at this point in the history
before this change, std::move(oop) will create a copy of oop.
after this change, std::move(oop) actually moves oop.

Signed-off-by: Kefu Chai <[email protected]>
  • Loading branch information
tchaikov committed Feb 9, 2021
1 parent 3c17ea9 commit 68af4a9
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/crimson/osd/ec_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ seastar::future<crimson::osd::acked_peers_t>
ECBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards,
const hobject_t& hoid,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p,
osd_op_params_t&& osd_op_p,
epoch_t min_epoch, epoch_t max_epoch,
std::vector<pg_log_entry_t>&& log_entries)
{
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/osd/ec_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class ECBackend : public PGBackend
_submit_transaction(std::set<pg_shard_t>&& pg_shards,
const hobject_t& hoid,
ceph::os::Transaction&& txn,
const osd_op_params_t& req,
osd_op_params_t&& req,
epoch_t min_epoch, epoch_t max_epoch,
std::vector<pg_log_entry_t>&& log_entries) final;
CollectionRef coll;
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/osd/pg.cc
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ seastar::future<> PG::WaitForActiveBlocker::stop()
seastar::future<> PG::submit_transaction(const OpInfo& op_info,
ObjectContextRef&& obc,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p)
osd_op_params_t&& osd_op_p)
{
if (__builtin_expect(stopping, false)) {
return seastar::make_exception_future<>(
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/osd/pg.h
Original file line number Diff line number Diff line change
Expand Up @@ -537,7 +537,7 @@ class PG : public boost::intrusive_ref_counter<
seastar::future<> submit_transaction(const OpInfo& op_info,
ObjectContextRef&& obc,
ceph::os::Transaction&& txn,
const osd_op_params_t& oop);
osd_op_params_t&& oop);
seastar::future<> repair_object(Ref<MOSDOp> m,
const hobject_t& oid,
eversion_t& v);
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/osd/pg_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ PGBackend::mutate_object(
std::set<pg_shard_t> pg_shards,
crimson::osd::ObjectContextRef &&obc,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p,
osd_op_params_t&& osd_op_p,
epoch_t min_epoch,
epoch_t map_epoch,
std::vector<pg_log_entry_t>&& log_entries)
Expand Down
4 changes: 2 additions & 2 deletions src/crimson/osd/pg_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ class PGBackend
std::set<pg_shard_t> pg_shards,
crimson::osd::ObjectContextRef &&obc,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p,
osd_op_params_t&& osd_op_p,
epoch_t min_epoch,
epoch_t map_epoch,
std::vector<pg_log_entry_t>&& log_entries);
Expand Down Expand Up @@ -228,7 +228,7 @@ class PGBackend
_submit_transaction(std::set<pg_shard_t>&& pg_shards,
const hobject_t& hoid,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p,
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;
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/osd/replicated_backend.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ seastar::future<crimson::osd::acked_peers_t>
ReplicatedBackend::_submit_transaction(std::set<pg_shard_t>&& pg_shards,
const hobject_t& hoid,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p,
osd_op_params_t&& osd_op_p,
epoch_t min_epoch, epoch_t map_epoch,
std::vector<pg_log_entry_t>&& log_entries)
{
Expand Down
2 changes: 1 addition & 1 deletion src/crimson/osd/replicated_backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ReplicatedBackend : public PGBackend
_submit_transaction(std::set<pg_shard_t>&& pg_shards,
const hobject_t& hoid,
ceph::os::Transaction&& txn,
const osd_op_params_t& osd_op_p,
osd_op_params_t&& osd_op_p,
epoch_t min_epoch, epoch_t max_epoch,
std::vector<pg_log_entry_t>&& log_entries) final;
const pg_t pgid;
Expand Down

0 comments on commit 68af4a9

Please sign in to comment.