Signed-off-by: Ruoyu <lian...@ucweb.com> --- sheep/journal.c | 12 ++++++------ sheep/request.c | 8 ++++---- sheep/sheep.c | 10 +++++----- sheep/sheep_priv.h | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/sheep/journal.c b/sheep/journal.c index 3c70c13..5beabdf 100644 --- a/sheep/journal.c +++ b/sheep/journal.c @@ -38,7 +38,7 @@ struct journal_descriptor { uint8_t pad[475]; } __packed; -/* JOURNAL_DESC + JOURNAL_MARKER must be 512 algined for DIO */ +/* JOURNAL_DESC + JOURNAL_MARKER must be 512 aligned for DIO */ #define JOURNAL_DESC_MAGIC 0xfee1900d #define JOURNAL_DESC_SIZE 508 #define JOURNAL_MARKER_SIZE 4 /* Use marker to detect partial write */ @@ -245,7 +245,7 @@ skip: * We recover the journal file in order of wall time in the corner case that * sheep crashes while in the middle of journal committing. For most of cases, * we actually only recover one jfile, the other would be empty. This process - * is fast with buffered IO that only take several secends at most. + * is fast with buffered IO that only take several seconds at most. */ static int check_recover_journal_file(const char *p) { @@ -259,11 +259,11 @@ static int check_recover_journal_file(const char *p) return 0; if (do_recover(old) < 0) { - sd_emerg("recoverying from journal file (old) failed"); + sd_emerg("recovering from journal file (old) failed"); return -1; } if (do_recover(new) < 0) { - sd_emerg("recoverying from journal file (new) failed"); + sd_emerg("recovering from journal file (new) failed"); return -1; } @@ -324,7 +324,7 @@ static struct sd_mutex journal_commit_mutex = SD_MUTEX_INITIALIZER; /* * We rely on the kernel's page cache to cache data objects to 1) boost read - * perfmance 2) simplify read path so that data commiting is simply a + * performance 2) simplify read path so that data committing is simply a * sync() operation and We do it in a dedicated thread to avoid blocking * the writer by switch back and forth between two journal files. */ @@ -351,7 +351,7 @@ static void switch_journal_file(void) struct work *w; if (sd_mutex_trylock(&journal_commit_mutex) == EBUSY) { - sd_err("journal file in commiting, you might need" + sd_err("journal file in committing, you might need" " enlarge jfile size"); sd_mutex_lock(&journal_commit_mutex); } diff --git a/sheep/request.c b/sheep/request.c index ad2e862..8a2e7dc 100644 --- a/sheep/request.c +++ b/sheep/request.c @@ -76,7 +76,7 @@ static void io_op_done(struct work *work) * go process the request directly, if not put the request into wait * queue of the receiver to wait for the finish of this oid recovery. * - * 4. Object requested doesn't exist and is being recoverred + * 4. Object requested doesn't exist and is being recovered * In this case, we put the request into wait queue of receiver and when * we recover an object we try to wake up the request on this oid. */ @@ -119,7 +119,7 @@ static void gateway_op_done(struct work *work) sleep_on_wait_queue(req); return; } - /*FALLTHRU*/ + /* FALL THROUGH */ case SD_RES_NEW_NODE_VER: case SD_RES_NETWORK_ERROR: case SD_RES_WAIT_FOR_JOIN: @@ -254,7 +254,7 @@ void wakeup_requests_on_epoch(void) list_splice_init(&pending_list, &sys->req_wait_queue); } -/* Wakeup the requests on the oid that was previously being recoverred */ +/* Wakeup the requests on the oid that was previously being recovered */ void wakeup_requests_on_oid(uint64_t oid) { struct request *req; @@ -330,7 +330,7 @@ static void queue_gateway_request(struct request *req) * Even if it doesn't exist in cache, we'll rely on cache layer to pull * it. * - * Not ture for local request because it might go for backend store + * Not true for local request because it might go for backend store * such as pushing cache object, in this case we should check if request * is in recovery. */ diff --git a/sheep/sheep.c b/sheep/sheep.c index e6ac8c5..a36da17 100644 --- a/sheep/sheep.c +++ b/sheep/sheep.c @@ -68,7 +68,7 @@ static const char cluster_help[] = "\tlocal: use local driver\n" "\tcorosync: use corosync driver\n" "\tzookeeper: use zookeeper driver, need extra arguments\n" -"\n\tzookeeper arguments: address-list,tiemout=value (default as 3000)\n" +"\n\tzookeeper arguments: address-list,timeout=value (default as 3000)\n" "\nExample:\n\t" "$ sheep -c zookeeper:IP1:PORT1,IP2:PORT2,IP3:PORT3,timeout=1000 ...\n" "This tries to use 3 node zookeeper cluster, which can be reached by\n" @@ -77,7 +77,7 @@ static const char cluster_help[] = static const char cache_help[] = "Available arguments:\n" -"\tsize=: size of the cache in megabyes\n" +"\tsize=: size of the cache in megabytes\n" "\tdir=: path to the location of the cache (default: $STORE/cache)\n" "\tdirectio: use directio mode for cache IO, " "if not specified use buffered IO\n" @@ -122,11 +122,11 @@ static struct sd_option sheep_options[] = { "specify the cluster driver (default: "DEFAULT_CLUSTER_DRIVER")", cluster_help}, {'D', "directio", false, "use direct IO for backend store"}, - {'g', "gateway", false, "make the progam run as a gateway mode"}, + {'g', "gateway", false, "make the program run as a gateway mode"}, {'h', "help", false, "display this help and exit"}, {'i', "ioaddr", true, "use separate network card to handle IO requests" " (default: disabled)", ioaddr_help}, - {'j', "journal", true, "use jouranl file to log all the write " + {'j', "journal", true, "use journal file to log all the write " "operations. (default: disabled)", journal_help}, {'l', "log", true, "specify the log level, the log directory and the log format" @@ -468,7 +468,7 @@ static int create_work_queues(void) /* * FIXME: Teach sheep handle EMFILE gracefully. * - * For now we only set a large enough vaule to run sheep safely. + * For now we only set a large enough value to run sheep safely. * * We just estimate we at most run 100 VMs for each node and each VM consumes 10 * FDs at peak rush hour. diff --git a/sheep/sheep_priv.h b/sheep/sheep_priv.h index b7f81c5..f529042 100644 --- a/sheep/sheep_priv.h +++ b/sheep/sheep_priv.h @@ -482,7 +482,7 @@ static inline bool node_is_local(const struct sd_node *n) * If the object is read-only, the fragmentation doesn't happen. In addition, * if the object is unlikely to be accessed sequentially, the fragmentation is * not a problem. We can make such objects sparse so that we can use spaces - * more efficently. + * more efficiently. */ static inline bool is_sparse_object(uint64_t oid) { -- 1.8.3.2 -- sheepdog mailing list sheepdog@lists.wpkg.org http://lists.wpkg.org/mailman/listinfo/sheepdog