Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
SUSE:SLE-15-SP1:Update
pacemaker.29834
bsc#1196340-0002-Refactor-scheduler-functionize...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File bsc#1196340-0002-Refactor-scheduler-functionize-comparing-which-lrm_r.patch of Package pacemaker.29834
From 66ed57b2191ec6d7231e20602e805a0d685acd2b Mon Sep 17 00:00:00 2001 From: "Gao,Yan" <ygao@suse.com> Date: Mon, 9 May 2022 13:04:53 +0200 Subject: [PATCH 2/9] Refactor: scheduler: functionize comparing which lrm_rsc_op is newer --- include/crm/pengine/internal.h | 1 + lib/pengine/utils.c | 15 ++++++++++----- 2 files changed, 11 insertions(+), 5 deletions(-) Index: pacemaker-2.0.1+20190417.13d370ca9/include/crm/pengine/internal.h =================================================================== --- pacemaker-2.0.1+20190417.13d370ca9.orig/include/crm/pengine/internal.h +++ pacemaker-2.0.1+20190417.13d370ca9/include/crm/pengine/internal.h @@ -262,6 +262,7 @@ extern void pe_free_action(action_t * ac extern void resource_location(resource_t * rsc, node_t * node, int score, const char *tag, pe_working_set_t * data_set); +extern int pe__is_newer_op(const xmlNode *xml_a, const xmlNode *xml_b); extern gint sort_op_by_callid(gconstpointer a, gconstpointer b); extern gboolean get_target_role(resource_t * rsc, enum rsc_role_e *role); Index: pacemaker-2.0.1+20190417.13d370ca9/lib/pengine/utils.c =================================================================== --- pacemaker-2.0.1+20190417.13d370ca9.orig/lib/pengine/utils.c +++ pacemaker-2.0.1+20190417.13d370ca9/lib/pengine/utils.c @@ -1611,8 +1611,8 @@ resource_location(resource_t * rsc, node return an_int; \ } while(0) -gint -sort_op_by_callid(gconstpointer a, gconstpointer b) +int +pe__is_newer_op(const xmlNode *xml_a, const xmlNode *xml_b) { int a_call_id = -1; int b_call_id = -1; @@ -1620,9 +1620,6 @@ sort_op_by_callid(gconstpointer a, gcons char *a_uuid = NULL; char *b_uuid = NULL; - const xmlNode *xml_a = a; - const xmlNode *xml_b = b; - const char *a_xml_id = crm_element_value(xml_a, XML_ATTR_ID); const char *b_xml_id = crm_element_value(xml_b, XML_ATTR_ID); @@ -1724,7 +1721,15 @@ sort_op_by_callid(gconstpointer a, gcons /* we should never end up here */ CRM_CHECK(FALSE, sort_return(0, "default")); +} + +gint +sort_op_by_callid(gconstpointer a, gconstpointer b) +{ + const xmlNode *xml_a = a; + const xmlNode *xml_b = b; + return pe__is_newer_op(xml_a, xml_b); } time_t
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor