From c8926c5c93a4a35fa3af66e9d01b789841b10d2b Mon Sep 17 00:00:00 2001 From: Ken Gaillot Date: Feb 24 2021 16:08:49 +0000 Subject: Refactor: scheduler,tools: rename colocation type ... per current guidelines --- diff --git a/include/crm/pengine/pe_types.h b/include/crm/pengine/pe_types.h index 9fea637..59d5ce8 100644 --- a/include/crm/pengine/pe_types.h +++ b/include/crm/pengine/pe_types.h @@ -340,8 +340,8 @@ struct pe_resource_s { //!@{ //! This field should be treated as internal to Pacemaker - GListPtr rsc_cons_lhs; // List of rsc_colocation_t* - GListPtr rsc_cons; // List of rsc_colocation_t* + GListPtr rsc_cons_lhs; // List of pcmk__colocation_t* + GListPtr rsc_cons; // List of pcmk__colocation_t* GListPtr rsc_location; // List of pe__location_t* GListPtr actions; // List of pe_action_t* GListPtr rsc_tickets; // List of rsc_ticket* diff --git a/include/pcmki/pcmki_sched_allocate.h b/include/pcmki/pcmki_sched_allocate.h index a7f8c11..0859eaa 100644 --- a/include/pcmki/pcmki_sched_allocate.h +++ b/include/pcmki/pcmki_sched_allocate.h @@ -26,9 +26,9 @@ struct resource_alloc_functions_s { void (*internal_constraints) (pe_resource_t *, pe_working_set_t *); void (*rsc_colocation_lh) (pe_resource_t *, pe_resource_t *, - rsc_colocation_t *, pe_working_set_t *); + pcmk__colocation_t *, pe_working_set_t *); void (*rsc_colocation_rh) (pe_resource_t *, pe_resource_t *, - rsc_colocation_t *, pe_working_set_t *); + pcmk__colocation_t *, pe_working_set_t *); void (*rsc_location) (pe_resource_t *, pe__location_t *); @@ -56,10 +56,10 @@ pe_node_t *pcmk__native_allocate(pe_resource_t *rsc, pe_node_t *preferred, extern void native_create_actions(pe_resource_t * rsc, pe_working_set_t * data_set); extern void native_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set); void native_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); void native_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); extern void rsc_ticket_constraint(pe_resource_t * lh_rsc, rsc_ticket_t * rsc_ticket, pe_working_set_t * data_set); @@ -76,10 +76,10 @@ pe_node_t *pcmk__group_allocate(pe_resource_t *rsc, pe_node_t *preferred, extern void group_create_actions(pe_resource_t * rsc, pe_working_set_t * data_set); extern void group_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set); void group_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); void group_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); extern enum pe_action_flags group_action_flags(pe_action_t * action, pe_node_t * node); void group_rsc_location(pe_resource_t *rsc, pe__location_t *constraint); @@ -97,11 +97,11 @@ void pcmk__bundle_internal_constraints(pe_resource_t *rsc, pe_working_set_t *data_set); void pcmk__bundle_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); void pcmk__bundle_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); void pcmk__bundle_rsc_location(pe_resource_t *rsc, pe__location_t *constraint); enum pe_action_flags pcmk__bundle_action_flags(pe_action_t *action, @@ -114,10 +114,10 @@ pe_node_t *pcmk__clone_allocate(pe_resource_t *rsc, pe_node_t *preferred, extern void clone_create_actions(pe_resource_t * rsc, pe_working_set_t * data_set); extern void clone_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set); void clone_rsc_colocation_lh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); void clone_rsc_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); void clone_rsc_location(pe_resource_t *rsc, pe__location_t *constraint); extern enum pe_action_flags clone_action_flags(pe_action_t * action, pe_node_t * node); @@ -133,7 +133,7 @@ void create_promotable_actions(pe_resource_t *rsc, pe_working_set_t *data_set); void promote_demote_constraints(pe_resource_t *rsc, pe_working_set_t *data_set); void promotable_constraints(pe_resource_t *rsc, pe_working_set_t *data_set); void promotable_colocation_rh(pe_resource_t *lh_rsc, pe_resource_t *rh_rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set); /* extern resource_object_functions_t resource_variants[]; */ diff --git a/include/pcmki/pcmki_sched_utils.h b/include/pcmki/pcmki_sched_utils.h index fdb3843..b8d7750 100644 --- a/include/pcmki/pcmki_sched_utils.h +++ b/include/pcmki/pcmki_sched_utils.h @@ -20,7 +20,7 @@ #include /* Constraint helper functions */ -extern rsc_colocation_t *invert_constraint(rsc_colocation_t * constraint); +pcmk__colocation_t *invert_constraint(pcmk__colocation_t *constraint); pe__location_t *copy_constraint(pe__location_t *constraint); @@ -71,7 +71,7 @@ enum filter_colocation_res { extern enum filter_colocation_res filter_colocation_constraint(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, - rsc_colocation_t * constraint, gboolean preview); + pcmk__colocation_t *constraint, gboolean preview); extern int compare_capacity(const pe_node_t * node1, const pe_node_t * node2); extern void calculate_utilization(GHashTable * current_utilization, diff --git a/include/pcmki/pcmki_scheduler.h b/include/pcmki/pcmki_scheduler.h index 342d57a..b24e994 100644 --- a/include/pcmki/pcmki_scheduler.h +++ b/include/pcmki/pcmki_scheduler.h @@ -10,7 +10,6 @@ #ifndef PENGINE__H # define PENGINE__H -typedef struct rsc_colocation_s rsc_colocation_t; typedef struct rsc_ticket_s rsc_ticket_t; typedef struct lrm_agent_s lrm_agent_t; @@ -37,7 +36,7 @@ enum pe_weights { pe_weights_rollback = 0x10, }; -struct rsc_colocation_s { +typedef struct { const char *id; const char *node_attribute; pe_resource_t *rsc_lh; @@ -47,7 +46,7 @@ struct rsc_colocation_s { int role_rh; int score; -}; +} pcmk__colocation_t; enum loss_ticket_policy_e { loss_ticket_stop, diff --git a/lib/pacemaker/pcmk_output.c b/lib/pacemaker/pcmk_output.c index 0d20a54..500afd1 100644 --- a/lib/pacemaker/pcmk_output.c +++ b/lib/pacemaker/pcmk_output.c @@ -47,7 +47,7 @@ pcmk__out_epilogue(pcmk__output_t *out, xmlNodePtr *xml, int retval) { } static char * -colocations_header(pe_resource_t *rsc, rsc_colocation_t *cons, +colocations_header(pe_resource_t *rsc, pcmk__colocation_t *cons, gboolean dependents) { char *score = NULL; char *retval = NULL; @@ -68,7 +68,7 @@ colocations_header(pe_resource_t *rsc, rsc_colocation_t *cons, static void colocations_xml_node(pcmk__output_t *out, pe_resource_t *rsc, - rsc_colocation_t *cons) { + pcmk__colocation_t *cons) { char *score = NULL; xmlNodePtr node = NULL; @@ -146,7 +146,7 @@ rsc_is_colocated_with_list(pcmk__output_t *out, va_list args) { pe__set_resource_flags(rsc, pe_rsc_allocating); for (GList *lpc = rsc->rsc_cons; lpc != NULL; lpc = lpc->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) lpc->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) lpc->data; char *hdr = NULL; PCMK__OUTPUT_LIST_HEADER(out, FALSE, rc, "Resources %s is colocated with", rsc->id); @@ -189,7 +189,7 @@ rsc_is_colocated_with_list_xml(pcmk__output_t *out, va_list args) { pe__set_resource_flags(rsc, pe_rsc_allocating); for (GList *lpc = rsc->rsc_cons; lpc != NULL; lpc = lpc->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) lpc->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) lpc->data; if (pcmk_is_set(cons->rsc_rh->flags, pe_rsc_allocating)) { colocations_xml_node(out, cons->rsc_rh, cons); @@ -221,7 +221,7 @@ rscs_colocated_with_list(pcmk__output_t *out, va_list args) { pe__set_resource_flags(rsc, pe_rsc_allocating); for (GList *lpc = rsc->rsc_cons_lhs; lpc != NULL; lpc = lpc->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) lpc->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) lpc->data; char *hdr = NULL; PCMK__OUTPUT_LIST_HEADER(out, FALSE, rc, "Resources colocated with %s", rsc->id); @@ -264,7 +264,7 @@ rscs_colocated_with_list_xml(pcmk__output_t *out, va_list args) { pe__set_resource_flags(rsc, pe_rsc_allocating); for (GList *lpc = rsc->rsc_cons_lhs; lpc != NULL; lpc = lpc->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) lpc->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) lpc->data; if (pcmk_is_set(cons->rsc_lh->flags, pe_rsc_allocating)) { colocations_xml_node(out, cons->rsc_lh, cons); diff --git a/lib/pacemaker/pcmk_sched_bundle.c b/lib/pacemaker/pcmk_sched_bundle.c index 02bff7c..ac9219c 100644 --- a/lib/pacemaker/pcmk_sched_bundle.c +++ b/lib/pacemaker/pcmk_sched_bundle.c @@ -425,7 +425,7 @@ compatible_replica(pe_resource_t *rsc_lh, pe_resource_t *rsc, void pcmk__bundle_rsc_colocation_lh(pe_resource_t *rsc, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { /* -- Never called -- @@ -469,7 +469,7 @@ int copies_per_node(pe_resource_t * rsc) void pcmk__bundle_rsc_colocation_rh(pe_resource_t *rsc_lh, pe_resource_t *rsc, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { GListPtr allocated_rhs = NULL; diff --git a/lib/pacemaker/pcmk_sched_clone.c b/lib/pacemaker/pcmk_sched_clone.c index e419a24..9485a98 100644 --- a/lib/pacemaker/pcmk_sched_clone.c +++ b/lib/pacemaker/pcmk_sched_clone.c @@ -237,7 +237,7 @@ sort_clone_instance(gconstpointer a, gconstpointer b, gpointer data_set) if(resource1->parent) { for (gIter = resource1->parent->rsc_cons; gIter; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -252,7 +252,7 @@ sort_clone_instance(gconstpointer a, gconstpointer b, gpointer data_set) } for (gIter = resource1->parent->rsc_cons_lhs; gIter; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -269,7 +269,7 @@ sort_clone_instance(gconstpointer a, gconstpointer b, gpointer data_set) if(resource2->parent) { for (gIter = resource2->parent->rsc_cons; gIter; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; crm_trace("Applying %s to %s", constraint->id, resource2->id); @@ -281,7 +281,7 @@ sort_clone_instance(gconstpointer a, gconstpointer b, gpointer data_set) } for (gIter = resource2->parent->rsc_cons_lhs; gIter; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; crm_trace("Applying %s to %s", constraint->id, resource2->id); @@ -499,7 +499,7 @@ append_parent_colocation(pe_resource_t * rsc, pe_resource_t * child, gboolean al gIter = rsc->rsc_cons; for (; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) gIter->data; if (cons->score == 0) { continue; @@ -511,7 +511,7 @@ append_parent_colocation(pe_resource_t * rsc, pe_resource_t * child, gboolean al gIter = rsc->rsc_cons_lhs; for (; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) gIter->data; if (cons->score == 0) { continue; @@ -645,7 +645,7 @@ pcmk__clone_allocate(pe_resource_t *rsc, pe_node_t *prefer, * order to allocate clone instances */ for (GListPtr gIter = rsc->rsc_cons; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -656,7 +656,7 @@ pcmk__clone_allocate(pe_resource_t *rsc, pe_node_t *prefer, } for (GListPtr gIter = rsc->rsc_cons_lhs; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -1055,7 +1055,7 @@ find_compatible_child(pe_resource_t *local_child, pe_resource_t *rsc, void clone_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { /* -- Never called -- @@ -1067,7 +1067,7 @@ clone_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, void clone_rsc_colocation_rh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { GListPtr gIter = NULL; diff --git a/lib/pacemaker/pcmk_sched_constraints.c b/lib/pacemaker/pcmk_sched_constraints.c index cce3f12..1b44837 100644 --- a/lib/pacemaker/pcmk_sched_constraints.c +++ b/lib/pacemaker/pcmk_sched_constraints.c @@ -1204,8 +1204,8 @@ generate_location_rule(pe_resource_t *rsc, xmlNode *rule_xml, static gint sort_cons_priority_lh(gconstpointer a, gconstpointer b) { - const rsc_colocation_t *rsc_constraint1 = (const rsc_colocation_t *)a; - const rsc_colocation_t *rsc_constraint2 = (const rsc_colocation_t *)b; + const pcmk__colocation_t *rsc_constraint1 = (const pcmk__colocation_t *) a; + const pcmk__colocation_t *rsc_constraint2 = (const pcmk__colocation_t *) b; if (a == NULL) { return 1; @@ -1252,8 +1252,8 @@ sort_cons_priority_lh(gconstpointer a, gconstpointer b) static gint sort_cons_priority_rh(gconstpointer a, gconstpointer b) { - const rsc_colocation_t *rsc_constraint1 = (const rsc_colocation_t *)a; - const rsc_colocation_t *rsc_constraint2 = (const rsc_colocation_t *)b; + const pcmk__colocation_t *rsc_constraint1 = (const pcmk__colocation_t *) a; + const pcmk__colocation_t *rsc_constraint2 = (const pcmk__colocation_t *) b; if (a == NULL) { return 1; @@ -1345,7 +1345,7 @@ pcmk__new_colocation(const char *id, const char *node_attr, int score, const char *state_lh, const char *state_rh, pe_working_set_t *data_set) { - rsc_colocation_t *new_con = NULL; + pcmk__colocation_t *new_con = NULL; if ((rsc_lh == NULL) || (rsc_rh == NULL)) { pcmk__config_err("Ignoring colocation '%s' because resource " @@ -1353,7 +1353,7 @@ pcmk__new_colocation(const char *id, const char *node_attr, int score, return; } - new_con = calloc(1, sizeof(rsc_colocation_t)); + new_con = calloc(1, sizeof(pcmk__colocation_t)); if (new_con == NULL) { return; } diff --git a/lib/pacemaker/pcmk_sched_graph.c b/lib/pacemaker/pcmk_sched_graph.c index 51f7063..c012d23 100644 --- a/lib/pacemaker/pcmk_sched_graph.c +++ b/lib/pacemaker/pcmk_sched_graph.c @@ -510,7 +510,8 @@ update_colo_start_chain(pe_action_t *action, pe_working_set_t *data_set) } for (gIter = rsc->rsc_cons_lhs; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *colocate_with = (rsc_colocation_t *)gIter->data; + pcmk__colocation_t *colocate_with = (pcmk__colocation_t *) gIter->data; + if (colocate_with->score == INFINITY) { mark_start_blocked(colocate_with->rsc_lh, action->rsc, data_set); } diff --git a/lib/pacemaker/pcmk_sched_group.c b/lib/pacemaker/pcmk_sched_group.c index 79847e8..f1ce0be 100644 --- a/lib/pacemaker/pcmk_sched_group.c +++ b/lib/pacemaker/pcmk_sched_group.c @@ -282,7 +282,7 @@ group_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set) void group_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { GListPtr gIter = NULL; @@ -328,7 +328,7 @@ group_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, void group_rsc_colocation_rh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { GListPtr gIter = rsc_rh->children; @@ -514,7 +514,7 @@ pcmk__group_merge_weights(pe_resource_t *rsc, const char *rhs, factor, flags); for (; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; diff --git a/lib/pacemaker/pcmk_sched_native.c b/lib/pacemaker/pcmk_sched_native.c index cda7895..2132c6b 100644 --- a/lib/pacemaker/pcmk_sched_native.c +++ b/lib/pacemaker/pcmk_sched_native.c @@ -434,7 +434,7 @@ pcmk__native_merge_weights(pe_resource_t *rsc, const char *rhs, for (; gIter != NULL; gIter = gIter->next) { pe_resource_t *other = NULL; - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -526,7 +526,7 @@ pcmk__native_allocate(pe_resource_t *rsc, pe_node_t *prefer, pe__show_node_weights(true, rsc, "Pre-alloc", rsc->allowed_nodes); for (gIter = rsc->rsc_cons; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; GHashTable *archive = NULL; pe_resource_t *rsc_rh = constraint->rsc_rh; @@ -560,7 +560,7 @@ pcmk__native_allocate(pe_resource_t *rsc, pe_node_t *prefer, pe__show_node_weights(true, rsc, "Post-coloc", rsc->allowed_nodes); for (gIter = rsc->rsc_cons_lhs; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -1710,7 +1710,7 @@ native_internal_constraints(pe_resource_t * rsc, pe_working_set_t * data_set) void native_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { if (rsc_lh == NULL) { @@ -1733,7 +1733,7 @@ native_rsc_colocation_lh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, enum filter_colocation_res filter_colocation_constraint(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, - rsc_colocation_t * constraint, gboolean preview) + pcmk__colocation_t *constraint, gboolean preview) { if (constraint->score == 0) { return influence_nothing; @@ -1817,7 +1817,8 @@ filter_colocation_constraint(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, } static void -influence_priority(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, rsc_colocation_t * constraint) +influence_priority(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, + pcmk__colocation_t *constraint) { const char *rh_value = NULL; const char *lh_value = NULL; @@ -1858,7 +1859,8 @@ influence_priority(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, rsc_colocatio } static void -colocation_match(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, rsc_colocation_t * constraint) +colocation_match(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, + pcmk__colocation_t *constraint) { const char *attribute = CRM_ATTR_ID; const char *value = NULL; @@ -1926,7 +1928,7 @@ colocation_match(pe_resource_t * rsc_lh, pe_resource_t * rsc_rh, rsc_colocation_ void native_rsc_colocation_rh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { enum filter_colocation_res filter_results; diff --git a/lib/pacemaker/pcmk_sched_promotable.c b/lib/pacemaker/pcmk_sched_promotable.c index b976344..9a5474a 100644 --- a/lib/pacemaker/pcmk_sched_promotable.c +++ b/lib/pacemaker/pcmk_sched_promotable.c @@ -319,7 +319,7 @@ promotion_order(pe_resource_t *rsc, pe_working_set_t *data_set) gIter = rsc->rsc_cons; for (; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -343,7 +343,7 @@ promotion_order(pe_resource_t *rsc, pe_working_set_t *data_set) gIter = rsc->rsc_cons_lhs; for (; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; if (constraint->score == 0) { continue; @@ -738,7 +738,7 @@ pcmk__set_instance_roles(pe_resource_t *rsc, pe_working_set_t *data_set) apply_master_location(child_rsc, rsc->rsc_location, chosen); for (gIter2 = child_rsc->rsc_cons; gIter2 != NULL; gIter2 = gIter2->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) gIter2->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) gIter2->data; if (cons->score == 0) { continue; @@ -981,7 +981,7 @@ node_hash_update_one(GHashTable * hash, pe_node_t * other, const char *attr, int void promotable_colocation_rh(pe_resource_t *rsc_lh, pe_resource_t *rsc_rh, - rsc_colocation_t *constraint, + pcmk__colocation_t *constraint, pe_working_set_t *data_set) { GListPtr gIter = NULL; diff --git a/lib/pacemaker/pcmk_sched_utilization.c b/lib/pacemaker/pcmk_sched_utilization.c index b46b2fa..0df3a17 100644 --- a/lib/pacemaker/pcmk_sched_utilization.c +++ b/lib/pacemaker/pcmk_sched_utilization.c @@ -276,7 +276,7 @@ find_colocated_rscs(GListPtr colocated_rscs, pe_resource_t * rsc, pe_resource_t colocated_rscs = g_list_append(colocated_rscs, rsc); for (gIter = rsc->rsc_cons; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; pe_resource_t *rsc_rh = constraint->rsc_rh; /* Break colocation loop */ @@ -298,7 +298,7 @@ find_colocated_rscs(GListPtr colocated_rscs, pe_resource_t * rsc, pe_resource_t } for (gIter = rsc->rsc_cons_lhs; gIter != NULL; gIter = gIter->next) { - rsc_colocation_t *constraint = (rsc_colocation_t *) gIter->data; + pcmk__colocation_t *constraint = (pcmk__colocation_t *) gIter->data; pe_resource_t *rsc_lh = constraint->rsc_lh; /* Break colocation loop */ diff --git a/tools/crm_resource_runtime.c b/tools/crm_resource_runtime.c index f4500db..e0804fc 100644 --- a/tools/crm_resource_runtime.c +++ b/tools/crm_resource_runtime.c @@ -392,7 +392,7 @@ cli_resource_update_attribute(pcmk__output_t *out, pe_resource_t *rsc, crm_debug("Looking for dependencies %p", rsc->rsc_cons_lhs); pe__set_resource_flags(rsc, pe_rsc_allocating); for (lpc = rsc->rsc_cons_lhs; lpc != NULL; lpc = lpc->next) { - rsc_colocation_t *cons = (rsc_colocation_t *) lpc->data; + pcmk__colocation_t *cons = (pcmk__colocation_t *) lpc->data; pe_resource_t *peer = cons->rsc_lh; crm_debug("Checking %s %d", cons->id, cons->score);