1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

freeze: Log message from ctdb_start_freeze() and ctdb_control_freeze()

This ensures that whenever databases are frozen either via sending
control or by calling ctdb_start_freeze(), the action is logged.
Since ctdb_control_freeze() calls ctdb_start_freeze(), move logging of
message in early return condition if databases are already frozen.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>

(This used to be ctdb commit 478e24bceda3fedfba54ccb48faa115df726b819)
This commit is contained in:
Amitay Isaacs 2013-07-01 13:26:33 +10:00
parent d439aa05a8
commit 6fe0089bc0

View File

@ -145,6 +145,8 @@ int ctdb_start_freeze(struct ctdb_context *ctdb, uint32_t priority)
return 0;
}
DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
/* Stop any vacuuming going on: we don't want to wait. */
ctdb_stop_vacuuming(ctdb);
@ -175,8 +177,6 @@ int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control *
priority = (uint32_t)c->srvid;
DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
if (priority == 0) {
DEBUG(DEBUG_ERR,("Freeze priority 0 requested, remapping to priority 1\n"));
priority = 1;
@ -188,6 +188,7 @@ int32_t ctdb_control_freeze(struct ctdb_context *ctdb, struct ctdb_req_control *
}
if (ctdb->freeze_mode[priority] == CTDB_FREEZE_FROZEN) {
DEBUG(DEBUG_ERR, ("Freeze priority %u\n", priority));
/* we're already frozen */
return 0;
}