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>
(cherry picked from commit
87716e8f504d659515d3dbcf93badbf106873bc8)
Conflicts:
server/ctdb_freeze.c
*/
int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
{
- 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) {