ctdb:server: Fix code spelling
authorAndreas Schneider <asn@samba.org>
Wed, 22 Mar 2023 08:36:23 +0000 (09:36 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 24 Mar 2023 07:01:31 +0000 (07:01 +0000)
Best reviewed with: `git show --word-diff`

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
12 files changed:
ctdb/server/ctdb_call.c
ctdb/server/ctdb_daemon.c
ctdb/server/ctdb_ltdb_server.c
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_recoverd.c
ctdb/server/ctdb_recovery_helper.c
ctdb/server/ctdb_server.c
ctdb/server/ctdb_takeover.c
ctdb/server/ctdb_vacuum.c
ctdb/server/ipalloc_common.c
ctdb/server/ipalloc_lcp2.c
ctdb/server/ipalloc_nondeterministic.c

index 1d5dea32962b30f3bec86a6709012a1aea0b6824..cef271958c5fff54d2badcf353681a754be94263 100644 (file)
@@ -189,7 +189,7 @@ static void ctdb_send_dmaster_reply(struct ctdb_db_context *ctdb_db,
        }
 
        if (ctdb->methods == NULL) {
-               ctdb_fatal(ctdb, "ctdb_send_dmaster_reply cant update dmaster since transport is down");
+               ctdb_fatal(ctdb, "ctdb_send_dmaster_reply can't update dmaster since transport is down");
                return;
        }
 
index edd7d57532b6af82980e11230db02435cfee3541..da60144bf2eba9dffe60a071f80bd84d087d5b41 100644 (file)
@@ -1,4 +1,4 @@
-/* 
+/*
    ctdb daemon code
 
    Copyright (C) Andrew Tridgell  2006
@@ -7,12 +7,12 @@
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 3 of the License, or
    (at your option) any later version.
-   
+
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
-   
+
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.
 */
@@ -294,7 +294,7 @@ static void daemon_message_handler(uint64_t srvid, TDB_DATA data,
 }
 
 /*
-  this is called when the ctdb daemon received a ctdb request to 
+  this is called when the ctdb daemon received a ctdb request to
   set the srvid from the client
  */
 int daemon_register_message_handler(struct ctdb_context *ctdb, uint32_t client_id, uint64_t srvid)
@@ -308,10 +308,10 @@ int daemon_register_message_handler(struct ctdb_context *ctdb, uint32_t client_i
        res = srvid_register(ctdb->srv, client, srvid, daemon_message_handler,
                             client);
        if (res != 0) {
-               DEBUG(DEBUG_ERR,(__location__ " Failed to register handler %llu in daemon\n", 
+               DEBUG(DEBUG_ERR,(__location__ " Failed to register handler %llu in daemon\n",
                         (unsigned long long)srvid));
        } else {
-               DEBUG(DEBUG_INFO,(__location__ " Registered message handler for srvid=%llu\n", 
+               DEBUG(DEBUG_INFO,(__location__ " Registered message handler for srvid=%llu\n",
                         (unsigned long long)srvid));
        }
 
@@ -319,7 +319,7 @@ int daemon_register_message_handler(struct ctdb_context *ctdb, uint32_t client_i
 }
 
 /*
-  this is called when the ctdb daemon received a ctdb request to 
+  this is called when the ctdb daemon received a ctdb request to
   remove a srvid from the client
  */
 int daemon_deregister_message_handler(struct ctdb_context *ctdb, uint32_t client_id, uint64_t srvid)
@@ -399,7 +399,7 @@ static int ctdb_client_destructor(struct ctdb_client *client)
   this is called when the ctdb daemon received a ctdb request message
   from a local client over the unix domain socket
  */
-static void daemon_request_message_from_client(struct ctdb_client *client, 
+static void daemon_request_message_from_client(struct ctdb_client *client,
                                               struct ctdb_req_message_old *c)
 {
        TDB_DATA data;
@@ -438,12 +438,12 @@ struct daemon_call_state {
        uint32_t client_callid;
 };
 
-/* 
-   complete a call from a client 
+/*
+   complete a call from a client
 */
 static void daemon_call_from_client_callback(struct ctdb_call_state *state)
 {
-       struct daemon_call_state *dstate = talloc_get_type(state->async.private_data, 
+       struct daemon_call_state *dstate = talloc_get_type(state->async.private_data,
                                                           struct daemon_call_state);
        struct ctdb_reply_call_old *r;
        int res;
@@ -464,7 +464,7 @@ static void daemon_call_from_client_callback(struct ctdb_call_state *state)
        }
 
        length = offsetof(struct ctdb_reply_call_old, data) + dstate->call->reply_data.dsize;
-       /* If the client asked for readonly FETCH, we remapped this to 
+       /* If the client asked for readonly FETCH, we remapped this to
           FETCH_WITH_HEADER when calling the daemon. So we must
           strip the extra header off the reply data before passing
           it back to the client.
@@ -474,7 +474,7 @@ static void daemon_call_from_client_callback(struct ctdb_call_state *state)
                length -= sizeof(struct ctdb_ltdb_header);
        }
 
-       r = ctdbd_allocate_pkt(client->ctdb, dstate, CTDB_REPLY_CALL, 
+       r = ctdbd_allocate_pkt(client->ctdb, dstate, CTDB_REPLY_CALL,
                               length, struct ctdb_reply_call_old);
        if (r == NULL) {
                DEBUG(DEBUG_ERR, (__location__ " Failed to allocate reply_call in ctdb daemon\n"));
@@ -521,7 +521,7 @@ struct ctdb_daemon_packet_wrap {
 static void daemon_incoming_packet_wrap(void *p, struct ctdb_req_header *hdr)
 {
        struct ctdb_client *client;
-       struct ctdb_daemon_packet_wrap *w = talloc_get_type(p, 
+       struct ctdb_daemon_packet_wrap *w = talloc_get_type(p,
                                                            struct ctdb_daemon_packet_wrap);
        if (w == NULL) {
                DEBUG(DEBUG_CRIT,(__location__ " Bad packet type '%s'\n", talloc_get_name(p)));
@@ -538,7 +538,7 @@ static void daemon_incoming_packet_wrap(void *p, struct ctdb_req_header *hdr)
        talloc_free(w);
 
        /* process it */
-       daemon_incoming_packet(client, hdr);    
+       daemon_incoming_packet(client, hdr);
 }
 
 struct ctdb_deferred_fetch_call {
@@ -640,7 +640,7 @@ static void dfq_timeout(struct tevent_context *ev, struct tevent_timer *te,
 
 /* This function is used in the local daemon to register a KEY in a database
    for being "fetched"
-   While the remote fetch is in-flight, any futher attempts to re-fetch the
+   While the remote fetch is in-flight, any further attempts to re-fetch the
    same record will be deferred until the fetch completes.
 */
 static int setup_deferred_fetch_locks(struct ctdb_db_context *ctdb_db, struct ctdb_call *call)
@@ -666,7 +666,7 @@ static int setup_deferred_fetch_locks(struct ctdb_db_context *ctdb_db, struct ct
 
        talloc_set_destructor(dfq, deferred_fetch_queue_destructor);
 
-       /* if the fetch havent completed in 30 seconds, just tear it all down
+       /* If the fetch hasn't completed in 30 seconds, just tear it all down
           and let it try again as the events are reissued */
        tevent_add_timer(ctdb_db->ctdb->ev, dfq, timeval_current_ofs(30, 0),
                         dfq_timeout, dfq);
@@ -727,7 +727,7 @@ static int requeue_duplicate_fetch(struct ctdb_db_context *ctdb_db, struct ctdb_
   this is called when the ctdb daemon received a ctdb request call
   from a local client over the unix domain socket
  */
-static void daemon_request_call_from_client(struct ctdb_client *client, 
+static void daemon_request_call_from_client(struct ctdb_client *client,
                                            struct ctdb_req_call_old *c)
 {
        struct ctdb_call_state *state;
@@ -765,12 +765,12 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
        key.dsize = c->keylen;
 
        w = talloc(ctdb, struct ctdb_daemon_packet_wrap);
-       CTDB_NO_MEMORY_VOID(ctdb, w);   
+       CTDB_NO_MEMORY_VOID(ctdb, w);
 
        w->ctdb = ctdb;
        w->client_id = client->client_id;
 
-       ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, &header, 
+       ret = ctdb_ltdb_lock_fetch_requeue(ctdb_db, key, &header,
                                           (struct ctdb_req_header *)c, &data,
                                           daemon_incoming_packet_wrap, w, true);
        if (ret == -2) {
@@ -856,7 +856,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
 
                CTDB_DECREMENT_STAT(ctdb, pending_calls);
                return;
-       }               
+       }
 
        dstate = talloc(client, struct daemon_call_state);
        if (dstate == NULL) {
@@ -895,7 +895,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
        call->flags = c->flags;
 
        if (c->flags & CTDB_WANT_READONLY) {
-               /* client wants readonly record, so translate this into a 
+               /* client wants readonly record, so translate this into a
                   fetch with header. remember what the client asked for
                   so we can remap the reply back to the proper format for
                   the client in the reply
@@ -938,7 +938,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
 }
 
 
-static void daemon_request_control_from_client(struct ctdb_client *client, 
+static void daemon_request_control_from_client(struct ctdb_client *client,
                                               struct ctdb_req_control_old *c);
 static void daemon_request_tunnel_from_client(struct ctdb_client *client,
                                              struct ctdb_req_tunnel_old *c);
@@ -1013,7 +1013,7 @@ static void ctdb_daemon_read_cb(uint8_t *data, size_t cnt, void *args)
        CTDB_INCREMENT_STAT(client->ctdb, client_packets_recv);
 
        if (cnt < sizeof(*hdr)) {
-               ctdb_set_error(client->ctdb, "Bad packet length %u in daemon\n", 
+               ctdb_set_error(client->ctdb, "Bad packet length %u in daemon\n",
                               (unsigned)cnt);
                return;
        }
@@ -1149,14 +1149,14 @@ static void ctdb_accept_client(struct tevent_context *ev,
                close(fd);
                talloc_free(client);
                return;
-       }               
+       }
        client_pid->ctdb   = ctdb;
        client_pid->pid    = peer_pid;
        client_pid->client = client;
 
        DLIST_ADD(ctdb->client_pids, client_pid);
 
-       client->queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT, 
+       client->queue = ctdb_queue_setup(ctdb, client, fd, CTDB_DS_ALIGNMENT,
                                         ctdb_daemon_read_cb, client,
                                         "client-%u", client->pid);
 
@@ -1708,8 +1708,8 @@ int ctdb_start_daemon(struct ctdb_context *ctdb,
   allocate a packet for use in daemon<->daemon communication
  */
 struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
-                                                TALLOC_CTX *mem_ctx, 
-                                                enum ctdb_operation operation, 
+                                                TALLOC_CTX *mem_ctx,
+                                                enum ctdb_operation operation,
                                                 size_t length, size_t slength,
                                                 const char *type)
 {
@@ -1740,7 +1740,7 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
        hdr->generation   = ctdb->vnn_map->generation;
        hdr->srcnode      = ctdb->pnn;
 
-       return hdr;     
+       return hdr;
 }
 
 struct daemon_control_state {
@@ -1755,11 +1755,11 @@ struct daemon_control_state {
   callback when a control reply comes in
  */
 static void daemon_control_callback(struct ctdb_context *ctdb,
-                                   int32_t status, TDB_DATA data, 
+                                   int32_t status, TDB_DATA data,
                                    const char *errormsg,
                                    void *private_data)
 {
-       struct daemon_control_state *state = talloc_get_type(private_data, 
+       struct daemon_control_state *state = talloc_get_type(private_data,
                                                             struct daemon_control_state);
        struct ctdb_client *client = state->client;
        struct ctdb_reply_control_old *r;
@@ -1771,7 +1771,7 @@ static void daemon_control_callback(struct ctdb_context *ctdb,
        if (errormsg) {
                len += strlen(errormsg);
        }
-       r = ctdbd_allocate_pkt(ctdb, state, CTDB_REPLY_CONTROL, len, 
+       r = ctdbd_allocate_pkt(ctdb, state, CTDB_REPLY_CONTROL, len,
                               struct ctdb_reply_control_old);
        CTDB_NO_MEMORY_VOID(ctdb, r);
 
@@ -1799,7 +1799,7 @@ void ctdb_daemon_cancel_controls(struct ctdb_context *ctdb, struct ctdb_node *no
        struct daemon_control_state *state;
        while ((state = node->pending_controls)) {
                DLIST_REMOVE(node->pending_controls, state);
-               daemon_control_callback(ctdb, (uint32_t)-1, tdb_null, 
+               daemon_control_callback(ctdb, (uint32_t)-1, tdb_null,
                                        "node is disconnected", state);
        }
 }
@@ -1819,7 +1819,7 @@ static int daemon_control_destructor(struct daemon_control_state *state)
   this is called when the ctdb daemon received a ctdb request control
   from a local client over the unix domain socket
  */
-static void daemon_request_control_from_client(struct ctdb_client *client, 
+static void daemon_request_control_from_client(struct ctdb_client *client,
                                               struct ctdb_req_control_old *c)
 {
        TDB_DATA data;
@@ -1849,7 +1849,7 @@ static void daemon_request_control_from_client(struct ctdb_client *client,
        if (c->flags & CTDB_CTRL_FLAG_NOREPLY) {
                talloc_steal(tmp_ctx, state);
        }
-       
+
        data.dptr = &c->data[0];
        data.dsize = c->datalen;
        res = ctdb_daemon_send_control(client->ctdb, c->hdr.destnode,
@@ -1916,7 +1916,7 @@ int ctdb_daemon_set_call(struct ctdb_context *ctdb, uint32_t db_id,
        call->fn = fn;
        call->id = id;
 
-       DLIST_ADD(ctdb_db->calls, call);        
+       DLIST_ADD(ctdb_db->calls, call);
        return 0;
 }
 
@@ -2066,7 +2066,7 @@ int32_t ctdb_control_register_notify(struct ctdb_context *ctdb, uint32_t client_
        nl->data.dptr  = talloc_memdup(nl, notify->notify_data,
                                       nl->data.dsize);
        CTDB_NO_MEMORY(ctdb, nl->data.dptr);
-       
+
        DLIST_ADD(client->notify, nl);
        talloc_set_destructor(nl, ctdb_client_notify_destructor);
 
index b6c7630bea3bc8325b0b2249280db7aac234639e..83762d97925931b85b2ce03af9a39239a7cbea6c 100644 (file)
@@ -51,7 +51,7 @@
  * This is the server-variant of the ctdb_ltdb_store function.
  * It contains logic to determine whether a record should be
  * stored or deleted. It also sends SCHEDULE_FOR_DELETION
- * controls to the local ctdb daemon if apporpriate.
+ * controls to the local ctdb daemon if appropriate.
  */
 static int ctdb_ltdb_store_server(struct ctdb_db_context *ctdb_db,
                                  TDB_DATA key,
@@ -341,7 +341,7 @@ int ctdb_ltdb_lock_requeue(struct ctdb_db_context *ctdb_db,
 }
 
 /*
-  a varient of ctdb_ltdb_lock_requeue that also fetches the record
+  a variant of ctdb_ltdb_lock_requeue that also fetches the record
  */
 int ctdb_ltdb_lock_fetch_requeue(struct ctdb_db_context *ctdb_db, 
                                 TDB_DATA key, struct ctdb_ltdb_header *header, 
index 1ca05c17f433415f69f5252eb07c02a1fd8b6d32..7b30d119a3a4a0afad20251e11804ad037e7c14d 100644 (file)
@@ -368,7 +368,7 @@ static void db_push_msg_handler(uint64_t srvid, TDB_DATA indata,
 
                hdr = (struct ctdb_ltdb_header *)data.dptr;
                /* Strip off any read only record flags.
-                * All readonly records are revoked implicitely by a recovery.
+                * All readonly records are revoked implicitly by a recovery.
                 */
                hdr->flags &= ~CTDB_REC_RO_FLAGS;
 
@@ -1061,7 +1061,7 @@ int32_t ctdb_control_try_delete_records(struct ctdb_context *ctdb, TDB_DATA inda
                 reply->count, reply->db_id));
 
 
-       /* create a blob to send back the records we couldnt delete */  
+       /* create a blob to send back the records we couldn't delete */
        records = (struct ctdb_marshall_buffer *)
                        talloc_zero_size(outdata,
                                    offsetof(struct ctdb_marshall_buffer, data));
@@ -1087,7 +1087,7 @@ int32_t ctdb_control_try_delete_records(struct ctdb_context *ctdb, TDB_DATA inda
                        return -1;
                }
 
-               /* If we cant delete the record we must add it to the reply
+               /* If we can't delete the record we must add it to the reply
                   so the lmaster knows it may not purge this record
                */
                if (delete_tdb_record(ctdb, ctdb_db, rec) != 0) {
@@ -1137,7 +1137,7 @@ int32_t ctdb_control_get_capabilities(struct ctdb_context *ctdb, TDB_DATA *outda
 }
 
 /* The recovery daemon will ping us at regular intervals.
-   If we havent been pinged for a while we assume the recovery
+   If we haven't been pinged for a while we assume the recovery
    daemon is inoperable and we restart.
 */
 static void ctdb_recd_ping_timeout(struct tevent_context *ev,
index 9d2cb6af9c91dd601715b7d3b728be294ba79eb7..893af8f1f4f8709b43ffdf6a026513fdfc1b9015 100644 (file)
@@ -650,7 +650,7 @@ static int leader_broadcast_send(struct ctdb_recoverd *rec, uint32_t pnn)
 static int leader_broadcast_loop(struct ctdb_recoverd *rec);
 static void cluster_lock_release(struct ctdb_recoverd *rec);
 
-/* This runs continously but only sends the broadcast when leader */
+/* This runs continuously but only sends the broadcast when leader */
 static void leader_broadcast_loop_handler(struct tevent_context *ev,
                                          struct tevent_timer *te,
                                          struct timeval current_time,
@@ -1245,7 +1245,7 @@ static bool do_takeover_run(struct ctdb_recoverd *rec,
 
        ret = ctdb_takeover(rec, rec->force_rebalance_nodes);
 
-       /* Reenable takeover runs and IP checks on other nodes */
+       /* Re-enable takeover runs and IP checks on other nodes */
        dtr.timeout = 0;
        for (i = 0; i < talloc_array_length(nodes); i++) {
                if (ctdb_client_send_message(rec->ctdb, nodes[i],
index e0d32199ab90413e68f08b1d6a017f6b23997ba9..f3576474144ca94d1588daee7d00761239832e40 100644 (file)
@@ -261,7 +261,7 @@ static int db_list_check_and_add(struct db_list *dblist,
        /*
         * These flags are masked out because they are only set on a
         * node when a client attaches to that node, so they might not
-        * be set yet.  They can't be passed as part of the attch, so
+        * be set yet.  They can't be passed as part of the attach, so
         * they're no use here.
         */
        db_flags &= ~(CTDB_DB_FLAGS_READONLY | CTDB_DB_FLAGS_STICKY);
@@ -2297,7 +2297,7 @@ static void ban_node_check_done(struct tevent_req *subreq)
        talloc_free(nodemap);
        talloc_free(reply);
 
-       /* If node becames inactive during recovery, pick next */
+       /* If node becomes inactive during recovery, pick next */
        if (state->max_pnn == CTDB_UNKNOWN_PNN) {
                (void) ban_node_check(req);
                return;
index 343c93bc90c45f7a82335c40203ce436e02f1903..b602ceebc0e68a2d770d9cc9f22c0d445f7a50fb 100644 (file)
@@ -461,7 +461,7 @@ void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
        CTDB_INCREMENT_STAT(ctdb, node_packets_sent);
 
        if (!ctdb_validate_pnn(ctdb, hdr->destnode)) {
-               DEBUG(DEBUG_CRIT,(__location__ " cant send to node %u that does not exist\n", 
+               DEBUG(DEBUG_CRIT,(__location__ " can't send to node %u that does not exist\n",
                         hdr->destnode));
                return;
        }
index 4d2d041675287fd3977042efeee92936a0e4d3c1..26cca1aefff99fca80adac2fb11a355cc1819c65 100644 (file)
@@ -967,7 +967,7 @@ int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
        /* RELEASE_IP controls are sent to all nodes that should not
         * be hosting a particular IP.  This serves 2 purposes.  The
         * first is to help resolve any inconsistencies.  If a node
-        * does unexpectly host an IP then it will be released.  The
+        * does unexpectedly host an IP then it will be released.  The
         * 2nd is to use a "redundant release" to tell non-takeover
         * nodes where an IP is moving to.  This is how "ctdb ip" can
         * report the (likely) location of an IP by only asking the
@@ -1492,7 +1492,7 @@ static void ctdb_remove_connection(struct ctdb_vnn *vnn, struct ctdb_connection
                return;
        }
 
-       /* if the array is empty we cant remove it
+       /* if the array is empty we can't remove it
           and we don't need to do anything
         */
        if (vnn->tcp_array == NULL) {
@@ -1904,7 +1904,7 @@ int32_t ctdb_control_set_tcp_tickle_list(struct ctdb_context *ctdb, TDB_DATA ind
        struct ctdb_tcp_array *tcparray;
        struct ctdb_vnn *vnn;
 
-       /* We must at least have tickles.num or else we cant verify the size
+       /* We must at least have tickles.num or else we can't verify the size
           of the received data blob
         */
        if (indata.dsize < offsetof(struct ctdb_tickle_list_old, connections)) {
index 74d7215bbe80563cf52d916d8bdbc23e84033108..35297b9daa29e34653240df47b7b693e0f06b0b6 100644 (file)
@@ -880,7 +880,7 @@ static void ctdb_process_vacuum_fetch_lists(struct ctdb_db_context *ctdb_db,
  * not be deleted when leaving a node.
  *
  * In this step, the lmaster does the final deletion of those empty
- * records that it is also dmaster for. It has ususally received
+ * records that it is also dmaster for. It has usually received
  * at least some of these records previously from the former dmasters
  * with the vacuum fetch message.
  *
@@ -1054,7 +1054,7 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db,
        }
 
        if (vdata->count.delete_list.left != 0) {
-               DEBUG(DEBUG_ERR, (__location__ " Vaccum db[%s] error: "
+               DEBUG(DEBUG_ERR, (__location__ " Vacuum db[%s] error: "
                      "there are %u records left for deletion after "
                      "processing delete list\n",
                      ctdb_db->db_name,
@@ -1263,7 +1263,7 @@ static int ctdb_vacuum_db(struct ctdb_db_context *ctdb_db,
 }
 
 /*
- * repack and vaccum a db
+ * repack and vacuum a db
  * called from the child context
  */
 static int ctdb_vacuum_and_repack_db(struct ctdb_db_context *ctdb_db,
index 437c5114ebb340fb32a0c8cb8e9adfce609ec29a..a5177d41dc6bd8a0657b0640f98d704db224bfc1 100644 (file)
@@ -90,7 +90,7 @@ int find_takeover_node(struct ipalloc_state *ipalloc_state,
        for (i=0; i<numnodes; i++) {
                /* verify that this node can serve this ip */
                if (!can_node_takeover_ip(ipalloc_state, i, ip)) {
-                       /* no it couldnt   so skip to the next node */
+                       /* no it couldn't   so skip to the next node */
                        continue;
                }
 
index bc2936bb76ee72fb2d09e42462a2eee241858684..996adcf5826c2595cbf38ca1a4793e7aa4ab6d1c 100644 (file)
@@ -90,7 +90,7 @@ static uint32_t ip_distance_2_sum(ctdb_sock_addr *ip,
                 * between an address and itself.  This allows us to
                 * calculate the effect of removing an address from a
                 * node by simply calculating the distance between
-                * that address and all of the exitsing addresses.
+                * that address and all of the existing addresses.
                 * Moreover, we assume that we're only ever dealing
                 * with addresses from all_ips so we can identify an
                 * address via a pointer rather than doing a more
@@ -232,7 +232,7 @@ static void lcp2_allocate_unassigned(struct ipalloc_state *ipalloc_state,
                                if (!can_node_takeover_ip(ipalloc_state,
                                                          dstnode,
                                                          t)) {
-                                       /* no it couldnt   so skip to the next node */
+                                       /* no it couldn't   so skip to the next node */
                                        continue;
                                }
 
@@ -354,7 +354,7 @@ static bool lcp2_failback_candidate(struct ipalloc_state *ipalloc_state,
                        /* only check nodes that can actually takeover this ip */
                        if (!can_node_takeover_ip(ipalloc_state, dstnode,
                                                  t)) {
-                               /* no it couldnt   so skip to the next node */
+                               /* no it couldn't   so skip to the next node */
                                continue;
                        }
 
@@ -515,7 +515,7 @@ bool ipalloc_lcp2(struct ipalloc_state *ipalloc_state)
                goto finished;
        }
 
-       /* Now, try to make sure the ip adresses are evenly distributed
+       /* Now, try to make sure the ip addresses are evenly distributed
           across the nodes.
        */
        lcp2_failback(ipalloc_state, lcp2_imbalances, rebalance_candidates);
index 1e70c8b78a2adabb2364d52049c27f4f5b9ce630..9da7d6c2221426d6258a70aa70c88ab9324ce168 100644 (file)
@@ -67,7 +67,7 @@ try_again:
                        /* only check nodes that can actually serve this ip */
                        if (!can_node_takeover_ip(ipalloc_state, i,
                                                  t)) {
-                               /* no it couldnt   so skip to the next node */
+                               /* no it couldn't   so skip to the next node */
                                continue;
                        }
 
@@ -141,7 +141,7 @@ bool ipalloc_nondeterministic(struct ipalloc_state *ipalloc_state)
                return true;
        }
 
-       /* Now, try to make sure the ip adresses are evenly distributed
+       /* Now, try to make sure the ip addresses are evenly distributed
           across the nodes.
        */
        basic_failback(ipalloc_state, num_ips);