summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/dht/src
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-07-16 17:03:17 +0300
committerAmar Tumballi <amarts@redhat.com>2018-07-22 14:40:16 +0000
commit621138ce763eda8270d0a4f6d7209fd50ada8787 (patch)
tree7299759993f6e9f7f34dad95fc8d8cd6ffc1b2fd /xlators/cluster/dht/src
parentc0e76377d0fc47aa66f35ea70a4793731ebbd40c (diff)
All: run codespell on the code and fix issues.
Please review, it's not always just the comments that were fixed. I've had to revert of course all calls to creat() that were changed to create() ... Only compile-tested! Change-Id: I7d02e82d9766e272a7fd9cc68e51901d69e5aab5 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'xlators/cluster/dht/src')
-rw-r--r--xlators/cluster/dht/src/dht-common.c16
-rw-r--r--xlators/cluster/dht/src/dht-diskusage.c2
-rw-r--r--xlators/cluster/dht/src/dht-helper.c4
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c12
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c4
-rw-r--r--xlators/cluster/dht/src/tier.c10
-rw-r--r--xlators/cluster/dht/src/tier.h2
7 files changed, 25 insertions, 25 deletions
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index 45218d23482..1d6564cb962 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -1967,7 +1967,7 @@ cont:
DHT_STRIP_PHASE1_FLAGS (&local->stbuf);
dht_set_fixed_dir_stat (&local->postparent);
- /* local->stbuf is udpated only from subvols which have a layout
+ /* local->stbuf is updated only from subvols which have a layout
* The reason is to avoid choosing attr heal source from newly
* added bricks. In case e.g we have only one subvol and for
* some reason layout is not present on it, then local->stbuf
@@ -2454,7 +2454,7 @@ dht_lookup_everywhere_done (call_frame_t *frame, xlator_t *this)
*
* Performing deletion of stale link file when
* setting key in dict fails, may cause the data
- * loss becase of the above mentioned race.
+ * loss because of the above mentioned race.
*/
@@ -3255,9 +3255,9 @@ dht_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
"Entry %s missing on subvol %s",
loc->path, prev->name);
- /* lookup-optimize supercedes lookup-unhashed settings,
+ /* lookup-optimize supersedes lookup-unhashed settings,
* - so if it is set, do not process search_unhashed
- * - except, in the case of rebalance deamon, we want to
+ * - except, in the case of rebalance daemon, we want to
* force the lookup_everywhere behavior */
if (!conf->defrag && conf->lookup_optimize && loc->parent) {
ret = dht_inode_ctx_layout_get (loc->parent, this,
@@ -4429,7 +4429,7 @@ dht_vgetxattr_fill_and_set (dht_local_t *local, dict_t **dict, xlator_t *this,
*
* For node-uuid we just don't have all the pretty formatting,
* but since this is a generic routine for pathinfo & node-uuid
- * we dont have conditional space allocation and try to be
+ * we don't have conditional space allocation and try to be
* generic
*/
local->alloc_len += (2 * strlen (this->name))
@@ -6122,7 +6122,7 @@ dht_setxattr (call_frame_t *frame, xlator_t *this,
* promotions and demotions are multithreaded
* so the original frame from gf_defrag_start()
* is not carried. A new frame will be created when
- * we do syncop_setxattr(). This doesnot have the
+ * we do syncop_setxattr(). This does not have the
* frame->root->pid of the original frame. So we pass
* this dic key-value when we do syncop_setxattr() to do
* data migration and set the frame->root->pid to
@@ -8417,7 +8417,7 @@ dht_link_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto out;
}
- /* Update parent on success, even if P1/2 checks are positve.
+ /* Update parent on success, even if P1/2 checks are positive.
* The second call on success will further update the parent */
if (local->loc.parent) {
dht_inode_ctx_time_update (local->loc.parent, this,
@@ -9933,7 +9933,7 @@ dht_rmdir_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
goto unlock;
}
- /* Track if rmdir succeeded on atleast one subvol*/
+ /* Track if rmdir succeeded on at least one subvol*/
local->fop_succeeded = 1;
dht_iatt_merge (this, &local->preparent, preparent);
dht_iatt_merge (this, &local->postparent, postparent);
diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c
index c2b9b2e37c4..f109615e52c 100644
--- a/xlators/cluster/dht/src/dht-diskusage.c
+++ b/xlators/cluster/dht/src/dht-diskusage.c
@@ -470,7 +470,7 @@ dht_subvol_with_free_space_inodes(xlator_t *this, xlator_t *subvol, xlator_t *ig
}
-/* Get subvol which has atleast one inode and maximum space */
+/* Get subvol which has at least one inode and maximum space */
xlator_t *
dht_subvol_maxspace_nonzeroinode (xlator_t *this, xlator_t *subvol,
dht_layout_t *layout)
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 018389d31eb..561d1199e10 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -1322,7 +1322,7 @@ dht_migration_complete_check_task (void *data)
inode = (!local->fd) ? local->loc.inode : local->fd->inode;
/* getxattr on cached_subvol for 'linkto' value. Do path based getxattr
- * as root:root. If a fd is already open, access check wont be done*/
+ * as root:root. If a fd is already open, access check won't be done*/
if (!local->loc.inode) {
ret = syncop_fgetxattr (src_node, local->fd, &dict,
@@ -1600,7 +1600,7 @@ dht_rebalance_inprogress_task (void *data)
inode = (!local->fd) ? local->loc.inode : local->fd->inode;
/* getxattr on cached_subvol for 'linkto' value. Do path based getxattr
- * as root:root. If a fd is already open, access check wont be done*/
+ * as root:root. If a fd is already open, access check won't be done*/
if (local->loc.inode) {
SYNCTASK_SETID (0, 0);
ret = syncop_getxattr (src_node, &local->loc, &dict,
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 3b986be97e0..1f1beb8dca3 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -815,7 +815,7 @@ __dht_rebalance_create_dst_file (xlator_t *this, xlator_t *to, xlator_t *from,
*server (posix_layer) and binding it in server (incrementing fd count),
*so if in that time-gap, if other process sends unlink considering it
*as a linkto file, because inode->fd count will be 0, so file will be
- *unlinked at the backend. And because furthur operations are performed
+ *unlinked at the backend. And because further operations are performed
*on fd, so though migration will be done but will end with no file
*at the backend.
*/
@@ -1017,9 +1017,9 @@ __dht_check_free_space (xlator_t *this, xlator_t *to, xlator_t *from,
During rebalance `migrate-data` - Destination subvol experiences
a `reduction` in 'blocks' of free space, at the same time source
subvol gains certain 'blocks' of free space. A valid check is
- necessary here to avoid errorneous move to destination where
+ necessary here to avoid erroneous move to destination where
the space could be scantily available.
- With heterogenous brick support, an actual space comparison could
+ With heterogeneous brick support, an actual space comparison could
prevent any files being migrated to newly added bricks if they are
smaller then the free space available on the existing bricks.
*/
@@ -1119,7 +1119,7 @@ find_new_subvol:
if ((!(*new_subvol)) || (*new_subvol == from)) {
gf_msg (this->name, GF_LOG_WARNING, 0,
DHT_MSG_SUBVOL_INSUFF_SPACE, "Could not find any subvol"
- " with space accomodating the file - %s. Consider "
+ " with space accommodating the file - %s. Consider "
"adding bricks", loc->path);
*target_changed = _gf_false;
@@ -3363,7 +3363,7 @@ gf_defrag_get_entry (xlator_t *this, int i, struct dht_container **container,
tmp_container->df_entry->dict =
dict_ref (df_entry->dict);
- /*Build Container Structue >> END*/
+ /*Build Container Structure >> END*/
ret = 0;
goto out;
@@ -3670,7 +3670,7 @@ gf_defrag_settle_hash (xlator_t *this, gf_defrag_info_t *defrag,
if (conf->local_subvols_cnt == 0 || !conf->lookup_optimize) {
/* Commit hash updates are only done on local subvolumes and
- * only when lookup optmization is needed (for older client
+ * only when lookup optimization is needed (for older client
* support)
*/
return 0;
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 6c526bd6990..5d5c8e86ddf 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -1462,7 +1462,7 @@ dht_selfheal_dir_mkdir_lock_cbk (call_frame_t *frame, void *cookie,
if (op_ret < 0) {
/* We get this error when the directory entry was not created
- * on a newky attatched tier subvol. Hence proceed and do mkdir
+ * on a newky attached tier subvol. Hence proceed and do mkdir
* on the tier subvol.
*/
if (op_errno == EINVAL) {
@@ -2047,7 +2047,7 @@ dht_selfheal_dir_getafix (call_frame_t *frame, loc_t *loc,
overlaps = local->selfheal.overlaps_cnt;
if (holes || overlaps) {
- /* If the layout has anomolies which would change the hash
+ /* If the layout has anomalies which would change the hash
* ranges, then we need to reset the commit_hash for this
* directory, as the layout would change and things may not
* be in place as expected */
diff --git a/xlators/cluster/dht/src/tier.c b/xlators/cluster/dht/src/tier.c
index 45a19d96243..fd57ddfaaab 100644
--- a/xlators/cluster/dht/src/tier.c
+++ b/xlators/cluster/dht/src/tier.c
@@ -564,7 +564,7 @@ tier_set_migrate_data (dict_t *migrate_data)
* promotions and demotions are multithreaded
* so the original frame from gf_defrag_start()
* is not carried. A new frame will be created when
- * we do syncop_setxattr(). This doesnot have the
+ * we do syncop_setxattr(). This does not have the
* frame->root->pid of the original frame. So we pass
* this dic key-value when we do syncop_setxattr() to do
* data migration and set the frame->root->pid to
@@ -964,7 +964,7 @@ tier_migrate_using_query_file (void *_args)
* per_file_status and per_link_status
* 0 : success
* -1 : failure
- * 1 : ignore the status and dont count for migration
+ * 1 : ignore the status and don't count for migration
* */
int per_file_status = 0;
int per_link_status = 0;
@@ -2444,7 +2444,7 @@ static void
while (1) {
/*
- * Check if a graph switch occured. If so, stop migration
+ * Check if a graph switch occurred. If so, stop migration
* thread. It will need to be restarted manually.
*/
any = THIS->ctx->active->first;
@@ -2489,8 +2489,8 @@ static void
/* To have proper synchronization amongst all
* brick holding nodes, so that promotion and demotions
- * start atomicly w.r.t promotion/demotion frequency
- * period, all nodes should have thier system time
+ * start atomically w.r.t promotion/demotion frequency
+ * period, all nodes should have their system time
* in-sync with each other either manually set or
* using a NTP server*/
ret = gettimeofday (&current_time, NULL);
diff --git a/xlators/cluster/dht/src/tier.h b/xlators/cluster/dht/src/tier.h
index 764860e6884..ce08fb5a669 100644
--- a/xlators/cluster/dht/src/tier.h
+++ b/xlators/cluster/dht/src/tier.h
@@ -13,7 +13,7 @@
/******************************************************************************/
-/* This is from dht-rebalancer.c as we dont have dht-rebalancer.h */
+/* This is from dht-rebalancer.c as we don't have dht-rebalancer.h */
#include "dht-common.h"
#include "xlator.h"
#include <signal.h>