summaryrefslogtreecommitdiffstats
path: root/xlators/features/bit-rot/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/features/bit-rot/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/features/bit-rot/src')
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.c8
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c6
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.h6
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub-helpers.c6
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c18
5 files changed, 22 insertions, 22 deletions
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
index e393ae0..8e432ae 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.c
@@ -158,7 +158,7 @@ bitd_signature_staleness (xlator_t *this,
}
/**
- * save verison for validation in post compute stage
+ * save version for validation in post compute stage
* c.f. bitd_scrub_post_compute_check()
*/
*stale = signptr->stale ? 1 : 0;
@@ -358,7 +358,7 @@ br_scrubber_scrub_begin (xlator_t *this, struct br_fsscan_entry *fsentry)
skip_stat = _gf_true;
/**
- * open() an fd for subsequent opertaions
+ * open() an fd for subsequent operations
*/
fd = fd_create (linked_inode, 0);
if (!fd) {
@@ -419,7 +419,7 @@ br_scrubber_scrub_begin (xlator_t *this, struct br_fsscan_entry *fsentry)
if (!skip_stat)
br_inc_scrubbed_file (&priv->scrub_stat);
- GF_FREE (sign); /* alloced on post-compute */
+ GF_FREE (sign); /* allocated on post-compute */
/** fd_unref() takes care of closing fd.. like syncop_close() */
@@ -1910,7 +1910,7 @@ br_monitor_thread (void *arg)
/*
* Since, this is the topmost xlator, THIS has to be set by bit-rot
- * xlator itself (STACK_WIND wont help in this case). Also it has
+ * xlator itself (STACK_WIND won't help in this case). Also it has
* to be done for each thread that gets spawned. Otherwise, a new
* thread will get global_xlator's pointer when it does "THIS".
*/
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index a9b70b6..66e5894 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -947,7 +947,7 @@ out:
* last run for whatever reason (node crashes, reboots, etc..) become
* candidates for signing. This allows the signature to "catch up" with
* the current state of the object. Triggering signing is easy: perform
- * an open() followed by a close() therby resulting in call boomerang.
+ * an open() followed by a close() thereby resulting in call boomerang.
* (though not back to itself :))
*/
int
@@ -999,7 +999,7 @@ bitd_oneshot_crawl (xlator_t *subvol,
* In this case syncop_getxattr fails with ENODATA and the object
* is signed. (In real, when crawler sends lookup, bit-rot-stub
* creates the xattrs before returning lookup reply)
- * 2) Bit-rot was not enabled or BitD was dows for some reasons, during
+ * 2) Bit-rot was not enabled or BitD was does for some reasons, during
* which some files were created, but since BitD was down, were not
* signed.
* If the file was just created and was being written some data when
@@ -1457,7 +1457,7 @@ br_handle_events (void *arg)
/*
* Since, this is the topmost xlator, THIS has to be set by bit-rot
- * xlator itself (STACK_WIND wont help in this case). Also it has
+ * xlator itself (STACK_WIND won't help in this case). Also it has
* to be done for each thread that gets spawned. Otherwise, a new
* thread will get global_xlator's pointer when it does "THIS".
*/
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.h b/xlators/features/bit-rot/src/bitd/bit-rot.h
index c2c0c22..670060c 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.h
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.h
@@ -77,7 +77,7 @@ typedef enum br_child_state {
struct br_child {
pthread_mutex_t lock; /* protects child state */
- char witnessed; /* witnessed at least one succesfull
+ char witnessed; /* witnessed at least one successful
connection */
br_child_state_t c_state; /* current state of this child */
@@ -123,7 +123,7 @@ struct br_scrubber {
/**
* frequency of scanning for this subvolume. this should
- * normally be per-child, but since all childs follow the
+ * normally be per-child, but since all children follow the
* same frequency for a volume, this option ends up here
* instead of br_child_t.
*/
@@ -225,7 +225,7 @@ struct br_object {
uuid_t gfid;
- unsigned long signedversion; /* version aginst which this object will
+ unsigned long signedversion; /* version against which this object will
be signed */
br_child_t *child; /* object's subvolume */
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub-helpers.c b/xlators/features/bit-rot/src/stub/bit-rot-stub-helpers.c
index fff7a7e..cc1a6e9 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub-helpers.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub-helpers.c
@@ -232,7 +232,7 @@ br_stub_check_stub_file (xlator_t *this, char *path)
if (fd < 0)
gf_msg (this->name, GF_LOG_ERROR, errno,
BRS_MSG_BAD_OBJECT_DIR_FAIL,
- "Failed ot create stub file [%s]", path);
+ "Failed to create stub file [%s]", path);
}
if (fd >= 0) {
@@ -244,7 +244,7 @@ br_stub_check_stub_file (xlator_t *this, char *path)
error_return:
gf_msg (this->name, GF_LOG_ERROR, errno,
- BRS_MSG_BAD_OBJECT_DIR_FAIL, "Failed ot verify stub file [%s]", path);
+ BRS_MSG_BAD_OBJECT_DIR_FAIL, "Failed to verify stub file [%s]", path);
return -1;
}
@@ -771,7 +771,7 @@ out:
/**
* NOTE: If the file has multiple hardlinks (in gluster volume
-* namespace), the path would be one of the hardlinks. Its upto
+* namespace), the path would be one of the hardlinks. Its up to
* the user to find the remaining hardlinks (using find -samefile)
* and remove them.
**/
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index 8303570..c485348 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -196,7 +196,7 @@ init (xlator_t *this)
* incremented upon modification.
* So object versioning is tied to bitrot daemon's signing. In future, object
* versioning might be necessary for other things as well apart from bit-rot
- * detection (well thats the objective of bringing in object-versioning :)).
+ * detection (well that's the objective of bringing in object-versioning :)).
* In that case, better to make versioning a new option and letting it to be
* enabled despite bit-rot detection is not needed.
* Ex: ICAP.
@@ -501,7 +501,7 @@ br_stub_need_versioning (xlator_t *this,
/* Bitrot stub inode context was initialized only in lookup, create
* and mknod cbk path. Object versioning was enabled by default
- * irrespective of bitrot enbaled or not. But it's made optional now.
+ * irrespective of bitrot enabled or not. But it's made optional now.
* As a consequence there could be cases where getting inode ctx would
* fail because it's not set yet.
* e.g., If versioning (with bitrot enable) is enabled while I/O is
@@ -738,7 +738,7 @@ br_stub_fd_incversioning_cbk (call_frame_t *frame,
/**
* perform full or incremental versioning on an inode pointd by an
* fd. incremental versioning is done when an inode is dirty and a
- * writeback is trigerred.
+ * writeback is triggered.
*/
int
@@ -1761,7 +1761,7 @@ br_stub_getxattr (call_frame_t *frame, xlator_t *this,
/**
* If xattr is node-uuid and the inode is marked bad, return EIO.
* Returning EIO would result in AFR to choose correct node-uuid
- * coresponding to the subvolume * where the good copy of the
+ * corresponding to the subvolume * where the good copy of the
* file resides.
*/
if (IA_ISREG (loc->inode->ia_type) && XATTR_IS_NODE_UUID (name) &&
@@ -1841,7 +1841,7 @@ br_stub_fgetxattr (call_frame_t *frame, xlator_t *this,
/**
* If xattr is node-uuid and the inode is marked bad, return EIO.
* Returning EIO would result in AFR to choose correct node-uuid
- * coresponding to the subvolume * where the good copy of the
+ * corresponding to the subvolume * where the good copy of the
* file resides.
*/
if (IA_ISREG (fd->inode->ia_type) && XATTR_IS_NODE_UUID (name) &&
@@ -1979,7 +1979,7 @@ br_stub_writev_resume (call_frame_t *frame, xlator_t *this, fd_t *fd,
* This is probably the most crucial part about the whole versioning thing.
* There's absolutely no differentiation as such between an anonymous fd
* and a regular fd except the fd context initialization. Object versioning
- * is perfomed when the inode is dirty. Parallel write operations are no
+ * is performed when the inode is dirty. Parallel write operations are no
* special with each write performing object versioning followed by marking
* the inode as non-dirty (synced). This is followed by the actual operation
* (writev() in this case) which on a success marks the inode as modified.
@@ -2019,7 +2019,7 @@ br_stub_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
goto unwind;
/**
- * The inode is not dirty and also witnessed atleast one successful
+ * The inode is not dirty and also witnessed at least one successful
* modification operation. Therefore, subsequent operations need not
* perform any special tracking.
*/
@@ -2623,7 +2623,7 @@ br_stub_lookup_version (xlator_t *this,
? obuf->ongoingversion : BITROT_DEFAULT_CURRENT_VERSION;
/**
- * If signature is there, but version is not therem then that status is
+ * If signature is there, but version is not there then that status is
* is treated as INVALID. So in that case, we should not initialize the
* inode context with wrong version names etc.
*/
@@ -3305,7 +3305,7 @@ br_stub_send_ipc_fop (xlator_t *this, fd_t *fd, unsigned long releaseversion,
* 3) BR_SIGN_QUICK => reopen has happened and this release should trigger sign
* 2 events:
* 1) GF_FOP_RELEASE
- * 2) GF_FOP_WRITE (actually a dummy write fro BitD)
+ * 2) GF_FOP_WRITE (actually a dummy write for BitD)
*
* This is how states are changed based on events:
* EVENT: GF_FOP_RELEASE: