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>
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;
rec->ctdb = ctdb;
rec->recmaster = CTDB_UNKNOWN_PNN;
+ rec->pnn = ctdb_get_pnn(ctdb);
rec->recovery_lock_handle = NULL;
rec->helper_pid = -1;