summaryrefslogtreecommitdiff
path: root/ctdb
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2023-03-22 09:36:23 +0100
committerAndreas Schneider <asn@cryptomilk.org>2023-03-24 07:01:31 +0000
commit7749df49924ef30108880580b271657b923639d3 (patch)
tree079b0e97bf166f9b2f926a6e26e1f16c06825334 /ctdb
parent19f418b68feee62d50ce092af848c9dd474b60b3 (diff)
downloadsamba-7749df49924ef30108880580b271657b923639d3.tar.gz
ctdb:server: Fix code spelling
Best reviewed with: `git show --word-diff` Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Martin Schwenke <mschwenke@ddn.com>
Diffstat (limited to 'ctdb')
-rw-r--r--ctdb/server/ctdb_call.c2
-rw-r--r--ctdb/server/ctdb_daemon.c74
-rw-r--r--ctdb/server/ctdb_ltdb_server.c4
-rw-r--r--ctdb/server/ctdb_recover.c8
-rw-r--r--ctdb/server/ctdb_recoverd.c4
-rw-r--r--ctdb/server/ctdb_recovery_helper.c4
-rw-r--r--ctdb/server/ctdb_server.c2
-rw-r--r--ctdb/server/ctdb_takeover.c6
-rw-r--r--ctdb/server/ctdb_vacuum.c6
-rw-r--r--ctdb/server/ipalloc_common.c2
-rw-r--r--ctdb/server/ipalloc_lcp2.c8
-rw-r--r--ctdb/server/ipalloc_nondeterministic.c4
12 files changed, 62 insertions, 62 deletions
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index 1d5dea32962..cef271958c5 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -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;
}
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index edd7d57532b..da60144bf2e 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -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);
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c
index b6c7630bea3..83762d97925 100644
--- a/ctdb/server/ctdb_ltdb_server.c
+++ b/ctdb/server/ctdb_ltdb_server.c
@@ -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,
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c
index 1ca05c17f43..7b30d119a3a 100644
--- a/ctdb/server/ctdb_recover.c
+++ b/ctdb/server/ctdb_recover.c
@@ -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,
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index 9d2cb6af9c9..893af8f1f4f 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -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],
diff --git a/ctdb/server/ctdb_recovery_helper.c b/ctdb/server/ctdb_recovery_helper.c
index e0d32199ab9..f3576474144 100644
--- a/ctdb/server/ctdb_recovery_helper.c
+++ b/ctdb/server/ctdb_recovery_helper.c
@@ -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;
diff --git a/ctdb/server/ctdb_server.c b/ctdb/server/ctdb_server.c
index 343c93bc90c..b602ceebc0e 100644
--- a/ctdb/server/ctdb_server.c
+++ b/ctdb/server/ctdb_server.c
@@ -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;
}
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index 4d2d0416752..26cca1aefff 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -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)) {
diff --git a/ctdb/server/ctdb_vacuum.c b/ctdb/server/ctdb_vacuum.c
index 74d7215bbe8..35297b9daa2 100644
--- a/ctdb/server/ctdb_vacuum.c
+++ b/ctdb/server/ctdb_vacuum.c
@@ -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,
diff --git a/ctdb/server/ipalloc_common.c b/ctdb/server/ipalloc_common.c
index 437c5114ebb..a5177d41dc6 100644
--- a/ctdb/server/ipalloc_common.c
+++ b/ctdb/server/ipalloc_common.c
@@ -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;
}
diff --git a/ctdb/server/ipalloc_lcp2.c b/ctdb/server/ipalloc_lcp2.c
index bc2936bb76e..996adcf5826 100644
--- a/ctdb/server/ipalloc_lcp2.c
+++ b/ctdb/server/ipalloc_lcp2.c
@@ -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);
diff --git a/ctdb/server/ipalloc_nondeterministic.c b/ctdb/server/ipalloc_nondeterministic.c
index 1e70c8b78a2..9da7d6c2221 100644
--- a/ctdb/server/ipalloc_nondeterministic.c
+++ b/ctdb/server/ipalloc_nondeterministic.c
@@ -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);