1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-21 18:04:06 +03:00

ctdb-recoverd: Change argument to srvid_disable_and_reply()

Reduce dependency on struct ctdb_context internals, enable a
subsequent change.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
This commit is contained in:
Martin Schwenke 2021-12-08 21:28:05 +11:00 committed by Martin Schwenke
parent b7c138ca99
commit 4af3b10a37

View File

@ -1531,10 +1531,11 @@ static void recd_node_rebalance_handler(uint64_t srvid, TDB_DATA data,
static void srvid_disable_and_reply(struct ctdb_context *ctdb,
static void srvid_disable_and_reply(struct ctdb_recoverd *rec,
TDB_DATA data,
struct ctdb_op_state *op_state)
{
struct ctdb_context *ctdb = rec->ctdb;
struct ctdb_disable_message *r;
uint32_t timeout;
TDB_DATA result;
@ -1574,7 +1575,7 @@ static void disable_takeover_runs_handler(uint64_t srvid, TDB_DATA data,
struct ctdb_recoverd *rec = talloc_get_type(
private_data, struct ctdb_recoverd);
srvid_disable_and_reply(rec->ctdb, data, rec->takeover_run);
srvid_disable_and_reply(rec, data, rec->takeover_run);
}
/* Backward compatibility for this SRVID */
@ -1607,7 +1608,7 @@ static void disable_recoveries_handler(uint64_t srvid, TDB_DATA data,
struct ctdb_recoverd *rec = talloc_get_type(
private_data, struct ctdb_recoverd);
srvid_disable_and_reply(rec->ctdb, data, rec->recovery);
srvid_disable_and_reply(rec, data, rec->recovery);
}
/*