mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-recoverd: Add a helper variable
Improves readability and simplifies subsequent changes. BUG: https://bugzilla.samba.org/show_bug.cgi?id=14784 Signed-off-by: Martin Schwenke <martin@meltin.net> Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
parent
4366c3bb71
commit
82a075d4d7
@ -553,13 +553,14 @@ static int update_flags(struct ctdb_recoverd *rec,
|
||||
for (j=0; j<nodemap->num; j++) {
|
||||
struct ctdb_node_map_old *remote_nodemap=NULL;
|
||||
uint32_t local_flags = nodemap->nodes[j].flags;
|
||||
uint32_t remote_pnn = nodemap->nodes[j].pnn;
|
||||
uint32_t remote_flags;
|
||||
int ret;
|
||||
|
||||
if (local_flags & NODE_FLAGS_DISCONNECTED) {
|
||||
continue;
|
||||
}
|
||||
if (nodemap->nodes[j].pnn == ctdb->pnn) {
|
||||
if (remote_pnn == ctdb->pnn) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -568,7 +569,7 @@ static int update_flags(struct ctdb_recoverd *rec,
|
||||
|
||||
if (local_flags != remote_flags) {
|
||||
ret = update_flags_on_all_nodes(rec,
|
||||
nodemap->nodes[j].pnn,
|
||||
remote_pnn,
|
||||
remote_flags);
|
||||
if (ret != 0) {
|
||||
DBG_ERR(
|
||||
@ -583,7 +584,7 @@ static int update_flags(struct ctdb_recoverd *rec,
|
||||
*/
|
||||
D_NOTICE("Remote node %u had flags 0x%x, "
|
||||
"local had 0x%x - updating local\n",
|
||||
nodemap->nodes[j].pnn,
|
||||
remote_pnn,
|
||||
remote_flags,
|
||||
local_flags);
|
||||
nodemap->nodes[j].flags = remote_flags;
|
||||
|
Loading…
Reference in New Issue
Block a user