diff options
author | Amitay Isaacs <amitay@gmail.com> | 2013-07-01 13:26:33 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-07-02 12:57:03 +1000 |
commit | 6fe0089bc0443a1c8ee75f16215a8bd1f9a66cfb (patch) | |
tree | 103cdb0ddf79fb7f9d5de3688ac1c174ed4bb6d9 /ctdb/server/ctdb_freeze.c | |
parent | d439aa05a8e0f5755bec5125dc16a56b3111bca7 (diff) | |
download | samba-6fe0089bc0443a1c8ee75f16215a8bd1f9a66cfb.tar.gz samba-6fe0089bc0443a1c8ee75f16215a8bd1f9a66cfb.tar.xz samba-6fe0089bc0443a1c8ee75f16215a8bd1f9a66cfb.zip |
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)
Diffstat (limited to 'ctdb/server/ctdb_freeze.c')
-rw-r--r-- | ctdb/server/ctdb_freeze.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ctdb/server/ctdb_freeze.c b/ctdb/server/ctdb_freeze.c index e65415ca484..867da6bc925 100644 --- a/ctdb/server/ctdb_freeze.c +++ b/ctdb/server/ctdb_freeze.c @@ -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; } |