summaryrefslogtreecommitdiffstats
path: root/ctdb/server/ctdb_freeze.c
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-07-01 16:21:00 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-07-02 12:59:08 +1000
commitcf17247d312a2d5a6cb191c2db7e50bd3bf5bd6f (patch)
tree70144cb876d29f7733ddcbcbb524dda24c205b15 /ctdb/server/ctdb_freeze.c
parent6fe0089bc0443a1c8ee75f16215a8bd1f9a66cfb (diff)
downloadsamba-cf17247d312a2d5a6cb191c2db7e50bd3bf5bd6f.tar.gz
samba-cf17247d312a2d5a6cb191c2db7e50bd3bf5bd6f.tar.xz
samba-cf17247d312a2d5a6cb191c2db7e50bd3bf5bd6f.zip
freeze: If priority is invalid here, it's time to abort
ctdb_start_freeze() is called from ctdb_control_freeze() which fixes the priority if it's 0 and return error if it's invalid. Other callers of ctdb_start_freeze() are internal to CTDB. So if priority is invalid in ctdb_start_freeze(), definitely something is seriously wrong. Signed-off-by: Amitay Isaacs <amitay@gmail.com> (This used to be ctdb commit 87716e8f504d659515d3dbcf93badbf106873bc8)
Diffstat (limited to 'ctdb/server/ctdb_freeze.c')
-rw-r--r--ctdb/server/ctdb_freeze.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/ctdb/server/ctdb_freeze.c b/ctdb/server/ctdb_freeze.c
index 867da6bc925..1acd5c7fa71 100644
--- a/ctdb/server/ctdb_freeze.c
+++ b/ctdb/server/ctdb_freeze.c
@@ -130,14 +130,9 @@ int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
{
struct ctdb_freeze_handle *h;
- if (priority == 0) {
- DEBUG(DEBUG_ERR,("Freeze priority 0 requested, remapping to priority 1\n"));
- priority = 1;
- }
-
if ((priority < 1) || (priority > NUM_DB_PRIORITIES)) {
DEBUG(DEBUG_ERR,(__location__ " Invalid db priority : %u\n", priority));
- return -1;
+ ctdb_fatal(ctdb, "Internal error");
}
if (ctdb->freeze_mode[priority] == CTDB_FREEZE_FROZEN) {