diff options
author | Amitay Isaacs <amitay@gmail.com> | 2013-04-30 15:13:44 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@gmail.com> | 2013-05-24 09:06:40 +1000 |
commit | 90c4fa77b9b78ef6d16715bf4d76fee3bc667d52 (patch) | |
tree | 42a791af01ad18962868bf4afdb467488cca2f1f /ctdb | |
parent | ae25420e565b46f7c745767b4b7b6ed58bad7d2a (diff) | |
download | samba-90c4fa77b9b78ef6d16715bf4d76fee3bc667d52.tar.gz samba-90c4fa77b9b78ef6d16715bf4d76fee3bc667d52.tar.xz samba-90c4fa77b9b78ef6d16715bf4d76fee3bc667d52.zip |
locking: Remove functions that are not used anymore
These functions were used in locking child process to do the locking. With
locking helper, these are not required.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(This used to be ctdb commit 6ea3212a7b177c6c06b1484cf9e8b2f4036653d9)
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ctdb_lock.c | 91 |
1 files changed, 0 insertions, 91 deletions
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c index 9469835397b..d21d00f8c45 100644 --- a/ctdb/server/ctdb_lock.c +++ b/ctdb/server/ctdb_lock.c @@ -353,68 +353,6 @@ static int ctdb_lockall_unmark(struct ctdb_context *ctdb) } -/* - * Lock record / db depending on lock_ctx->type - * Called from child context. - */ -static bool ctdb_lock_item(struct lock_context *lock_ctx) -{ - bool status = false; - - switch (lock_ctx->type) { - case LOCK_RECORD: - if (tdb_chainlock(lock_ctx->ctdb_db->ltdb->tdb, lock_ctx->key) == 0) { - status = true; - } - break; - - case LOCK_DB: - if (tdb_lockall(lock_ctx->ctdb_db->ltdb->tdb) == 0) { - status = true; - } - break; - - case LOCK_ALLDB_PRIO: - if (ctdb_lockall_prio(lock_ctx->ctdb, lock_ctx->priority) == 0) { - status = true; - } - break; - - case LOCK_ALLDB: - if (ctdb_lockall(lock_ctx->ctdb) == 0) { - status = true; - } - break; - } - - return status; -} - - -/* - * Unlock record / db depending on lock_ctx->type - */ -void ctdb_unlock_item(struct lock_context *lock_ctx) -{ - switch (lock_ctx->type) { - case LOCK_RECORD: - tdb_chainunlock(lock_ctx->ctdb_db->ltdb->tdb, lock_ctx->key); - break; - - case LOCK_DB: - tdb_unlockall(lock_ctx->ctdb_db->ltdb->tdb); - break; - - case LOCK_ALLDB_PRIO: - ctdb_unlockall_prio(lock_ctx->ctdb, lock_ctx->priority); - break; - - case LOCK_ALLDB: - ctdb_unlockall(lock_ctx->ctdb); - break; - } -} - static void ctdb_lock_schedule(struct ctdb_context *ctdb); /* @@ -656,35 +594,6 @@ static void ctdb_lock_timeout_handler(struct tevent_context *ev, } -static char *lock_child_log_prefix(struct lock_context *lock_ctx) -{ - char *prefix; - pid_t pid; - - pid = getpid(); - - switch (lock_ctx->type) { - case LOCK_RECORD: - prefix = talloc_asprintf(NULL, "lockR(%d): ", pid); - break; - - case LOCK_DB: - prefix = talloc_asprintf(NULL, "lockD(%d): ", pid); - break; - - case LOCK_ALLDB_PRIO: - prefix = talloc_asprintf(NULL, "lockP(%d): ", pid); - break; - - case LOCK_ALLDB: - prefix = talloc_asprintf(NULL, "lockA(%d): ", pid); - break; - } - - return prefix; -} - - static int db_count_handler(struct ctdb_db_context *ctdb_db, uint32_t priority, void *private_data) { |