mirror of
https://github.com/ceph/ceph
synced 2025-04-04 23:42:13 +00:00
osd: pass shared_ptr by const reference
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
This commit is contained in:
parent
1c81ea29c9
commit
be2b51ded2
@ -1171,7 +1171,7 @@ struct FinishReadOp : public GenContext<ThreadPool::TPHandle&> {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void ECBackend::filter_read_op(
|
void ECBackend::filter_read_op(
|
||||||
const OSDMapRef osdmap,
|
const OSDMapRef& osdmap,
|
||||||
ReadOp &op)
|
ReadOp &op)
|
||||||
{
|
{
|
||||||
set<hobject_t, hobject_t::BitwiseComparator> to_cancel;
|
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;
|
set<ceph_tid_t> tids_to_filter;
|
||||||
for (map<pg_shard_t, set<ceph_tid_t> >::iterator
|
for (map<pg_shard_t, set<ceph_tid_t> >::iterator
|
||||||
|
@ -80,7 +80,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// @see ReadOp below
|
/// @see ReadOp below
|
||||||
void check_recovery_sources(const OSDMapRef osdmap);
|
void check_recovery_sources(const OSDMapRef& osdmap);
|
||||||
|
|
||||||
void on_change();
|
void on_change();
|
||||||
void clear_recovery_state();
|
void clear_recovery_state();
|
||||||
@ -313,7 +313,7 @@ public:
|
|||||||
};
|
};
|
||||||
friend struct FinishReadOp;
|
friend struct FinishReadOp;
|
||||||
void filter_read_op(
|
void filter_read_op(
|
||||||
const OSDMapRef osdmap,
|
const OSDMapRef& osdmap,
|
||||||
ReadOp &op);
|
ReadOp &op);
|
||||||
void complete_read_op(ReadOp &rop, RecoveryMessages *m);
|
void complete_read_op(ReadOp &rop, RecoveryMessages *m);
|
||||||
friend ostream &operator<<(ostream &lhs, const ReadOp &rhs);
|
friend ostream &operator<<(ostream &lhs, const ReadOp &rhs);
|
||||||
|
@ -420,7 +420,7 @@ public:
|
|||||||
);
|
);
|
||||||
|
|
||||||
/// Uses osdmap to update structures for now down sources
|
/// 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
|
/// Call when hoid is no longer missing in acting set
|
||||||
void recovered(const hobject_t &hoid) {
|
void recovered(const hobject_t &hoid) {
|
||||||
@ -1120,7 +1120,7 @@ public:
|
|||||||
void cancel_recovery();
|
void cancel_recovery();
|
||||||
void clear_recovery_state();
|
void clear_recovery_state();
|
||||||
virtual void _clear_recovery_state() = 0;
|
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 start_recovery_op(const hobject_t& soid);
|
||||||
void finish_recovery_op(const hobject_t& soid, bool dequeue=false);
|
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
|
OpRequestRef op ///< [in] message received
|
||||||
) = 0; ///< @return true if the message was handled
|
) = 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();
|
for(map<pg_shard_t, set<hobject_t, hobject_t::BitwiseComparator> >::iterator i = pull_from_peer.begin();
|
||||||
i != pull_from_peer.end();
|
i != pull_from_peer.end();
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
RecoveryHandle *h
|
RecoveryHandle *h
|
||||||
);
|
);
|
||||||
|
|
||||||
void check_recovery_sources(const OSDMapRef osdmap);
|
void check_recovery_sources(const OSDMapRef& osdmap);
|
||||||
|
|
||||||
/// @see PGBackend::delay_message_until_active
|
/// @see PGBackend::delay_message_until_active
|
||||||
bool can_handle_while_inactive(OpRequestRef op);
|
bool can_handle_while_inactive(OpRequestRef op);
|
||||||
|
@ -10433,7 +10433,7 @@ void ReplicatedPG::cancel_pull(const hobject_t &soid)
|
|||||||
finish_degraded_object(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
|
* 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;
|
set<pg_shard_t> now_down;
|
||||||
for (set<pg_shard_t>::iterator p = missing_loc_sources.begin();
|
for (set<pg_shard_t>::iterator p = missing_loc_sources.begin();
|
||||||
|
@ -1093,7 +1093,7 @@ protected:
|
|||||||
void finish_degraded_object(const hobject_t& oid);
|
void finish_degraded_object(const hobject_t& oid);
|
||||||
|
|
||||||
// Cancels/resets pulls from peer
|
// Cancels/resets pulls from peer
|
||||||
void check_recovery_sources(const OSDMapRef map);
|
void check_recovery_sources(const OSDMapRef& map);
|
||||||
|
|
||||||
int recover_missing(
|
int recover_missing(
|
||||||
const hobject_t& oid,
|
const hobject_t& oid,
|
||||||
|
Loading…
Reference in New Issue
Block a user