diff options
author | Amitay Isaacs <amitay@gmail.com> | 2014-08-11 17:08:20 +1000 |
---|---|---|
committer | Martin Schwenke <martins@samba.org> | 2014-09-05 07:05:10 +0200 |
commit | 374cbc7b0ff68e04ee4e395935509c7df817b3c0 (patch) | |
tree | 5b294188ca2e83665bb3a1aeb6d8dd3bb67a9c0f /ctdb/include/ctdb_private.h | |
parent | d9e4622a446c9ed60771c508638fb89055320f03 (diff) | |
download | samba-374cbc7b0ff68e04ee4e395935509c7df817b3c0.tar.gz samba-374cbc7b0ff68e04ee4e395935509c7df817b3c0.tar.xz samba-374cbc7b0ff68e04ee4e395935509c7df817b3c0.zip |
ctdb-locking: Talloc lock request from client specified context
This makes sure that when the client context is destroyed, the lock
request goes away. If the lock requests is already scheduled, then the
lock child process will be terminated.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
Diffstat (limited to 'ctdb/include/ctdb_private.h')
-rw-r--r-- | ctdb/include/ctdb_private.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index 36ebe70ac0..7de9afbf14 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -1582,24 +1582,28 @@ int ctdb_lockall_unmark_prio(struct ctdb_context *ctdb, uint32_t priority); void ctdb_lock_free_request_context(struct lock_request *lock_req); -struct lock_request *ctdb_lock_record(struct ctdb_db_context *ctdb_db, +struct lock_request *ctdb_lock_record(TALLOC_CTX *mem_ctx, + struct ctdb_db_context *ctdb_db, TDB_DATA key, bool auto_mark, void (*callback)(void *, bool), void *private_data); -struct lock_request *ctdb_lock_db(struct ctdb_db_context *ctdb_db, +struct lock_request *ctdb_lock_db(TALLOC_CTX *mem_ctx, + struct ctdb_db_context *ctdb_db, bool auto_mark, void (*callback)(void *, bool), void *private_data); -struct lock_request *ctdb_lock_alldb_prio(struct ctdb_context *ctdb, +struct lock_request *ctdb_lock_alldb_prio(TALLOC_CTX *mem_ctx, + struct ctdb_context *ctdb, uint32_t priority, bool auto_mark, void (*callback)(void *, bool), void *private_data); -struct lock_request *ctdb_lock_alldb(struct ctdb_context *ctdb, +struct lock_request *ctdb_lock_alldb(TALLOC_CTX *mem_ctx, + struct ctdb_context *ctdb, bool auto_mark, void (*callback)(void *, bool), void *private_data); |