mirror of
https://github.com/samba-team/samba.git
synced 2025-01-03 01:18:10 +03:00
ctdb-recoverd: Add PNN to recovery daemon context
This is currently referenced in a number of inconsistent ways, including: * pnn * rec->ctdb->pnn * ctdb->pnn * ctdb_get_pnn(ctdb) * ctdb_get_pnn(rec->ctdb) The first of these always requires some thought about the context - is this the node PNN or some other PNN (e.g. argument to function)? The intention is to always use rec->pnn when referring to the recovery daemon's PNN. Doing this also reduces reliance on struct ctdb_context internals. Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
ff0140e470
commit
9dbe7cc85e
@ -247,6 +247,7 @@ struct ctdb_recovery_lock_handle;
|
||||
struct ctdb_recoverd {
|
||||
struct ctdb_context *ctdb;
|
||||
uint32_t recmaster;
|
||||
uint32_t pnn;
|
||||
uint32_t last_culprit_node;
|
||||
struct ctdb_node_map_old *nodemap;
|
||||
struct timeval priority_time;
|
||||
@ -2940,6 +2941,7 @@ static void monitor_cluster(struct ctdb_context *ctdb)
|
||||
|
||||
rec->ctdb = ctdb;
|
||||
rec->recmaster = CTDB_UNKNOWN_PNN;
|
||||
rec->pnn = ctdb_get_pnn(ctdb);
|
||||
rec->recovery_lock_handle = NULL;
|
||||
rec->helper_pid = -1;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user