summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/client_t.c2
-rw-r--r--libglusterfs/src/common-utils.c6
-rw-r--r--libglusterfs/src/compat.h2
-rw-r--r--libglusterfs/src/defaults-tmpl.c2
-rw-r--r--libglusterfs/src/dict.c6
-rw-r--r--libglusterfs/src/event-epoll.c4
-rw-r--r--libglusterfs/src/event-poll.c2
-rw-r--r--libglusterfs/src/event.c4
-rw-r--r--libglusterfs/src/fd.c4
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store.c10
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store.h4
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store_helper.c2
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store_helper.h2
-rw-r--r--libglusterfs/src/gfdb/gfdb_data_store_types.h2
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3.c20
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3.h8
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3_helper.c12
-rw-r--r--libglusterfs/src/glusterfs.h2
-rw-r--r--libglusterfs/src/inode.c2
-rw-r--r--libglusterfs/src/iobuf.c30
-rw-r--r--libglusterfs/src/iobuf.h4
-rw-r--r--libglusterfs/src/logging.c2
-rw-r--r--libglusterfs/src/logging.h54
-rw-r--r--libglusterfs/src/refcount.c2
-rw-r--r--libglusterfs/src/refcount.h2
-rw-r--r--libglusterfs/src/rot-buffs.c2
-rw-r--r--libglusterfs/src/rot-buffs.h2
-rw-r--r--libglusterfs/src/run.c8
-rw-r--r--libglusterfs/src/syscall.c6
29 files changed, 104 insertions, 104 deletions
diff --git a/libglusterfs/src/client_t.c b/libglusterfs/src/client_t.c
index 9068f192407..e002c1fbed9 100644
--- a/libglusterfs/src/client_t.c
+++ b/libglusterfs/src/client_t.c
@@ -482,7 +482,7 @@ __client_ctx_set_int (client_t *client, void *key, void *value)
if (!client->scratch_ctx.ctx[index].ctx_key) {
if (set_idx == -1)
set_idx = index;
- /* dont break, to check if key already exists
+ /* don't break, to check if key already exists
further on */
}
if (client->scratch_ctx.ctx[index].ctx_key == key) {
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index d7888f526df..7414691c2c7 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -2371,7 +2371,7 @@ valid_ipv4_address (char *address, int length, gf_boolean_t wildcard_acc)
/*
* To prevent cases where last character is '.' and which have
* consecutive dots like ".." as strtok ignore consecutive
- * delimeters.
+ * delimiters.
*/
if (length <= 0 ||
(strstr (address, "..")) ||
@@ -2410,7 +2410,7 @@ out:
/**
* valid_ipv4_subnetwork() takes the pattern and checks if it contains
* a valid ipv4 subnetwork pattern i.e. xx.xx.xx.xx/n. IPv4 address
- * part (xx.xx.xx.xx) and mask bits lengh part (n). The mask bits lengh
+ * part (xx.xx.xx.xx) and mask bits length part (n). The mask bits length
* must be in 0-32 range (ipv4 addr is 32 bit). The pattern must be
* in this format.
*
@@ -5014,7 +5014,7 @@ close_fds_except (int *fdv, size_t count)
*
* gf_getgrouplist allocates a gid_t buffer which is big enough to
* hold the list of auxiliary group ids for user, up to the GF_MAX_AUX_GROUPS
- * threshold. Upon succesfull invocation groups will be pointed to that buffer.
+ * threshold. Upon successful invocation groups will be pointed to that buffer.
*
* @return success: the number of auxiliary group ids retrieved
* failure: -1
diff --git a/libglusterfs/src/compat.h b/libglusterfs/src/compat.h
index fe8efd7153e..0c56fcc5cb9 100644
--- a/libglusterfs/src/compat.h
+++ b/libglusterfs/src/compat.h
@@ -68,7 +68,7 @@
#ifndef HAVE_LLISTXATTR
-/* This part is valid only incase of old glibc which doesn't support
+/* This part is valid only in case of old glibc which doesn't support
* 'llistxattr()' system calls.
*/
diff --git a/libglusterfs/src/defaults-tmpl.c b/libglusterfs/src/defaults-tmpl.c
index d1e919aebc8..74550030446 100644
--- a/libglusterfs/src/defaults-tmpl.c
+++ b/libglusterfs/src/defaults-tmpl.c
@@ -11,7 +11,7 @@
/* libglusterfs/src/defaults.c:
This file contains functions, which are used to fill the 'fops', 'cbk'
structures in the xlator structures, if they are not written. Here, all the
- function calls are plainly forwared to the first child of the xlator, and
+ function calls are plainly forwarded to the first child of the xlator, and
all the *_cbk function does plain STACK_UNWIND of the frame, and returns.
This function also implements *_resume () functions, which does same
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
index be47def148c..aa893845659 100644
--- a/libglusterfs/src/dict.c
+++ b/libglusterfs/src/dict.c
@@ -2919,7 +2919,7 @@ out:
*
* @this: dict to serialize
* @buf: buffer to serialize into. This must be
- * atleast dict_serialized_length (this) large
+ * at least dict_serialized_length (this) large
*
* @return: success: 0
* failure: -errno
@@ -3039,7 +3039,7 @@ out:
*
* @this: dict to serialize
* @buf: buffer to serialize into. This must be
- * atleast dict_serialized_length (this) large
+ * at least dict_serialized_length (this) large
*
* @return: success: 0
* failure: -errno
@@ -3273,7 +3273,7 @@ out:
* @delimiter : the delimiter to separate the values
*
* @return : 0 -> success
- * : -errno -> faliure
+ * : -errno -> failure
*/
int
dict_serialize_value_with_delim_lk (dict_t *this, char *buf, int32_t *serz_len,
diff --git a/libglusterfs/src/event-epoll.c b/libglusterfs/src/event-epoll.c
index c861fa721e5..c420a8a488f 100644
--- a/libglusterfs/src/event-epoll.c
+++ b/libglusterfs/src/event-epoll.c
@@ -323,7 +323,7 @@ event_register_epoll (struct event_pool *event_pool, int fd,
GF_VALIDATE_OR_GOTO ("event", event_pool, out);
- /* TODO: Even with the below check, there is a possiblity of race,
+ /* TODO: Even with the below check, there is a possibility of race,
* What if the destroy mode is set after the check is done.
* Not sure of the best way to prevent this race, ref counting
* is one possibility.
@@ -700,7 +700,7 @@ event_dispatch_epoll (struct event_pool *event_pool)
gf_common_mt_event_pool);
if (!ev_data) {
if (i == 0) {
- /* Need to suceed creating 0'th
+ /* Need to succeed creating 0'th
* thread, to joinable and wait */
break;
} else {
diff --git a/libglusterfs/src/event-poll.c b/libglusterfs/src/event-poll.c
index b1aca826759..da69866fbf7 100644
--- a/libglusterfs/src/event-poll.c
+++ b/libglusterfs/src/event-poll.c
@@ -173,7 +173,7 @@ event_pool_new_poll (int count, int eventthreadcount)
"thread count (%d) ignored", eventthreadcount);
}
- /* although, eventhreadcount for poll implementaiton is always
+ /* although, eventhreadcount for poll implementation is always
* going to be 1, eventthreadcount needs to be set to 1 so that
* rpcsvc_request_handler() thread scaling works flawlessly in
* both epoll and poll models
diff --git a/libglusterfs/src/event.c b/libglusterfs/src/event.c
index bba6f8429a1..6562d86a991 100644
--- a/libglusterfs/src/event.c
+++ b/libglusterfs/src/event.c
@@ -196,8 +196,8 @@ out:
* Note: to be called before event_pool_destroy is called.
* The order in which cleaning is performed:
* - Register a pipe fd(this is for waking threads in poll()/epoll_wait())
- * - Set the destroy mode, which this no new event registration will succede
- * - Reconfigure the thread count to 0(this will succede only in destroy mode)
+ * - Set the destroy mode, which this no new event registration will succeed
+ * - Reconfigure the thread count to 0(this will succeed only in destroy mode)
* - Wake up all the threads in poll() or epoll_wait(), so that they can
* destroy themselves.
* - Wait for the thread to join(which will happen only after all the other
diff --git a/libglusterfs/src/fd.c b/libglusterfs/src/fd.c
index 30a7494540d..65b23ed3503 100644
--- a/libglusterfs/src/fd.c
+++ b/libglusterfs/src/fd.c
@@ -756,7 +756,7 @@ __fd_anonymous (inode_t *inode, int32_t flags)
/* if (fd); then we already have increased the refcount in
__fd_lookup_anonymous(), so no need of one more fd_ref().
- if (!fd); then both create and bind wont bump up the ref
+ if (!fd); then both create and bind won't bump up the ref
count, so we have to call fd_ref() after bind. */
if (!fd) {
fd = __fd_create (inode, 0);
@@ -867,7 +867,7 @@ __fd_ctx_set (fd_t *fd, xlator_t *xlator, uint64_t value)
if (!fd->_ctx[index].key) {
if (set_idx == -1)
set_idx = index;
- /* dont break, to check if key already exists
+ /* don't break, to check if key already exists
further on */
}
if (fd->_ctx[index].xl_key == xlator) {
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.c b/libglusterfs/src/gfdb/gfdb_data_store.c
index 8ba7606012a..78fd22ee252 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store.c
+++ b/libglusterfs/src/gfdb/gfdb_data_store.c
@@ -115,7 +115,7 @@ add_connection_node (gfdb_conn_node_t *_conn_node) {
/*TODO What if the unlock fails.
* Will it lead to deadlock?
* Most of the gluster code
- * no check for unlock or destory of mutex!*/
+ * no check for unlock or destroy of mutex!*/
}
ret = 0;
out:
@@ -163,7 +163,7 @@ delete_conn_node (gfdb_conn_node_t *_conn_node)
/*TODO What if the unlock fails.
* Will it lead to deadlock?
* Most of the gluster code
- * no check for unlock or destory of mutex!*/
+ * no check for unlock or destroy of mutex!*/
ret = -1;
goto out;
}
@@ -241,7 +241,7 @@ init_db (dict_t *args, gfdb_db_type_t gfdb_db_type)
goto alloc_failed;
}
- /*Init the list component of db conneciton object*/
+ /*Init the list component of db connection object*/
INIT_LIST_HEAD (&_conn_node->conn_list);
@@ -355,7 +355,7 @@ out:
* link of inode from GF_FLINK_TB and
* GFDB_FOP_UNDEL_ALL to delete all the records from
* GF_FLINK_TB and GF_FILE_TB.
- * TODO: Should seperate this function into the
+ * TODO: Should separate this function into the
* delete_record function
* Refer CTR Xlator features/changetimerecorder for usage
* Arguments:
@@ -756,7 +756,7 @@ clear_files_heat (gfdb_conn_node_t *conn_node)
* this variable. The freeing of the memory should be done by
* the caller.
* Return:
- * On success return the lenght of the version string that is
+ * On success return the length of the version string that is
* extracted.
* On failure return -1
* */
diff --git a/libglusterfs/src/gfdb/gfdb_data_store.h b/libglusterfs/src/gfdb/gfdb_data_store.h
index beb954c190a..93bdda813a9 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store.h
@@ -72,7 +72,7 @@ typedef int (*fini_db_t) (gfdb_conn_node_t *_conn_node);
* link of inode from GF_FLINK_TB and
* GFDB_FOP_UNDEL_ALL to delete all the records from
* GF_FLINK_TB and GF_FILE_TB.
- * TODO: Should seperate this function into the
+ * TODO: Should separate this function into the
* delete_record function
* Refer CTR Xlator features/changetimerecorder for usage
* Arguments:
@@ -289,7 +289,7 @@ typedef int (*get_db_version_t)(gfdb_conn_node_t *_conn_node,
* extracted. This function will allocate memory
* to pragma_value. The caller should free the memory.
* Return:
- * On success return the lenght of the param value that is
+ * On success return the length of the param value that is
* extracted.
* On failure return -1
* */
diff --git a/libglusterfs/src/gfdb/gfdb_data_store_helper.c b/libglusterfs/src/gfdb/gfdb_data_store_helper.c
index fba5ec5a252..d5cfb24eeba 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store_helper.c
+++ b/libglusterfs/src/gfdb/gfdb_data_store_helper.c
@@ -446,7 +446,7 @@ gfdb_query_record_deserialize (char *in_buffer,
list_add_tail (&link_info->list,
&(ret_qrecord->link_list));
- /* Reseting link_info */
+ /* Resetting link_info */
link_info = NULL;
}
diff --git a/libglusterfs/src/gfdb/gfdb_data_store_helper.h b/libglusterfs/src/gfdb/gfdb_data_store_helper.h
index ce1f1c52281..7e81aab08a6 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store_helper.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store_helper.h
@@ -72,7 +72,7 @@ typedef gfdb_query_record_t *
-/* Fuction to add linkinfo to query record */
+/* Function to add linkinfo to query record */
int
gfdb_add_link_to_query_record (gfdb_query_record_t *gfdb_query_record,
uuid_t pgfid,
diff --git a/libglusterfs/src/gfdb/gfdb_data_store_types.h b/libglusterfs/src/gfdb/gfdb_data_store_types.h
index 3add890b047..f20ae4ded78 100644
--- a/libglusterfs/src/gfdb/gfdb_data_store_types.h
+++ b/libglusterfs/src/gfdb/gfdb_data_store_types.h
@@ -255,7 +255,7 @@ typedef struct gfdb_db_record {
/*Time of change or access*/
gfdb_time_t gfdb_wind_change_time;
gfdb_time_t gfdb_unwind_change_time;
- /* For crash consistancy while inserting/updating hard links */
+ /* For crash consistency while inserting/updating hard links */
gf_boolean_t islinkupdate;
/* For link consistency we do a double update i.e mark the link
* during the wind and during the unwind we update/delete the link.
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.c b/libglusterfs/src/gfdb/gfdb_sqlite3.c
index 16930504742..ad94d648369 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.c
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.c
@@ -149,7 +149,7 @@ gf_sql_str2sync_t (const char *sync_str)
}
-/*TODO replace GF_CALLOC by mem_pool or iobuff if required for performace */
+/*TODO replace GF_CALLOC by mem_pool or iobuff if required for performance */
static char *
sql_stmt_init ()
{
@@ -168,7 +168,7 @@ out:
return sql_stmt;
}
-/*TODO replace GF_FREE by mem_pool or iobuff if required for performace */
+/*TODO replace GF_FREE by mem_pool or iobuff if required for performance */
static void
sql_stmt_fini (char **sql_stmt)
{
@@ -627,7 +627,7 @@ gf_get_basic_query_stmt (char **out_stmt)
/*
* Find All files recorded in the DB
* Input:
- * query_callback : query callback fuction to handle
+ * query_callback : query callback function to handle
* result records from the query
* */
int
@@ -699,7 +699,7 @@ out:
/*
* Find recently changed files from the DB
* Input:
- * query_callback : query callback fuction to handle
+ * query_callback : query callback function to handle
* result records from the query
* from_time : Time to define what is recent
* */
@@ -799,7 +799,7 @@ out:
/*
* Find unchanged files from a specified time from the DB
* Input:
- * query_callback : query callback fuction to handle
+ * query_callback : query callback function to handle
* result records from the query
* for_time : Time from where the file/s are not changed
* */
@@ -903,7 +903,7 @@ out:
* Find recently changed files with a specific frequency from the DB
* Input:
* db_conn : db connection object
- * query_callback : query callback fuction to handle
+ * query_callback : query callback function to handle
* result records from the query
* from_time : Time to define what is recent
* freq_write_cnt : Frequency thresold for write
@@ -1048,7 +1048,7 @@ out:
/*
* Find unchanged files from a specified time, w.r.t to frequency, from the DB
* Input:
- * query_callback : query callback fuction to handle
+ * query_callback : query callback function to handle
* result records from the query
* for_time : Time from where the file/s are not changed
* freq_write_cnt : Frequency thresold for write
@@ -1255,7 +1255,7 @@ out:
* this variable. The freeing of the memory should be done by
* the caller.
* Return:
- * On success return the lenght of the version string that is
+ * On success return the length of the version string that is
* extracted.
* On failure return -1
* */
@@ -1310,7 +1310,7 @@ out:
* extracted. This function will allocate memory
* to pragma_value. The caller should free the memory
* Return:
- * On success return the lenght of the pragma/setting value that is
+ * On success return the length of the pragma/setting value that is
* extracted.
* On failure return -1
* */
@@ -1415,7 +1415,7 @@ out:
* Input:
* void *db_conn : Sqlite connection
* gf_boolean_t compact_active : Is compaction on?
- * gf_boolean_t compact_mode_switched : Did we just flip the compaction swtich?
+ * gf_boolean_t compact_mode_switched : Did we just flip the compaction switch?
* Return:
* On success return 0
* On failure return -1
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.h b/libglusterfs/src/gfdb/gfdb_sqlite3.h
index 5b55b0ace5e..11bf3e82707 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.h
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.h
@@ -229,7 +229,7 @@ gfdb_set_sql_params(char *comp_name, dict_t *from_dict, dict_t *to_dict)
GF_ASSERT (from_dict);
GF_ASSERT (to_dict);
- /*Extact and Set of the sql params from page_size*/
+ /*Extract and Set of the sql params from page_size*/
for (sql_index = sql_pagesize_ix; sql_index < sql_index_max;
sql_index++) {
_val_str = NULL;
@@ -292,7 +292,7 @@ int gf_sqlite3_clear_files_heat (void *db_conn);
* this variable. The freeing of the memory should be done by
* the caller.
* Return:
- * On success return the lenght of the version string that is
+ * On success return the length of the version string that is
* extracted.
* On failure return -1
* */
@@ -306,7 +306,7 @@ int gf_sqlite3_version (void *db_conn, char **version);
* extracted. This function will allocate memory
* to pragma_value. The caller should free the memory
* Return:
- * On success return the lenght of the pragma/setting value that is
+ * On success return the length of the pragma/setting value that is
* extracted.
* On failure return -1
* */
@@ -328,7 +328,7 @@ gf_sqlite3_set_pragma (void *db_conn, char *pragma_key, char *pragma_value);
* Input:
* void *db_conn : Sqlite connection
* gf_boolean_t compact_active : Is compaction on?
- * gf_boolean_t compact_mode_switched : Did we just flip the compaction swtich?
+ * gf_boolean_t compact_mode_switched : Did we just flip the compaction switch?
* Return:
* On success return 0
* On failure return -1
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3_helper.c b/libglusterfs/src/gfdb/gfdb_sqlite3_helper.c
index 8e1e27ff082..b2c3392f45a 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3_helper.c
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3_helper.c
@@ -631,14 +631,14 @@ gf_update_time (gf_sql_connection_t *sql_conn,
freq_cntr_str = (record_counter) ?
", WRITE_FREQ_CNTR = WRITE_FREQ_CNTR + 1" : "";
- /*Prefectly safe as we will not go array of bound*/
+ /*Perfectly safe as we will not go array of bound*/
sprintf (update_str, "UPDATE "
GF_FILE_TABLE
" SET W_SEC = ?, W_MSEC = ? "
" %s"/*place for read freq counters*/
" WHERE GF_ID = ? ;", freq_cntr_str);
} else {
- /*Prefectly safe as we will not go array of bound*/
+ /*Perfectly safe as we will not go array of bound*/
sprintf (update_str, "UPDATE "
GF_FILE_TABLE
" SET UW_SEC = ?, UW_MSEC = ? ;");
@@ -651,14 +651,14 @@ gf_update_time (gf_sql_connection_t *sql_conn,
freq_cntr_str = (record_counter) ?
", READ_FREQ_CNTR = READ_FREQ_CNTR + 1" : "";
- /*Prefectly safe as we will not go array of bound*/
+ /*Perfectly safe as we will not go array of bound*/
sprintf (update_str, "UPDATE "
GF_FILE_TABLE
" SET W_READ_SEC = ?, W_READ_MSEC = ? "
" %s"/*place for read freq counters*/
" WHERE GF_ID = ? ;", freq_cntr_str);
} else {
- /*Prefectly safe as we will not go array of bound*/
+ /*Perfectly safe as we will not go array of bound*/
sprintf (update_str, "UPDATE "
GF_FILE_TABLE
" SET UW_READ_SEC = ?, UW_READ_MSEC = ? ;");
@@ -794,7 +794,7 @@ gf_sql_insert_wind (gf_sql_connection_t *sql_conn,
* gf_file_tb is deleted but the link record
* still exist. Lookup heal will attempt a heal
* with create_wind set. The link heal will fail
- * as there is already a record and if we dont
+ * as there is already a record and if we don't
* ignore the error we will not heal the
* gf_file_tb.
* 2) Rename file in cold tier: During a rename
@@ -803,7 +803,7 @@ gf_sql_insert_wind (gf_sql_connection_t *sql_conn,
* linkto file. When the file gets heated and
* moves to hot tier there will be attempt from
* ctr lookup heal to create link and file
- * record and If we dont ignore the error we
+ * record and If we don't ignore the error we
* will not heal the gf_file_tb.
* */
}
diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h
index 4c0936a9f08..7dd3b06a468 100644
--- a/libglusterfs/src/glusterfs.h
+++ b/libglusterfs/src/glusterfs.h
@@ -187,7 +187,7 @@
/*
* Always append entries to end of the enum, do not delete entries.
- * Currently dict_set_flag allows to set upto 256 flag, if the enum
+ * Currently dict_set_flag allows to set up to 256 flag, if the enum
* needs to grow beyond this dict_set_flag has to be changed accordingly
*/
enum gf_internal_fop_indicator {
diff --git a/libglusterfs/src/inode.c b/libglusterfs/src/inode.c
index 093683d41da..6b29749e933 100644
--- a/libglusterfs/src/inode.c
+++ b/libglusterfs/src/inode.c
@@ -1796,7 +1796,7 @@ inode_table_destroy (inode_table_t *inode_table) {
* also not free its inode context and this could leak a lot of
* memory, force free the inodes by changing the ref to 0.
* The problem with this is that any reference to inode after this
- * calling this funtion will lead to a crash.
+ * calling this function will lead to a crash.
* 3. Knowing there could be leakes, just free the inode contexts of
* all the inodes. and let the inodes be alive. This way the major
* memory consumed by the inode contexts are freed, but there can
diff --git a/libglusterfs/src/iobuf.c b/libglusterfs/src/iobuf.c
index c59b079b90a..0ca272986a1 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -342,8 +342,8 @@ iobuf_pool_destroy (struct iobuf_pool *iobuf_pool)
__iobuf_arena_destroy (iobuf_pool, iobuf_arena);
}
/* If there are no iobuf leaks, there shoould be
- * no standard alloced arenas, iobuf_put will free such
- * arenas.
+ * no standard allocated arenas, iobuf_put will free
+ * such arenas.
* TODO: Free the stdalloc arenas forcefully if present?
*/
}
@@ -444,7 +444,7 @@ __iobuf_arena_prune (struct iobuf_pool *iobuf_pool,
GF_VALIDATE_OR_GOTO ("iobuf", iobuf_pool, out);
/* code flow comes here only if the arena is in purge list and we can
- * free the arena only if we have atleast one arena in 'arenas' list
+ * free the arena only if we have at least one arena in 'arenas' list
* (ie, at least few iobufs free in arena), that way, there won't
* be spurious mmap/unmap of buffers
*/
@@ -856,7 +856,7 @@ iobref_new ()
return NULL;
}
- iobref->alloced = 16;
+ iobref->allocated = 16;
iobref->used = 0;
LOCK_INIT (&iobref->lock);
@@ -885,7 +885,7 @@ iobref_destroy (struct iobref *iobref)
GF_VALIDATE_OR_GOTO ("iobuf", iobref, out);
- for (i = 0; i < iobref->alloced; i++) {
+ for (i = 0; i < iobref->allocated; i++) {
iobuf = iobref->iobrefs[i];
iobref->iobrefs[i] = NULL;
@@ -924,11 +924,11 @@ iobref_clear (struct iobref *iobref)
GF_VALIDATE_OR_GOTO ("iobuf", iobref, out);
- for (; i < iobref->alloced; i++) {
+ for (; i < iobref->allocated; i++) {
if (iobref->iobrefs[i] != NULL) {
iobuf_unref (iobref->iobrefs[i]);
} else {
- /** iobuf's are attched serially */
+ /** iobuf's are attached serially */
break;
}
}
@@ -947,12 +947,12 @@ __iobref_grow (struct iobref *iobref)
int i = 0;
newptr = GF_REALLOC (iobref->iobrefs,
- iobref->alloced * 2 * (sizeof (*iobref->iobrefs)));
+ iobref->allocated * 2 * (sizeof (*iobref->iobrefs)));
if (newptr) {
iobref->iobrefs = newptr;
- iobref->alloced *= 2;
+ iobref->allocated *= 2;
- for (i = iobref->used; i < iobref->alloced; i++)
+ for (i = iobref->used; i < iobref->allocated; i++)
iobref->iobrefs[i] = NULL;
}
}
@@ -967,16 +967,16 @@ __iobref_add (struct iobref *iobref, struct iobuf *iobuf)
GF_VALIDATE_OR_GOTO ("iobuf", iobref, out);
GF_VALIDATE_OR_GOTO ("iobuf", iobuf, out);
- if (iobref->used == iobref->alloced) {
+ if (iobref->used == iobref->allocated) {
__iobref_grow (iobref);
- if (iobref->used == iobref->alloced) {
+ if (iobref->used == iobref->allocated) {
ret = -ENOMEM;
goto out;
}
}
- for (i = 0; i < iobref->alloced; i++) {
+ for (i = 0; i < iobref->allocated; i++) {
if (iobref->iobrefs[i] == NULL) {
iobref->iobrefs[i] = iobuf_ref (iobuf);
iobref->used++;
@@ -1021,7 +1021,7 @@ iobref_merge (struct iobref *to, struct iobref *from)
LOCK (&from->lock);
{
- for (i = 0; i < from->alloced; i++) {
+ for (i = 0; i < from->allocated; i++) {
iobuf = from->iobrefs[i];
if (!iobuf)
@@ -1075,7 +1075,7 @@ iobref_size (struct iobref *iobref)
LOCK (&iobref->lock);
{
- for (i = 0; i < iobref->alloced; i++) {
+ for (i = 0; i < iobref->allocated; i++) {
if (iobref->iobrefs[i])
size += iobuf_size (iobref->iobrefs[i]);
}
diff --git a/libglusterfs/src/iobuf.h b/libglusterfs/src/iobuf.h
index e47c342dc8c..21184da1d2e 100644
--- a/libglusterfs/src/iobuf.h
+++ b/libglusterfs/src/iobuf.h
@@ -41,7 +41,7 @@
/* each unit hosts @page_size bytes of memory */
struct iobuf;
-/* one region of memory MMAPed from the operating system */
+/* one region of memory mapped from the operating system */
/* each region MMAPs @arena_size bytes of memory */
/* each arena hosts @arena_size / @page_size IOBUFs */
struct iobuf_arena;
@@ -152,7 +152,7 @@ struct iobref {
gf_lock_t lock;
gf_atomic_t ref;
struct iobuf **iobrefs;
- int alloced;
+ int allocated;
int used;
};
diff --git a/libglusterfs/src/logging.c b/libglusterfs/src/logging.c
index ff17ccbc1fd..732c4b26473 100644
--- a/libglusterfs/src/logging.c
+++ b/libglusterfs/src/logging.c
@@ -2530,7 +2530,7 @@ _do_slog_format (const char *event, va_list inp, char **msg) {
break;
}
- /* Get number of times % is used in input for formating, */
+ /* Get number of times % is used in input for formatting, */
/* this count will be used to skip those many args from the */
/* main list and will be used to format inner format */
num_format_chars = 0;
diff --git a/libglusterfs/src/logging.h b/libglusterfs/src/logging.h
index 665ab268dc6..94acd960b50 100644
--- a/libglusterfs/src/logging.h
+++ b/libglusterfs/src/logging.h
@@ -211,37 +211,37 @@ int _gf_log_eh (const char *function, const char *fmt, ...);
#define FMT_WARN(fmt...) do { if (0) printf (fmt); } while (0)
/* Interface to log messages with message IDs */
-#define gf_msg(dom, levl, errnum, msgid, fmt...) do { \
+#define gf_msg(dom, level, errnum, msgid, fmt...) do { \
_gf_msg (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, errnum, 0, msgid, ##fmt); \
+ level, errnum, 0, msgid, ##fmt); \
} while (0)
/* no frills, no thrills, just a vanilla message, used to print the graph */
-#define gf_msg_plain(levl, fmt...) do { \
- _gf_msg_plain (levl, ##fmt); \
+#define gf_msg_plain(level, fmt...) do { \
+ _gf_msg_plain (level, ##fmt); \
} while (0)
-#define gf_msg_plain_nomem(levl, msg) do { \
- _gf_msg_plain_nomem (levl, msg); \
+#define gf_msg_plain_nomem(level, msg) do { \
+ _gf_msg_plain_nomem (level, msg); \
} while (0)
-#define gf_msg_vplain(levl, fmt, va) do { \
- _gf_msg_vplain (levl, fmt, va); \
+#define gf_msg_vplain(level, fmt, va) do { \
+ _gf_msg_vplain (level, fmt, va); \
} while (0)
#define gf_msg_backtrace_nomem(level, stacksize) do { \
_gf_msg_backtrace_nomem (level, stacksize); \
} while (0)
-#define gf_msg_callingfn(dom, levl, errnum, msgid, fmt...) do { \
- _gf_msg (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, errnum, 1, msgid, ##fmt); \
+#define gf_msg_callingfn(dom, level, errnum, msgid, fmt...) do { \
+ _gf_msg (dom, __FILE__, __FUNCTION__, __LINE__, \
+ level, errnum, 1, msgid, ##fmt); \
} while (0)
/* No malloc or calloc should be called in this function */
-#define gf_msg_nomem(dom, levl, size) do { \
- _gf_msg_nomem (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, size); \
+#define gf_msg_nomem(dom, level, size) do { \
+ _gf_msg_nomem (dom, __FILE__, __FUNCTION__, __LINE__, \
+ level, size); \
} while (0)
/* Debug or trace messages do not need message IDs as these are more developer
@@ -256,27 +256,27 @@ int _gf_log_eh (const char *function, const char *fmt, ...);
GF_LOG_TRACE, errnum, 0, 0, ##fmt); \
} while (0)
-#define gf_log(dom, levl, fmt...) do { \
+#define gf_log(dom, level, fmt...) do { \
FMT_WARN (fmt); \
_gf_log (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, ##fmt); \
+ level, ##fmt); \
} while (0)
#define gf_log_eh(fmt...) do { \
FMT_WARN (fmt); \
- _gf_log_eh (__FUNCTION__, ##fmt); \
+ _gf_log_eh (__FUNCTION__, ##fmt); \
} while (0)
-#define gf_log_callingfn(dom, levl, fmt...) do { \
- FMT_WARN (fmt); \
+#define gf_log_callingfn(dom, level, fmt...) do { \
+ FMT_WARN (fmt); \
_gf_log_callingfn (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, ##fmt); \
+ level, ##fmt); \
} while (0)
/* Log once in GF_UNIVERSAL_ANSWER times */
#define GF_LOG_OCCASIONALLY(var, args...) if (!(var++%GF_UNIVERSAL_ANSWER)) { \
- gf_log (args); \
+ gf_log (args); \
}
struct _glusterfs_ctx;
@@ -340,14 +340,14 @@ _gf_smsg (const char *domain, const char *file, const char *function,
uint64_t msgid, const char *event, ...);
/* Interface to log messages with message IDs */
-#define gf_smsg(dom, levl, errnum, msgid, event...) do { \
- _gf_smsg (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, errnum, 0, msgid, ##event); \
+#define gf_smsg(dom, level, errnum, msgid, event...) do { \
+ _gf_smsg (dom, __FILE__, __FUNCTION__, __LINE__, \
+ level, errnum, 0, msgid, ##event); \
} while (0)
-#define gf_slog(dom, levl, event...) do { \
- _gf_slog (dom, __FILE__, __FUNCTION__, __LINE__, \
- levl, ##event); \
+#define gf_slog(dom, level, event...) do { \
+ _gf_slog (dom, __FILE__, __FUNCTION__, __LINE__, \
+ level, ##event); \
} while (0)
#endif /* __LOGGING_H__ */
diff --git a/libglusterfs/src/refcount.c b/libglusterfs/src/refcount.c
index 5787da290bb..714bb9afef6 100644
--- a/libglusterfs/src/refcount.c
+++ b/libglusterfs/src/refcount.c
@@ -21,7 +21,7 @@ _gf_ref_get (gf_ref_t *ref)
/* if cnt == 0, we're in a fatal position, the object will be free'd
*
* There is a race when two threads do a _gf_ref_get(). Only one of
- * them may get a 0 returned. That is acceptible, because one
+ * them may get a 0 returned. That is acceptable, because one
* _gf_ref_get() returning 0 should be handled as a fatal problem and
* when correct usage/locking is used, it should never happen.
*/
diff --git a/libglusterfs/src/refcount.h b/libglusterfs/src/refcount.h
index 25f44258e42..2186c155607 100644
--- a/libglusterfs/src/refcount.h
+++ b/libglusterfs/src/refcount.h
@@ -53,7 +53,7 @@ _gf_ref_get (gf_ref_t *ref);
unsigned int
_gf_ref_put (gf_ref_t *ref);
-/* _gf_ref_init -- initalize an embedded refcount object
+/* _gf_ref_init -- initialize an embedded refcount object
*
* @release: function to call when the refcount == 0
* @data: parameter to be passed to @release
diff --git a/libglusterfs/src/rot-buffs.c b/libglusterfs/src/rot-buffs.c
index 4f3eb35fa96..cbded2b3f46 100644
--- a/libglusterfs/src/rot-buffs.c
+++ b/libglusterfs/src/rot-buffs.c
@@ -32,7 +32,7 @@
#define RLIST_IOV_MELDED_ALLOC_SIZE (RBUF_IOVEC_SIZE + ROT_BUFF_ALLOC_SIZE)
/**
- * iovec list is not shrinked (deallocated) if usage/total count
+ * iovec list is not shrunk (deallocated) if usage/total count
* falls in this range. this is the fast path and should satisfy
* most of the workloads. for the rest shrinking iovec list is
* generous.
diff --git a/libglusterfs/src/rot-buffs.h b/libglusterfs/src/rot-buffs.h
index aac24a4f571..8ee5271533e 100644
--- a/libglusterfs/src/rot-buffs.h
+++ b/libglusterfs/src/rot-buffs.h
@@ -73,7 +73,7 @@ struct rlist_iter {
--((riter)->iter))
/**
- * Sequence number assigment routine is called during buffer
+ * Sequence number assignment routine is called during buffer
* switch under rbuff ->lock.
*/
typedef void (sequence_fn) (rbuf_list_t *, void *);
diff --git a/libglusterfs/src/run.c b/libglusterfs/src/run.c
index 06a0a0a734f..c501bab9685 100644
--- a/libglusterfs/src/run.c
+++ b/libglusterfs/src/run.c
@@ -33,11 +33,11 @@
* on glusterfs:
* $ cc -DRUN_STANDALONE -c run.c
*
- * Compiling a demo progam that exercises bits of run.c
+ * Compiling a demo program that exercises bits of run.c
* functionality (linking to glusterfs):
* $ cc -DRUN_DO_DEMO -orun run.c `pkg-config --libs --cflags glusterfs-api`
*
- * Compiling a demo progam that exercises bits of run.c
+ * Compiling a demo program that exercises bits of run.c
* functionality (with no dependence on glusterfs):
*
* $ cc -DRUN_DO_DEMO -DRUN_STANDALONE -orun run.c
@@ -54,7 +54,7 @@ int close_fds_except (int *fdv, size_t count);
#define gf_strdup(s) strdup(s)
#define gf_vasprintf(p, f, va) vasprintf(p, f, va)
#define gf_loglevel_t int
-#define gf_msg_callingfn(dom, levl, errnum, msgid, fmt, args...) printf("LOG: " fmt "\n", ##args)
+#define gf_msg_callingfn(dom, level, errnum, msgid, fmt, args...) printf("LOG: " fmt "\n", ##args)
#define LOG_DEBUG 0
#ifdef RUN_STANDALONE
#include <stdbool.h>
@@ -330,7 +330,7 @@ runner_start (runner_t *runner)
}
if (ret != -1) {
- /* save child from inheriting our singal handling */
+ /* save child from inheriting our signal handling */
sigemptyset (&set);
sigprocmask (SIG_SETMASK, &set, NULL);
diff --git a/libglusterfs/src/syscall.c b/libglusterfs/src/syscall.c
index 2ffe08a4299..2d79d695b09 100644
--- a/libglusterfs/src/syscall.c
+++ b/libglusterfs/src/syscall.c
@@ -418,7 +418,7 @@ sys_statvfs (const char *path, struct statvfs *buf)
ret = statvfs (path, buf);
#ifdef __FreeBSD__
- /* FreeBSD doesn't return the expected vaule in buf->f_bsize. It
+ /* FreeBSD doesn't return the expected value in buf->f_bsize. It
* contains the optimal I/O size instead of the file system block
* size. Gluster expects that this field contains the block size.
*/
@@ -438,7 +438,7 @@ sys_fstatvfs (int fd, struct statvfs *buf)
ret = fstatvfs (fd, buf);
#ifdef __FreeBSD__
- /* FreeBSD doesn't return the expected vaule in buf->f_bsize. It
+ /* FreeBSD doesn't return the expected value in buf->f_bsize. It
* contains the optimal I/O size instead of the file system block
* size. Gluster expects this field to contain the block size.
*/
@@ -485,7 +485,7 @@ sys_fdatasync (int fd)
void
gf_add_prefix(const char *ns, const char *key, char **newkey)
{
- /* if we dont have any namespace, append USER NS */
+ /* if we don't have any namespace, append USER NS */
if (strncmp(key, XATTR_USER_PREFIX, XATTR_USER_PREFIX_LEN) &&
strncmp(key, XATTR_TRUSTED_PREFIX, XATTR_TRUSTED_PREFIX_LEN) &&
strncmp(key, XATTR_SECURITY_PREFIX, XATTR_SECURITY_PREFIX_LEN) &&