mirror of
https://github.com/ceph/ceph
synced 2025-02-21 01:47:25 +00:00
Message,OSD,PG: make Connection::features private
Use has_feature() method too. Signed-off-by: Samuel Just <sam.just@inktank.com> Signed-off-by: Sage Weil <sage@inktank.com>
This commit is contained in:
parent
d1b47f40e7
commit
f0feabe81f
@ -172,7 +172,9 @@ struct Connection : private RefCountedObject {
|
||||
RefCountedObject *priv;
|
||||
int peer_type;
|
||||
entity_addr_t peer_addr;
|
||||
private:
|
||||
uint64_t features;
|
||||
public:
|
||||
RefCountedObject *pipe;
|
||||
bool failed; /// true if we are a lossy connection that has failed.
|
||||
|
||||
|
@ -5840,7 +5840,7 @@ bool OSD::compat_must_dispatch_immediately(PG *pg)
|
||||
continue;
|
||||
ConnectionRef conn =
|
||||
service.get_con_osd_cluster(*i, pg->get_osdmap()->get_epoch());
|
||||
if (conn && !(conn->features & CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
if (conn && !conn->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -5894,7 +5894,7 @@ void OSD::do_notifies(
|
||||
if (!con)
|
||||
continue;
|
||||
_share_map_outgoing(it->first, con.get(), curmap);
|
||||
if ((con->features & CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
if (con->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
dout(7) << "do_notify osd." << it->first
|
||||
<< " on " << it->second.size() << " PGs" << dendl;
|
||||
MOSDPGNotify *m = new MOSDPGNotify(curmap->get_epoch(),
|
||||
@ -5934,7 +5934,7 @@ void OSD::do_queries(map< int, map<pg_t,pg_query_t> >& query_map,
|
||||
if (!con)
|
||||
continue;
|
||||
_share_map_outgoing(who, con.get(), curmap);
|
||||
if ((con->features & CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
if (con->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
dout(7) << "do_queries querying osd." << who
|
||||
<< " on " << pit->second.size() << " PGs" << dendl;
|
||||
MOSDPGQuery *m = new MOSDPGQuery(curmap->get_epoch(), pit->second);
|
||||
@ -5973,7 +5973,7 @@ void OSD::do_infos(map<int,vector<pair<pg_notify_t, pg_interval_map_t> > >& info
|
||||
if (!con)
|
||||
continue;
|
||||
_share_map_outgoing(p->first, con.get(), curmap);
|
||||
if ((con->features & CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
if (con->has_feature(CEPH_FEATURE_INDEP_PG_MAP)) {
|
||||
MOSDPGInfo *m = new MOSDPGInfo(curmap->get_epoch());
|
||||
m->pg_list = p->second;
|
||||
cluster_messenger->send_message(m, con.get());
|
||||
|
@ -3329,7 +3329,7 @@ void PG::scrub(ThreadPool::TPHandle &handle)
|
||||
ConnectionRef con = osd->get_con_osd_cluster(acting[i], get_osdmap()->get_epoch());
|
||||
if (!con)
|
||||
continue;
|
||||
if (!(con->features & CEPH_FEATURE_CHUNKY_SCRUB)) {
|
||||
if (!con->has_feature(CEPH_FEATURE_CHUNKY_SCRUB)) {
|
||||
dout(20) << "OSD " << acting[i]
|
||||
<< " does not support chunky scrubs, falling back to classic"
|
||||
<< dendl;
|
||||
@ -5478,7 +5478,7 @@ PG::RecoveryState::WaitRemoteBackfillReserved::WaitRemoteBackfillReserved(my_con
|
||||
ConnectionRef con = pg->osd->get_con_osd_cluster(
|
||||
pg->backfill_target, pg->get_osdmap()->get_epoch());
|
||||
if (con) {
|
||||
if ((con->features & CEPH_FEATURE_BACKFILL_RESERVATION)) {
|
||||
if (con->has_feature(CEPH_FEATURE_BACKFILL_RESERVATION)) {
|
||||
unsigned priority = pg->is_degraded() ? OSDService::BACKFILL_HIGH
|
||||
: OSDService::BACKFILL_LOW;
|
||||
pg->osd->send_message_osd_cluster(
|
||||
@ -5734,7 +5734,7 @@ PG::RecoveryState::WaitRemoteRecoveryReserved::react(const RemoteRecoveryReserve
|
||||
if (acting_osd_it != context< Active >().sorted_acting_set.end()) {
|
||||
ConnectionRef con = pg->osd->get_con_osd_cluster(*acting_osd_it, pg->get_osdmap()->get_epoch());
|
||||
if (con) {
|
||||
if ((con->features & CEPH_FEATURE_RECOVERY_RESERVATION)) {
|
||||
if (con->has_feature(CEPH_FEATURE_RECOVERY_RESERVATION)) {
|
||||
pg->osd->send_message_osd_cluster(
|
||||
new MRecoveryReserve(MRecoveryReserve::REQUEST,
|
||||
pg->info.pgid,
|
||||
@ -5782,7 +5782,7 @@ void PG::RecoveryState::Recovering::release_reservations()
|
||||
continue;
|
||||
ConnectionRef con = pg->osd->get_con_osd_cluster(*i, pg->get_osdmap()->get_epoch());
|
||||
if (con) {
|
||||
if ((con->features & CEPH_FEATURE_RECOVERY_RESERVATION)) {
|
||||
if (con->has_feature(CEPH_FEATURE_RECOVERY_RESERVATION)) {
|
||||
pg->osd->send_message_osd_cluster(
|
||||
new MRecoveryReserve(MRecoveryReserve::RELEASE,
|
||||
pg->info.pgid,
|
||||
|
Loading…
Reference in New Issue
Block a user