From e5cd81da77ef58992b7eb9ff7d972b499b946bb7 Mon Sep 17 00:00:00 2001 From: Amitay Isaacs Date: Tue, 6 May 2014 14:07:00 +1000 Subject: 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 Reviewed-by: Martin Schwenke --- ctdb/server/ctdb_control.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'ctdb/server/ctdb_control.c') 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: { -- cgit