mirror of
https://github.com/ceph/ceph
synced 2025-01-20 18:21:57 +00:00
Merge pull request #11266 from stiopaa1/osd_passSharedPtrByConstRef
osd: pass shared_ptr by const reference Reviewed-by: Sage Weil <sage@redhat.com>
This commit is contained in:
commit
b020ea78da
@ -1171,7 +1171,7 @@ struct FinishReadOp : public GenContext<ThreadPool::TPHandle&> {
|
||||
};
|
||||
|
||||
void ECBackend::filter_read_op(
|
||||
const OSDMapRef osdmap,
|
||||
const OSDMapRef& osdmap,
|
||||
ReadOp &op)
|
||||
{
|
||||
set<hobject_t, hobject_t::BitwiseComparator> to_cancel;
|
||||
@ -1232,7 +1232,7 @@ void ECBackend::filter_read_op(
|
||||
}
|
||||
}
|
||||
|
||||
void ECBackend::check_recovery_sources(const OSDMapRef osdmap)
|
||||
void ECBackend::check_recovery_sources(const OSDMapRef& osdmap)
|
||||
{
|
||||
set<ceph_tid_t> tids_to_filter;
|
||||
for (map<pg_shard_t, set<ceph_tid_t> >::iterator
|
||||
|
@ -80,7 +80,7 @@ public:
|
||||
);
|
||||
|
||||
/// @see ReadOp below
|
||||
void check_recovery_sources(const OSDMapRef osdmap);
|
||||
void check_recovery_sources(const OSDMapRef& osdmap);
|
||||
|
||||
void on_change();
|
||||
void clear_recovery_state();
|
||||
@ -313,7 +313,7 @@ public:
|
||||
};
|
||||
friend struct FinishReadOp;
|
||||
void filter_read_op(
|
||||
const OSDMapRef osdmap,
|
||||
const OSDMapRef& osdmap,
|
||||
ReadOp &op);
|
||||
void complete_read_op(ReadOp &rop, RecoveryMessages *m);
|
||||
friend ostream &operator<<(ostream &lhs, const ReadOp &rhs);
|
||||
|
@ -420,7 +420,7 @@ public:
|
||||
);
|
||||
|
||||
/// Uses osdmap to update structures for now down sources
|
||||
void check_recovery_sources(const OSDMapRef osdmap);
|
||||
void check_recovery_sources(const OSDMapRef& osdmap);
|
||||
|
||||
/// Call when hoid is no longer missing in acting set
|
||||
void recovered(const hobject_t &hoid) {
|
||||
@ -1120,7 +1120,7 @@ public:
|
||||
void cancel_recovery();
|
||||
void clear_recovery_state();
|
||||
virtual void _clear_recovery_state() = 0;
|
||||
virtual void check_recovery_sources(const OSDMapRef newmap) = 0;
|
||||
virtual void check_recovery_sources(const OSDMapRef& newmap) = 0;
|
||||
void start_recovery_op(const hobject_t& soid);
|
||||
void finish_recovery_op(const hobject_t& soid, bool dequeue=false);
|
||||
|
||||
|
@ -319,7 +319,7 @@ typedef ceph::shared_ptr<const OSDMap> OSDMapRef;
|
||||
OpRequestRef op ///< [in] message received
|
||||
) = 0; ///< @return true if the message was handled
|
||||
|
||||
virtual void check_recovery_sources(const OSDMapRef osdmap) = 0;
|
||||
virtual void check_recovery_sources(const OSDMapRef& osdmap) = 0;
|
||||
|
||||
|
||||
/**
|
||||
|
@ -155,7 +155,7 @@ void ReplicatedBackend::recover_object(
|
||||
}
|
||||
}
|
||||
|
||||
void ReplicatedBackend::check_recovery_sources(const OSDMapRef osdmap)
|
||||
void ReplicatedBackend::check_recovery_sources(const OSDMapRef& osdmap)
|
||||
{
|
||||
for(map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator i = pull_from_peer.begin();
|
||||
i != pull_from_peer.end();
|
||||
|
@ -58,7 +58,7 @@ public:
|
||||
RecoveryHandle *h
|
||||
);
|
||||
|
||||
void check_recovery_sources(const OSDMapRef osdmap);
|
||||
void check_recovery_sources(const OSDMapRef& osdmap);
|
||||
|
||||
/// @see PGBackend::delay_message_until_active
|
||||
bool can_handle_while_inactive(OpRequestRef op);
|
||||
|
@ -10433,7 +10433,7 @@ void ReplicatedPG::cancel_pull(const hobject_t &soid)
|
||||
finish_degraded_object(soid);
|
||||
}
|
||||
|
||||
void ReplicatedPG::check_recovery_sources(const OSDMapRef osdmap)
|
||||
void ReplicatedPG::check_recovery_sources(const OSDMapRef& osdmap)
|
||||
{
|
||||
/*
|
||||
* check that any peers we are planning to (or currently) pulling
|
||||
@ -10465,7 +10465,7 @@ void ReplicatedPG::check_recovery_sources(const OSDMapRef osdmap)
|
||||
}
|
||||
}
|
||||
|
||||
void PG::MissingLoc::check_recovery_sources(const OSDMapRef osdmap)
|
||||
void PG::MissingLoc::check_recovery_sources(const OSDMapRef& osdmap)
|
||||
{
|
||||
set<pg_shard_t> now_down;
|
||||
for (set<pg_shard_t>::iterator p = missing_loc_sources.begin();
|
||||
|
@ -1093,7 +1093,7 @@ protected:
|
||||
void finish_degraded_object(const hobject_t& oid);
|
||||
|
||||
// Cancels/resets pulls from peer
|
||||
void check_recovery_sources(const OSDMapRef map);
|
||||
void check_recovery_sources(const OSDMapRef& map);
|
||||
|
||||
int recover_missing(
|
||||
const hobject_t& oid,
|
||||
|
Loading…
Reference in New Issue
Block a user