summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmitay Isaacs <amitay@gmail.com>2013-05-08 10:42:08 +1000
committerAmitay Isaacs <amitay@gmail.com>2013-05-24 09:06:40 +1000
commit1ddc7b0d10d317755f07e4a6a72a50390c2d7c96 (patch)
tree758a89865952fe6efa9e84e44dce5dad3317be6f
parent90c4fa77b9b78ef6d16715bf4d76fee3bc667d52 (diff)
downloadsamba-1ddc7b0d10d317755f07e4a6a72a50390c2d7c96.tar.gz
samba-1ddc7b0d10d317755f07e4a6a72a50390c2d7c96.tar.xz
samba-1ddc7b0d10d317755f07e4a6a72a50390c2d7c96.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 c660f33c3eaa1b4a2c4e951c1982979e57374ed4)
-rw-r--r--ctdb/include/ctdb_private.h2
-rw-r--r--ctdb/server/ctdb_lock.c84
2 files changed, 0 insertions, 86 deletions
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 813a5a661c2..c47210e1f0a 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -1564,8 +1564,6 @@ int ctdb_start_monitoring_interfaces(struct ctdb_context *ctdb);
/* from server/ctdb_lock.c */
struct lock_request;
-int ctdb_lockall_prio(struct ctdb_context *ctdb, uint32_t priority);
-int ctdb_unlockall_prio(struct ctdb_context *ctdb, uint32_t priority);
int ctdb_lockall_mark_prio(struct ctdb_context *ctdb, uint32_t priority);
int ctdb_lockall_unmark_prio(struct ctdb_context *ctdb, uint32_t priority);
diff --git a/ctdb/server/ctdb_lock.c b/ctdb/server/ctdb_lock.c
index d21d00f8c45..d2482282aa4 100644
--- a/ctdb/server/ctdb_lock.c
+++ b/ctdb/server/ctdb_lock.c
@@ -156,90 +156,6 @@ static int ctdb_db_iterator(struct ctdb_context *ctdb, uint32_t priority,
/*
- * lock all databases
- */
-static int db_lock_handler(struct ctdb_db_context *ctdb_db, uint32_t priority,
- void *private_data)
-{
- if (priority == 0) {
- DEBUG(DEBUG_INFO, ("locking database %s\n",
- ctdb_db->db_name));
- } else {
- DEBUG(DEBUG_INFO, ("locking database %s, priority:%u\n",
- ctdb_db->db_name, priority));
- }
-
- if (tdb_lockall(ctdb_db->ltdb->tdb) != 0) {
- DEBUG(DEBUG_ERR, ("Failed to lock database %s\n",
- ctdb_db->db_name));
- return -1;
- }
-
- return 0;
-}
-
-int ctdb_lockall_prio(struct ctdb_context *ctdb, uint32_t priority)
-{
- return ctdb_db_iterator(ctdb, priority, db_lock_handler, NULL);
-}
-
-static int ctdb_lockall(struct ctdb_context *ctdb)
-{
- uint32_t priority;
-
- for (priority=1; priority<=NUM_DB_PRIORITIES; priority++) {
- if (ctdb_db_iterator(ctdb, priority, db_lock_handler, NULL) != 0) {
- return -1;
- }
- }
-
- return 0;
-}
-
-
-/*
- * unlock all databases
- */
-static int db_unlock_handler(struct ctdb_db_context *ctdb_db, uint32_t priority,
- void *private_data)
-{
- if (priority == 0) {
- DEBUG(DEBUG_INFO, ("unlocking database %s\n",
- ctdb_db->db_name));
- } else {
- DEBUG(DEBUG_INFO, ("unlocking database %s, priority:%u\n",
- ctdb_db->db_name, priority));
- }
-
- if (tdb_unlockall(ctdb_db->ltdb->tdb) != 0) {
- DEBUG(DEBUG_ERR, ("Failed to unlock database %s\n",
- ctdb_db->db_name));
- return -1;
- }
-
- return 0;
-}
-
-int ctdb_unlockall_prio(struct ctdb_context *ctdb, uint32_t priority)
-{
- return ctdb_db_iterator(ctdb, priority, db_unlock_handler, NULL);
-}
-
-static int ctdb_unlockall(struct ctdb_context *ctdb)
-{
- uint32_t priority;
-
- for (priority=NUM_DB_PRIORITIES; priority>=0; priority--) {
- if (ctdb_db_iterator(ctdb, priority, db_unlock_handler, NULL) != 0) {
- return -1;
- }
- }
-
- return 0;
-}
-
-
-/*
* lock all databases - mark only
*/
static int db_lock_mark_handler(struct ctdb_db_context *ctdb_db, uint32_t priority,