1
0
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:
Amitay Isaacs 2015-09-15 12:22:17 +10:00 committed by Amitay Isaacs
parent 8c58c7392f
commit 7afabb1285
2 changed files with 5 additions and 9 deletions

View File

@ -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;
}
}

View File

@ -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);
}
}