diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-05-06 14:07:00 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2014-07-07 13:29:49 +0200 |
commit | e5cd81da77ef58992b7eb9ff7d972b499b946bb7 (patch) | |
tree | 60481490079e62b0ad8191f2a1803431262c994d /ctdb/server/ctdb_control.c | |
parent | 1be8564e553ce044426dbe7b3987edf514832940 (diff) | |
download | samba-e5cd81da77ef58992b7eb9ff7d972b499b946bb7.tar.gz samba-e5cd81da77ef58992b7eb9ff7d972b499b946bb7.tar.xz samba-e5cd81da77ef58992b7eb9ff7d972b499b946bb7.zip |
Revert "It was possible for ->recovery_mode to get out of sync with the new three db priorities in such a way that"
This reverts commit 6578a97bd94fc14d5b6df85b84e50447f7bdb2e3.
This condition cannot happen since when recovery is triggered, all the
databases would get frozen and thawed in the order of priority. The only
other place where databases get frozen are for implementation of ctdb
wipedb/restoredb commands.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/server/ctdb_control.c')
-rw-r--r-- | ctdb/server/ctdb_control.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c index b0220de150..4c5a26ecae 100644 --- a/ctdb/server/ctdb_control.c +++ b/ctdb/server/ctdb_control.c @@ -198,16 +198,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb, return ctdb_control_push_db(ctdb, indata); case CTDB_CONTROL_GET_RECMODE: { - int i; - if (ctdb->recovery_mode == CTDB_RECOVERY_ACTIVE) { - return CTDB_RECOVERY_ACTIVE; - } - for (i=1; i<=NUM_DB_PRIORITIES; i++) { - if (ctdb->freeze_mode[i] == CTDB_FREEZE_FROZEN) { - return CTDB_RECOVERY_ACTIVE; - } - } - return CTDB_RECOVERY_NORMAL; + return ctdb->recovery_mode; } case CTDB_CONTROL_SET_RECMASTER: { |