mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
ctdb-daemon: Avoid the use of ctdb->freeze_handle variable
These variables are used for state information related to freezing databases. Instead use the API functions to check if the databases are frozen. Signed-off-by: Amitay Isaacs <amitay@gmail.com> Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
parent
8c58c7392f
commit
7afabb1285
@ -368,14 +368,10 @@ static void ctdb_check_health(struct event_context *ev, struct timed_event *te,
|
||||
ctdb->monitor->monitoring_mode == CTDB_MONITORING_DISABLED) {
|
||||
skip_monitoring = true;
|
||||
} else {
|
||||
int i;
|
||||
for (i=1; i<=NUM_DB_PRIORITIES; i++) {
|
||||
if (ctdb->freeze_handles[i] != NULL) {
|
||||
DEBUG(DEBUG_ERR,
|
||||
("Skip monitoring since databases are frozen\n"));
|
||||
skip_monitoring = true;
|
||||
break;
|
||||
}
|
||||
if (ctdb_db_all_frozen(ctdb)) {
|
||||
DEBUG(DEBUG_ERR,
|
||||
("Skip monitoring since databases are frozen\n"));
|
||||
skip_monitoring = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -558,7 +558,7 @@ int32_t ctdb_control_set_recmode(struct ctdb_context *ctdb,
|
||||
|
||||
/* force the databases to thaw */
|
||||
for (i=1; i<=NUM_DB_PRIORITIES; i++) {
|
||||
if (ctdb->freeze_handles[i] != NULL) {
|
||||
if (ctdb_db_prio_frozen(ctdb, i)) {
|
||||
ctdb_control_thaw(ctdb, i, false);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user