[sheepdog] [PATCH 05/10] cluster: fix typo

Ruoyu liangry at ucweb.com
Tue Aug 5 09:30:26 CEST 2014


Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 sheep/cluster.h           |  2 +-
 sheep/cluster/corosync.c  |  4 ++--
 sheep/cluster/zookeeper.c | 10 +++++-----
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/sheep/cluster.h b/sheep/cluster.h
index 0693633..cc111e2 100644
--- a/sheep/cluster.h
+++ b/sheep/cluster.h
@@ -57,7 +57,7 @@ struct cluster_driver {
 	 * sd_join_handler() and sd_accept_handler().
 	 *
 	 * sd_join_handler() must be called on at least one node which already
-	 * paticipates in the cluster.  If the content of 'opaque' is changed in
+	 * participates in the cluster. If the content of 'opaque' is changed in
 	 * sd_join_handler(), the updated 'opaque' must be passed to
 	 * sd_accept_handler().
 	 *
diff --git a/sheep/cluster/corosync.c b/sheep/cluster/corosync.c
index 6974dd9..cd00733 100644
--- a/sheep/cluster/corosync.c
+++ b/sheep/cluster/corosync.c
@@ -366,9 +366,9 @@ static void __corosync_dispatch(void)
 	if (poll(&pfd, 1, 0)) {
 		/*
 		 * Corosync dispatches leave events one by one even
-		 * when network partition has occured.  To count the
+		 * when network partition has occurred.  To count the
 		 * number of alive nodes correctly, we postpone
-		 * processsing events if there are incoming ones.
+		 * processing events if there are incoming ones.
 		 */
 		sd_debug("wait for a next dispatch event");
 		return;
diff --git a/sheep/cluster/zookeeper.c b/sheep/cluster/zookeeper.c
index c99d5d0..5c181e1 100644
--- a/sheep/cluster/zookeeper.c
+++ b/sheep/cluster/zookeeper.c
@@ -1260,10 +1260,10 @@ static void zk_event_handler(int listen_fd, int events, void *data)
 	}
 kick_block_event:
 	/*
-	 * Kick block event only if there is no nonblock event. We perfer to
-	 * handle nonblock event becasue:
+	 * Kick block event only if there is no nonblock event. We prefer to
+	 * handle nonblock event because:
 	 *
-	 * 1. Sheep assuems that unblock() and notify() is a transaction, so we
+	 * 1. Sheep assumes that unblock() and notify() is a transaction, so we
 	 *    can only kick next block event after sd_notify_handler() is called
 	 * 2. We should process leave/join event as soon as possible.
 	 */
@@ -1312,7 +1312,7 @@ create_seq_node:
 			 * We don't need to check the return code of
 			 * zk_init_node() because the routine must stay in loop
 			 * if it doesn't take the lock, no matter what kind of
-			 * error happed.
+			 * error happened.
 			 */
 			continue;
 		}
@@ -1369,7 +1369,7 @@ static int zk_init(const char *option)
 	hosts = strtok((char *)option, "=");
 	if ((to = strtok(NULL, "="))) {
 		if (sscanf(to, "%u", &zk_timeout) != 1) {
-			sd_err("Invalid paramter for timeout");
+			sd_err("Invalid parameter for timeout");
 			return -1;
 		}
 		p = strstr(hosts, "timeout");
-- 
1.8.3.2





More information about the sheepdog mailing list