]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb-client: Remove ctdb_ctrl_freeze_priority() function
authorAmitay Isaacs <amitay@gmail.com>
Fri, 22 Jul 2016 05:00:14 +0000 (15:00 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 25 Jul 2016 19:29:42 +0000 (21:29 +0200)
ctdb_ctrl_freeze() now only needs to send a single control since there
are no database priorities any more.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
ctdb/client/ctdb_client.c

index 00a0f172cb98e8ba269b48925e4c8060cad6af48..bc9351ddf009c2540788ea02136dbb5127f01aaa 100644 (file)
@@ -2427,17 +2427,14 @@ int ctdb_ctrl_getpid(struct ctdb_context *ctdb, struct timeval timeout, uint32_t
        return 0;
 }
 
-/*
-  freeze databases of a certain priority
- */
-static int ctdb_ctrl_freeze_priority(struct ctdb_context *ctdb,
-                                    struct timeval timeout,
-                                    uint32_t destnode, uint32_t priority)
+/* Freeze all databases */
+int ctdb_ctrl_freeze(struct ctdb_context *ctdb, struct timeval timeout,
+                    uint32_t destnode)
 {
        int ret;
        int32_t res;
 
-       ret = ctdb_control(ctdb, destnode, priority,
+       ret = ctdb_control(ctdb, destnode, 0,
                           CTDB_CONTROL_FREEZE, 0, tdb_null,
                           NULL, NULL, &res, &timeout, NULL);
        if (ret != 0 || res != 0) {
@@ -2448,19 +2445,6 @@ static int ctdb_ctrl_freeze_priority(struct ctdb_context *ctdb,
        return 0;
 }
 
-/* Freeze all databases */
-int ctdb_ctrl_freeze(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode)
-{
-       int i;
-
-       for (i=1; i<=NUM_DB_PRIORITIES; i++) {
-               if (ctdb_ctrl_freeze_priority(ctdb, timeout, destnode, i) != 0) {
-                       return -1;
-               }
-       }
-       return 0;
-}
-
 /*
   get pnn of a node, or -1
  */