[sheepdog] [PATCH 03/10] lib: fix typo

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


Signed-off-by: Ruoyu <liangry at ucweb.com>
---
 lib/fec.c          |  2 +-
 lib/logger.c       |  2 +-
 lib/sd_inode.c     |  4 ++--
 lib/sockfd_cache.c |  8 ++++----
 lib/util.c         | 10 +++++-----
 lib/work.c         |  4 ++--
 6 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/lib/fec.c b/lib/fec.c
index d19ad0c..520d0d2 100644
--- a/lib/fec.c
+++ b/lib/fec.c
@@ -332,7 +332,7 @@ found_piv:
 		pivot_row = &src[icol * d];
 		c = pivot_row[icol];
 		assert(c != 0);
-		if (c != 1) {   /* otherwhise this is a NOP */
+		if (c != 1) {   /* otherwise this is a NOP */
 			/*
 			 * this is done often , but optimizing is not so
 			 * fruitful, at least in the obvious ways (unrolling)
diff --git a/lib/logger.c b/lib/logger.c
index 3815ee4..3b77543 100644
--- a/lib/logger.c
+++ b/lib/logger.c
@@ -686,7 +686,7 @@ int log_init(const char *program_name, enum log_dst_type type, int level,
 		/*
 		 * Store the pid of the sheep process for use by the death
 		 * signal handler.  By the time the child is notified of
-		 * the parents death the parent has been reparanted to init
+		 * the parents death the parent has been reparented to init
 		 * and getppid() will always return 1.
 		 */
 		sheep_pid = getpid();
diff --git a/lib/sd_inode.c b/lib/sd_inode.c
index f39fae4..3e69a1f 100644
--- a/lib/sd_inode.c
+++ b/lib/sd_inode.c
@@ -28,7 +28,7 @@
  *  R: root index node
  *  I: Indirect index node
  *  D: data node that hold user data
- *                                                             Detph:
+ *                                                             Depth:
  *     +------------------+-----------+-----------+--------+
  *  R: | sd_index_header  | sd_index | sd_index   | ...... |    1
  *     +------------------+-----------+-----------+--------+
@@ -38,7 +38,7 @@
  *                          +-------+    +-------+
  *
  * After adding more oid into it, the leaf-node will be full of struct sd_index
- * and should be splited to two leaf-nodes, after it, the inode->data_vdi_id[]
+ * and should be split to two leaf-nodes, after it, the inode->data_vdi_id[]
  * should become root-node which store sd_indirect_idx and point to the two
  * leaf-nodes:
  *
diff --git a/lib/sockfd_cache.c b/lib/sockfd_cache.c
index ec06091..a8b86b8 100644
--- a/lib/sockfd_cache.c
+++ b/lib/sockfd_cache.c
@@ -13,7 +13,7 @@
 
 /*
  * The sockfd cache provides us long TCP connections connected to the nodes
- * in the cluster to accerlater the data transfer, which has the following
+ * in the cluster to accelerator the data transfer, which has the following
  * characteristics:
  *    0 dynamically allocated/deallocated at node granularity.
  *    1 cached fds are multiplexed by all threads.
@@ -49,7 +49,7 @@ static struct sockfd_cache sockfd_cache = {
 /*
  * Suppose request size from Guest is 512k, then 4M / 512k = 8, so at
  * most 8 requests can be issued to the same sheep object. Based on this
- * assumption, '8' would be effecient for servers that only host 2~4
+ * assumption, '8' would be efficient for servers that only host 2~4
  * Guests.
  *
  * This fd count will be dynamically grown when the idx reaches watermark which
@@ -321,7 +321,7 @@ grab:
 	entry = sockfd_cache_grab(nid, &idx);
 	if (!entry) {
 		/*
-		 * The node is deleted, but someone askes us to grab it.
+		 * The node is deleted, but someone asks us to grab it.
 		 * The nid is not in the sockfd cache but probably it might be
 		 * still alive due to broken network connection or was just too
 		 * busy to serve any request that makes other nodes deleted it
@@ -478,7 +478,7 @@ void sockfd_cache_del_node(const struct node_id *nid)
 /*
  * Delete a sockfd connected to the node.
  *
- * If it is a long FD, de-refcount it and tres to destroy all the cached FDs of
+ * If it is a long FD, de-refcount it and try to destroy all the cached FDs of
  * this node in the cache.
  * If it is a short FD, just close it.
  */
diff --git a/lib/util.c b/lib/util.c
index 9a3adcd..a5b7532 100644
--- a/lib/util.c
+++ b/lib/util.c
@@ -1,5 +1,5 @@
 /*
- * Taken and modfied from git by Liu Yuan <namei.unix at gmail.com>
+ * Taken and modified from git by Liu Yuan <namei.unix at gmail.com>
  *
  * This program is free software; you can redistribute it and/or
  * modify it under the terms of the GNU General Public License version
@@ -468,7 +468,7 @@ void reraise_crash_signal(int signo, int status)
 			  signo, strsignal(signo));
 	else
 		sd_emerg("default handler for the re-raised "
-			  "signal %d (%s) didn't work expectedly", signo,
+			  "signal %d (%s) didn't work as expected", signo,
 			  strsignal(signo));
 
 	exit(status);
@@ -508,9 +508,9 @@ const char *my_exe_path(void)
 }
 
 /*
- * Split the given path and sets the splitted parts to 'segs'.
+ * Split the given path and sets the split parts to 'segs'.
  *
- * This returns the number of splitted segments.
+ * This returns the number of split segments.
  *
  * For example:
  *   split_path("/a/b/c", 3, segs);
@@ -748,7 +748,7 @@ void list_sort(void *priv, struct list_head *head,
 /*
  * Find zero blocks from the beginning and end of buffer
  *
- * The caller passes the offset of 'buf' with 'poffset' so that this funciton
+ * The caller passes the offset of 'buf' with 'poffset' so that this function
  * can align the return values to BLOCK_SIZE.  'plen' points the length of the
  * buffer.  If there are zero blocks at the beginning of the buffer, this
  * function increases the offset and decreases the length on condition that
diff --git a/lib/work.c b/lib/work.c
index bb919a4..eba59c4 100644
--- a/lib/work.c
+++ b/lib/work.c
@@ -49,7 +49,7 @@ struct wq_info {
 	struct sd_mutex finished_lock;
 	struct sd_mutex startup_lock;
 
-	/* wokers sleep on this and signaled by work producer */
+	/* workers sleep on this and signaled by work producer */
 	struct sd_cond pending_cond;
 	/* locked by work producer and workers */
 	struct sd_mutex pending_lock;
@@ -100,7 +100,7 @@ void suspend_worker_threads(void)
 	/*
 	 * Wait for all the worker thread to suspend.  We cannot use
 	 * wi->nr_threads here because some thread may have not called set_bit()
-	 * yet (then, the thread doesn't recieve SIGUSR2).
+	 * yet (then, the thread doesn't receive SIGUSR2).
 	 */
 	FOR_EACH_BIT(tid, tid_map, tid_max) {
 		eventfd_xread(ack_efd);
-- 
1.8.3.2





More information about the sheepdog mailing list