diff options
| author | Martin Schwenke <martin@meltin.net> | 2014-12-09 14:50:38 +1100 |
|---|---|---|
| committer | Amitay Isaacs <amitay@samba.org> | 2015-02-13 07:19:07 +0100 |
| commit | 1d6ed91f5518d462ba368bca03be923428710157 (patch) | |
| tree | 0244700cc813547b67d96cb5473657eb6cec44b3 /ctdb/include | |
| parent | be19a17faf6da97365c425c5b423e9b74f9c9e0c (diff) | |
| download | samba-1d6ed91f5518d462ba368bca03be923428710157.tar.gz samba-1d6ed91f5518d462ba368bca03be923428710157.tar.xz samba-1d6ed91f5518d462ba368bca03be923428710157.zip | |
ctdb-recoverd: Simplify ctdb_recovery_lock()
Have it just silently take or fail to take the lock, except on an
unexpected failure (where it should log an error).
This means that when it is called we need to keep the old behaviour
and explicitly release the lock. In do_recovery() the lock is
released and a message is printed before attempting to take the lock.
In the daemon sanity check the lock must be released in the error path
if it is actually taken.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb/include')
| -rw-r--r-- | ctdb/include/ctdb_private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 19fab572a3..7005fd802f 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -1260,7 +1260,7 @@ void set_nonblocking(int fd); void set_close_on_exec(int fd); bool ctdb_recovery_have_lock(struct ctdb_context *ctdb); -bool ctdb_recovery_lock(struct ctdb_context *ctdb, bool keep); +bool ctdb_recovery_lock(struct ctdb_context *ctdb); void ctdb_recovery_unlock(struct ctdb_context *ctdb); int ctdb_set_recovery_lock_file(struct ctdb_context *ctdb, const char *file); |
