diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-07-16 17:03:17 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-07-22 14:40:16 +0000 |
commit | 621138ce763eda8270d0a4f6d7209fd50ada8787 (patch) | |
tree | 7299759993f6e9f7f34dad95fc8d8cd6ffc1b2fd | |
parent | c0e76377d0fc47aa66f35ea70a4793731ebbd40c (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>
173 files changed, 432 insertions, 428 deletions
diff --git a/api/examples/glfsxmp.c b/api/examples/glfsxmp.c index a8e2cc93381..9bfb1d2a81f 100644 --- a/api/examples/glfsxmp.c +++ b/api/examples/glfsxmp.c @@ -1282,7 +1282,7 @@ test_handleops (int argc, char *argv[]) /* extract handle and create from handle test */ printf ("glfs_h_extract_handle and glfs_h_create_from_handle tests: In Progress\n"); - /* TODO: Change the lookup to creat below for a GIFD recovery falure, + /* TODO: Change the lookup to create below for a GIFD recovery failure, * that needs to be fixed */ leaf = glfs_h_lookupat (fs, parent, leaf_name1, &sb, 0); if (leaf == NULL) { @@ -1417,7 +1417,7 @@ test_handleops (int argc, char *argv[]) } peek_stat (&sb); - /* TODO: creat op on a FIFO node hangs, need to check and fix + /* TODO: create op on a FIFO node hangs, need to check and fix tmp = glfs_h_creat (fs, parent, newnod_name, O_CREAT, 0644, &sb); if (tmp != NULL || errno != EINVAL) { fprintf (stderr, "glfs_h_creat: node create, tmp = (%p), errno = %s\n", diff --git a/api/src/glfs-fops.c b/api/src/glfs-fops.c index 476120b58f0..870b287c2a7 100644 --- a/api/src/glfs-fops.c +++ b/api/src/glfs-fops.c @@ -52,7 +52,7 @@ glfs_mark_glfd_for_deletion (struct glfs_fd *glfd) return 0; } -/* This function is usefull for all async fops. There is chance that glfd is +/* This function is useful for all async fops. There is chance that glfd is * closed before async fop is completed. When glfd is closed we change the * state to GLFD_CLOSE. * @@ -539,7 +539,7 @@ pub_glfs_creat (struct glfs *fs, const char *path, int flags, mode_t mode) /* This must be glfs_resolve() and NOT glfs_lresolve(). That is because open("name", O_CREAT) where "name" is a danging symlink must create the dangling - destinataion. + destination. */ retry: ret = glfs_resolve (fs, subvol, path, &loc, &iatt, reval); @@ -5299,7 +5299,7 @@ out: * to be read by the applications. * * In case if the application registers a cbk function, that shall - * be called by this routine incase of any event received. + * be called by this routine in case of any event received. * The cbk fn is responsible for notifying the * applications the way it desires for each event queued (for eg., * can raise a signal or broadcast a cond variable etc.) diff --git a/api/src/glfs-handleops.c b/api/src/glfs-handleops.c index 97f5cdc8fed..e40adf04d3d 100644 --- a/api/src/glfs-handleops.c +++ b/api/src/glfs-handleops.c @@ -1946,7 +1946,7 @@ glfs_h_poll_cache_invalidation (struct glfs *fs, up_inode_arg->flags = ca_data->flags; up_inode_arg->expire_time_attr = ca_data->expire_time_attr; - /* XXX: Update stat as well incase of UP_*_TIMES. + /* XXX: Update stat as well in case of UP_*_TIMES. * This will be addressed as part of INODE_UPDATE */ if (ca_data->flags & GFAPI_INODE_UPDATE_FLAGS) { glfs_iatt_to_stat (fs, &ca_data->stat, &up_inode_arg->buf); @@ -2021,7 +2021,7 @@ void glfs_release_upcall (void *ptr) /* * This API is used to poll for upcall events stored in the upcall list. - * Current users of this API is NFS-Ganesha. Incase of any event received, it + * Current users of this API is NFS-Ganesha. In case of any event received, it * will be mapped appropriately into 'glfs_upcall' along with the handle object * to be passed to NFS-Ganesha. * @@ -2163,13 +2163,13 @@ GFAPI_SYMVER_PUBLIC_DEFAULT(glfs_h_poll_upcall, 3.7.16); static gf_boolean_t log_upcall370 = _gf_true; /* log once */ -/* The old glfs_h_poll_upcall interface requires intimite knowledge of the +/* The old glfs_h_poll_upcall interface requires intimate knowledge of the * structures that are returned to the calling application. This is not * recommended, as the returned structures need to returned correctly (handles * closed, memory free'd with the unavailable GF_FREE(), and possibly more.) * * To the best of our knowledge, only NFS-Ganesha uses the upcall events - * through gfapi. We keep this backwards compatability function around so that + * through gfapi. We keep this backwards compatibility function around so that * applications using the existing implementation do not break. * * WARNING: this function will be removed in the future. diff --git a/api/src/glfs-handles.h b/api/src/glfs-handles.h index a5c6ff37043..4b336909b57 100644 --- a/api/src/glfs-handles.h +++ b/api/src/glfs-handles.h @@ -47,7 +47,7 @@ * */ -/* Values for valid falgs to be used when using XXXsetattr, to set multiple +/* Values for valid flags to be used when using XXXsetattr, to set multiple attribute values passed via the related stat structure. */ #define GFAPI_SET_ATTR_MODE 0x1 @@ -275,7 +275,7 @@ glfs_h_access (glfs_t *fs, glfs_object_t *object, int mask) __THROW This API is used to poll for upcall events stored in the upcall list. Current users of this API is NFS-Ganesha. - Incase of any event received, it will be mapped appropriately + In case of any event received, it will be mapped appropriately into 'glfs_upcall' along with the handle('glfs_object') to be passed to NFS-Ganesha. diff --git a/api/src/glfs-internal.h b/api/src/glfs-internal.h index 4416b78650f..52048f4592d 100644 --- a/api/src/glfs-internal.h +++ b/api/src/glfs-internal.h @@ -170,11 +170,12 @@ struct glfs { * progress */ xlator_t *next_subvol; /* Any new graph is put to * next_subvol, the graph in - * next_subvol can either be move to - * mip_subvol (if any IO picks it up - * for migration), or be detroyed (if - * there is a new graph, and this was - * never picked for migration) */ + * next_subvol can either be moved + * to mip_subvol (if any IO picks it + * up for migration), or be + * destroyed (if there is a new + * graph, and this was never picked + * for migration) */ xlator_t *old_subvol; char *oldvolfile; diff --git a/api/src/glfs-resolve.c b/api/src/glfs-resolve.c index 5c500480239..4b764d94122 100644 --- a/api/src/glfs-resolve.c +++ b/api/src/glfs-resolve.c @@ -319,7 +319,7 @@ glfs_resolve_component (struct glfs *fs, xlator_t *subvol, inode_t *parent, * parent : output_dir * component : "dir" * - * Incase of nameless lookup, both "." and ".." retained + * In case of nameless lookup, both "." and ".." retained */ if (strcmp (component, ".") == 0) { @@ -987,7 +987,7 @@ priv_glfs_subvol_done (struct glfs *fs, xlator_t *subvol) /* For decrementing subvol->wind ref count we need not check/wait for * migration-in-progress flag. * Also glfs_subvol_done is called in call-back path therefore waiting - * fot migration-in-progress flag can lead to dead-lock. + * for migration-in-progress flag can lead to dead-lock. */ glfs_lock (fs, _gf_false); { diff --git a/api/src/glfs.c b/api/src/glfs.c index 545015fd58c..694e5e6f947 100644 --- a/api/src/glfs.c +++ b/api/src/glfs.c @@ -1231,7 +1231,7 @@ glusterfs_ctx_destroy (glusterfs_ctx_t *ctx) /* Free all the graph structs and its containing xlator_t structs * from this point there should be no reference to GF_FREE/GF_CALLOC - * as it will try to access mem_acct and the below funtion would + * as it will try to access mem_acct and the below function would * have freed the same. */ list_for_each_entry_safe (trav_graph, tmp, &ctx->graphs, list) { @@ -1666,7 +1666,7 @@ pub_glfs_upcall_register (struct glfs *fs, uint32_t event_list, goto out; } - /* incase other thread does unregister */ + /* in case other thread does unregister */ pthread_mutex_lock (&fs->mutex); { if (event_list & GLFS_EVENT_INODE_INVALIDATE) { diff --git a/api/src/glfs.h b/api/src/glfs.h index b0f6605253a..3681cd11450 100644 --- a/api/src/glfs.h +++ b/api/src/glfs.h @@ -336,8 +336,8 @@ glfs_get_volfile (glfs_t *fs, void *buf, size_t len) __THROW the management server (glusterd) to fetch volume uuid and stores it in the glusterfs_context linked to the glfs object fs which can be used in the subsequent calls. Later it parses that UUID to convert it from - cannonical string format into an opaque byte array and copy it into - the volid array. Incase if either of the input parameters, volid or size, + canonical string format into an opaque byte array and copy it into + the volid array. In case if either of the input parameters, volid or size, is NULL, number of bytes required to copy the volume UUID is returned. PARAMETERS @@ -992,7 +992,7 @@ glfs_xreaddirplus_get_stat (glfs_xreaddirp_stat_t *xstat) __THROW * GFAPI_XREADDIRP_HANDLE * @ext: Dirent struture to copy the values to * (though optional recommended to be allocated by application - * esp., in multi-threaded environement) + * esp., in multi-threaded environment) * * OUTPUT: * @res: to store the next dirent value. If NULL and return value is '0', @@ -1151,7 +1151,7 @@ typedef void (*glfs_upcall_cbk) (glfs_upcall_t *up_arg, void *data); * Current available values are: * - GFAPI_UPCALL_INODE_INVALIDATE * - * @cbk: The cbk routine to be invoked incase of any upcall received + * @cbk: The cbk routine to be invoked in case of any upcall received * @data: Any opaque pointer provided by caller which shall be using while * making cbk calls. This pointer may be used by caller for any of its * internal use while processing upcalls. Can be NULL. @@ -1252,11 +1252,11 @@ typedef void (*glfs_recall_cbk) (glfs_lease_t lease, void *data); @data: It is a cookie, this pointer is returned as a part of recall fn and data field are stored as a part of glfs_fd, hence if there are multiple - glfs_lease calls, each of them updates the fn and data fileds. glfs_recall_cbk + glfs_lease calls, each of them updates the fn and data fields. glfs_recall_cbk will be invoked with the last updated fn and data RETURN VALUES - 0: Successfull completion + 0: Successful completion <0: Failure. @errno will be set with the type of failure */ diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c index ee7e8f94c9e..099ba403ee8 100644 --- a/cli/src/cli-cmd-volume.c +++ b/cli/src/cli-cmd-volume.c @@ -1495,7 +1495,7 @@ _limits_set_on_volume (char *volname, int type) { else gfid_type = GF_QUOTA_CONF_TYPE_OBJECTS; - /* Try to read atleast one gfid of type 'gfid_type' */ + /* Try to read at least one gfid of type 'gfid_type' */ while (1) { ret = quota_conf_read_gfid (fd, buf, &gfid_type_stored, version); diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index 602267b06a2..b3a35c312b8 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -3641,7 +3641,7 @@ print_quota_list_from_mountdir (cli_local_t *local, char *mountdir, case ENOATTR: #endif /* If it's an ENOATTR, quota/inode-quota is - * configured(limit is set atleast for one directory). + * configured(limit is set at least for one directory). * The user is trying to issue 'list/list-objects' * command for a directory on which quota limit is * not set and we are showing the used-space in case @@ -4060,7 +4060,7 @@ out: * the results and hangs, because same thread has already holding * the lock * - * Broadcasting response in a seperate thread which is not a + * Broadcasting response in a separate thread which is not a * good fix. This needs to be re-visted with better solution */ if (ret == -1) { diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index a709ed5a6c7..ec65cd30f5e 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -42,7 +42,7 @@ enum gf_task_types { * } * #endif * - * Following the above formate ensures that all xml related code is compliled + * Following the above format ensures that all xml related code is compiled * only when libxml2 is present, and also keeps the rest of the codebase free * of #if (HAVE_LIB_XML) */ @@ -5082,7 +5082,7 @@ cli_xml_snapshot_info (xmlTextWriterPtr writer, xmlDocPtr doc, dict_t *dict) snap_driven = dict_get_str_boolean (dict, "snap-driven", _gf_false); - /* If the approach is volume based then we should display orgin volume + /* If the approach is volume based then we should display origin volume * information first followed by per snap info*/ if (!snap_driven) { ret = cli_xml_snapshot_info_orig_vol (writer, doc, dict, ""); diff --git a/cli/src/cli.c b/cli/src/cli.c index b58f211d3dd..1ae56e8f534 100644 --- a/cli/src/cli.c +++ b/cli/src/cli.c @@ -416,7 +416,7 @@ cli_opt_parse (char *opt, struct cli_state *state) } } else { - cli_err ("invalide secure-mgmt value (ignored)"); + cli_err ("invalid secure-mgmt value (ignored)"); } return 0; } diff --git a/contrib/argp-standalone/argp-help.c b/contrib/argp-standalone/argp-help.c index ced78c4cb26..5ad758f0726 100644 --- a/contrib/argp-standalone/argp-help.c +++ b/contrib/argp-standalone/argp-help.c @@ -176,7 +176,7 @@ static const struct uparam_name uparam_names[] = { 0, 0, 0 } }; -/* Read user options from the environment, and fill in UPARAMS appropiately. */ +/* Read user options from the environment, and fill in UPARAMS appropriately.*/ static void fill_in_uparams (const struct argp_state *state) { @@ -286,11 +286,11 @@ fill_in_uparams (const struct argp_state *state) -xARG, -yARG, --long1=ARG, --long2=ARG Documentation... Where ARG will be omitted if there's no argument, for this option, or - will be surrounded by "[" and "]" appropiately if the argument is - optional. The documentation string is word-wrapped appropiately, and if + will be surrounded by "[" and "]" appropriately if the argument is + optional. The documentation string is word-wrapped appropriately, and if the list of options is long enough, it will be started on a separate line. If there are no short options for a given option, the first long option is - indented slighly in a way that's supposed to make most long options appear + indented slightly in a way that's supposed to make most long options appear to be in a separate column. For example, the following output (from ps): @@ -745,7 +745,7 @@ hol_entry_cmp (const struct hol_entry *entry1, if (entry1->cluster != entry2->cluster) { /* The entries are not within the same cluster, so we can't compare them - directly, we have to use the appropiate clustering level too. */ + directly, we have to use the appropriate clustering level too. */ if (! entry1->cluster) /* ENTRY1 is at the `base level', not in a cluster, so we have to compare it's group number with that of the base cluster in which @@ -1006,7 +1006,7 @@ filter_doc (const char *doc, int key, const struct argp *argp, return doc; } -/* Prints STR as a header line, with the margin lines set appropiately, and +/* Prints STR as a header line, with the margin lines set appropriately, and notes the fact that groups should be separated with a blank line. ARGP is the argp that should dictate any user doc filtering to take place. Note that the previous wrap margin isn't restored, but the left margin is reset @@ -1462,7 +1462,7 @@ argp_args_usage (const struct argp *argp, const struct argp_state *state, } /* Print the documentation for ARGP to STREAM; if POST is false, then - everything preceeding a `\v' character in the documentation strings (or + everything preceding a `\v' character in the documentation strings (or the whole string, for those with none) is printed, otherwise, everything following the `\v' character (nothing for strings without). Each separate bit of documentation is separated a blank line, and if PRE_BLANK is true, @@ -1555,7 +1555,7 @@ argp_doc (const struct argp *argp, const struct argp_state *state, } /* Output a usage message for ARGP to STREAM. If called from - argp_state_help, STATE is the relevent parsing state. FLAGS are from the + argp_state_help, STATE is the relevant parsing state. FLAGS are from the set ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */ diff --git a/contrib/argp-standalone/argp-parse.c b/contrib/argp-standalone/argp-parse.c index 78f7bf139b6..4ed8bb2ed67 100644 --- a/contrib/argp-standalone/argp-parse.c +++ b/contrib/argp-standalone/argp-parse.c @@ -208,7 +208,7 @@ struct group /* Which argp this group is from. */ const struct argp *argp; - /* The number of non-option args sucessfully handled by this parser. */ + /* The number of non-option args successfully handled by this parser. */ unsigned args_processed; /* This group's parser's parent's group. */ diff --git a/contrib/argp-standalone/argp.h b/contrib/argp-standalone/argp.h index 29d3dfe9720..cfb7345e4d9 100644 --- a/contrib/argp-standalone/argp.h +++ b/contrib/argp-standalone/argp.h @@ -263,7 +263,7 @@ struct argp }; /* Possible KEY arguments to a help filter function. */ -#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */ +#define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceding options. */ #define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */ #define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */ #define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation; @@ -477,7 +477,7 @@ extern void __argp_help (__const struct argp *__restrict __argp, parsing routine (thus taking an argp_state structure as the first argument). They may or may not print an error message and exit, depending on the flags in STATE -- in any case, the caller should be prepared for - them *not* to exit, and should return an appropiate error after calling + them *not* to exit, and should return an appropriate error after calling them. [argp_usage & argp_error should probably be called argp_state_..., but they're used often enough that they should be short] */ diff --git a/contrib/uuid/gen_uuid_nt.c b/contrib/uuid/gen_uuid_nt.c index 91828b7a13b..88ec49468ef 100644 --- a/contrib/uuid/gen_uuid_nt.c +++ b/contrib/uuid/gen_uuid_nt.c @@ -51,7 +51,7 @@ NtAllocateUuids_2000)( // -// Nice, but instead of including ntddk.h ot winnt.h +// Nice, but instead of including ntddk.h or winnt.h // I should define it here because they MISSED __stdcall in those headers. // diff --git a/events/eventskeygen.py b/events/eventskeygen.py index 3badc05f359..4ccedea8f9e 100644 --- a/events/eventskeygen.py +++ b/events/eventskeygen.py @@ -22,7 +22,7 @@ gen_header_type = sys.argv[1] # When adding new keys add it to the END keys = ( # user driven events - #peer and volume managment events + #peer and volume management events "EVENT_PEER_ATTACH", "EVENT_PEER_DETACH", "EVENT_VOLUME_CREATE", diff --git a/events/src/utils.py b/events/src/utils.py index c1c0bccfe66..0ec7051ec28 100644 --- a/events/src/utils.py +++ b/events/src/utils.py @@ -408,8 +408,8 @@ def webhook_monitor(proc_queue, webhooks): class WebhookThreadPool(object): def start(self): - # Seperate process to emit messages to webhooks - # which maintains one thread per webhook. Seperate + # Separate process to emit messages to webhooks + # which maintains one thread per webhook. Separate # process is required since on reload we need to stop # and start the thread pool. In Python Threads can't be stopped # so terminate the process and start again. Note: In transit diff --git a/extras/distributed-testing/distributed-test-runner.py b/extras/distributed-testing/distributed-test-runner.py index b2cf32ef1bb..4d6313625db 100755 --- a/extras/distributed-testing/distributed-test-runner.py +++ b/extras/distributed-testing/distributed-test-runner.py @@ -37,7 +37,7 @@ def socket_instance(address_family): elif address_family.upper() == 'ipv6'.upper(): return socket.socket(socket.AF_INET6, socket.SOCK_STREAM) else: - Log.error("Invalid IP addess family") + Log.error("Invalid IP address family") sys.exit(1) diff --git a/extras/git-branch-diff.py b/extras/git-branch-diff.py index 3c29e35bd7b..382513e069e 100755 --- a/extras/git-branch-diff.py +++ b/extras/git-branch-diff.py @@ -128,7 +128,7 @@ class GitBranchDiff: exit(status_tbr) def check_author_exist (self): - " defend to check given author exist, format incase of multiple" + " defend to check given author exist, format in case of multiple" contrib_list = ['', '*', 'all', 'All', 'ALL', 'null', 'Null', 'NULL'] if self.g_author in contrib_list: self.g_author = "" @@ -190,7 +190,7 @@ class GitBranchDiff: '--author', help = 'default: git config name/email, ' 'to provide multiple specify comma' - ' seperated values', + ' separated values', default = author, dest = 'author') self.parser.add_argument('-p', diff --git a/extras/quota/xattr_analysis.py b/extras/quota/xattr_analysis.py index a68eb341e19..780ff340677 100755 --- a/extras/quota/xattr_analysis.py +++ b/extras/quota/xattr_analysis.py @@ -3,7 +3,7 @@ # 1. Display xattr of entire FS tree in a human readable form # 2. Display all the directory where contri and size mismatch. # (If there are any directory with contri and size mismatch that are not dirty -# then that highlights a propogation issue) +# then that highlights a propagation issue) # The script takes only one input LOG _FILE generated from the command, # find <brick_path> | xargs getfattr -d -m. -e hex > log_gluster_xattr @@ -15,7 +15,7 @@ from hurry.filesize import size if len(sys.argv) < 2: sys.exit('Usage: %s log_gluster_xattr \n' - 'to genereate log_gluster_xattr use: \n' + 'to generate log_gluster_xattr use: \n' 'find <brick_path> | xargs getfattr -d -m. -e hex > log_gluster_xattr' % sys.argv[0]) LOG_FILE=sys.argv[1] diff --git a/extras/snap_scheduler/snap_scheduler.py b/extras/snap_scheduler/snap_scheduler.py index e461ef4f1dc..f0868d8b57d 100755 --- a/extras/snap_scheduler/snap_scheduler.py +++ b/extras/snap_scheduler/snap_scheduler.py @@ -730,7 +730,7 @@ def perform_operation(args): if ret == 0: subprocess.Popen(["touch", "-h", GCRON_TASKS]) gf_event (EVENT_SNAPSHOT_SCHEDULER_DISABLED, - status="Successfuly Disabled") + status="Successfully Disabled") else: gf_event (EVENT_SNAPSHOT_SCHEDULER_DISABLE_FAILED, error=print_error(ret)) @@ -765,7 +765,7 @@ def perform_operation(args): if ret == 0: subprocess.Popen(["touch", "-h", GCRON_TASKS]) gf_event (EVENT_SNAPSHOT_SCHEDULER_ENABLED, - status="Successfuly Enabled") + status="Successfully Enabled") else: gf_event (EVENT_SNAPSHOT_SCHEDULER_ENABLE_FAILED, error=print_error(ret)) @@ -777,7 +777,7 @@ def perform_operation(args): if ret == 0: subprocess.Popen(["touch", "-h", GCRON_TASKS]) gf_event (EVENT_SNAPSHOT_SCHEDULER_DISABLED, - status="Successfuly Disabled") + status="Successfully Disabled") else: gf_event (EVENT_SNAPSHOT_SCHEDULER_DISABLE_FAILED, error=print_error(ret)) @@ -797,7 +797,7 @@ def perform_operation(args): if ret == 0: subprocess.Popen(["touch", "-h", GCRON_TASKS]) gf_event (EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_ADDED, - status="Successfuly added job "+args.jobname) + status="Successfully added job "+args.jobname) else: gf_event (EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_ADD_FAILED, status="Failed to add job "+args.jobname, @@ -813,7 +813,7 @@ def perform_operation(args): if ret == 0: subprocess.Popen(["touch", "-h", GCRON_TASKS]) gf_event (EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_DELETED, - status="Successfuly deleted job "+args.jobname) + status="Successfully deleted job "+args.jobname) else: gf_event (EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_DELETE_FAILED, status="Failed to delete job "+args.jobname, @@ -829,7 +829,7 @@ def perform_operation(args): if ret == 0: subprocess.Popen(["touch", "-h", GCRON_TASKS]) gf_event (EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_EDITED, - status="Successfuly edited job "+args.jobname) + status="Successfully edited job "+args.jobname) else: gf_event (EVENT_SNAPSHOT_SCHEDULER_SCHEDULE_EDIT_FAILED, status="Failed to edit job "+args.jobname, diff --git a/geo-replication/syncdaemon/gsyncdconfig.py b/geo-replication/syncdaemon/gsyncdconfig.py index b2517f031ca..86b942d6dc9 100644 --- a/geo-replication/syncdaemon/gsyncdconfig.py +++ b/geo-replication/syncdaemon/gsyncdconfig.py @@ -50,7 +50,7 @@ class Gconf(object): self.args = args self.extra_tmpl_args = extra_tmpl_args self.override_from_args = override_from_args - # Store default values only if overwriten, Only for JSON/CLI output + # Store default values only if overwritten, Only for JSON/CLI output self.default_values = {} self._load() diff --git a/geo-replication/syncdaemon/libcxattr.py b/geo-replication/syncdaemon/libcxattr.py index f576648b7a8..2d186b95c89 100644 --- a/geo-replication/syncdaemon/libcxattr.py +++ b/geo-replication/syncdaemon/libcxattr.py @@ -14,7 +14,7 @@ from ctypes import CDLL, create_string_buffer, get_errno class Xattr(object): - """singleton that wraps the extended attribues system + """singleton that wraps the extended attributes system interface for python using ctypes Just implement it to the degree we need it, in particular diff --git a/geo-replication/syncdaemon/master.py b/geo-replication/syncdaemon/master.py index 665a51f64dd..ac31e3fb81a 100644 --- a/geo-replication/syncdaemon/master.py +++ b/geo-replication/syncdaemon/master.py @@ -192,7 +192,7 @@ class NormalMixin(object): vi = vi.copy() vi['timeout'] = int(time.time()) + timo else: - # send keep-alives more frequently to + # send keep-alive more frequently to # avoid a delay in announcing our volume info # to slave if it becomes established in the # meantime @@ -529,7 +529,7 @@ class GMasterCommon(object): # If crawlwrap is called when partial history available, # then it sets register_time which is the time when geo-rep - # worker registerd to changelog consumption. Since nsec is + # worker registered to changelog consumption. Since nsec is # not considered in register time, their are chances of skipping # changes detection in xsync crawl. This limit will be reset when # crawlwrap is called again. @@ -540,7 +540,7 @@ class GMasterCommon(object): # no need to maintain volinfo state machine. # in a cascading setup, each geo-replication session is # independent (ie. 'volume-mark' and 'xtime' are not - # propogated). This is because the slave's xtime is now + # propagated). This is because the slave's xtime is now # stored on the master itself. 'volume-mark' just identifies # that we are in a cascading setup and need to enable # 'geo-replication.ignore-pid-check' option. @@ -919,6 +919,8 @@ class GMasterChangelogMixin(GMasterCommon): if fix_entry_ops: # Process deletions of entries whose gfids are mismatched failures1 = self.slave.server.entry_ops(fix_entry_ops) + if not failures1: + logging.info("Successfully fixed entry ops with gfid mismatch") return (failures1, fix_entry_ops) @@ -1563,7 +1565,7 @@ class GMasterChangeloghistoryMixin(GMasterChangelogMixin): self.history_crawl_start_time = int(time.time()) self.crawl() else: - # This exeption will be catched in resource.py and + # This exception will be caught in resource.py and # fallback to xsync for the small gap. raise PartialHistoryAvailable(str(actual_end)) diff --git a/geo-replication/syncdaemon/monitor.py b/geo-replication/syncdaemon/monitor.py index 40818427bfe..52ae256fb14 100644 --- a/geo-replication/syncdaemon/monitor.py +++ b/geo-replication/syncdaemon/monitor.py @@ -126,7 +126,7 @@ class Monitor(object): raise def exit_signalled(s): - """ child teminated due to receipt of SIGUSR1 """ + """ child terminated due to receipt of SIGUSR1 """ return (os.WIFSIGNALED(s) and (os.WTERMSIG(s) == signal.SIGUSR1)) def exit_status(s): diff --git a/geo-replication/syncdaemon/repce.py b/geo-replication/syncdaemon/repce.py index 9d5da666858..6910fd068ad 100644 --- a/geo-replication/syncdaemon/repce.py +++ b/geo-replication/syncdaemon/repce.py @@ -193,7 +193,7 @@ class RepceClient(object): """RePCe client is callabe, calling it implements a synchronous remote call. - We do a .push with a cbk which does a wakeup upon receiving anwser, + We do a .push with a cbk which does a wakeup upon receiving answer, then wait on the RepceJob. """ rjob = self.push( diff --git a/geo-replication/syncdaemon/resource.py b/geo-replication/syncdaemon/resource.py index 43e82f30d28..df4006f971a 100644 --- a/geo-replication/syncdaemon/resource.py +++ b/geo-replication/syncdaemon/resource.py @@ -638,7 +638,7 @@ class Server(object): # So both validations are necessary to decide src doesn't # exist. We can't rely on only gfid stat as hardlink could # be present and we can't rely only on name as name could - # exist with differnt gfid. + # exist with different gfid. if not matching_disk_gfid(gfid, entry): if e['stat'] and not stat.S_ISDIR(e['stat']['mode']): if stat.S_ISLNK(e['stat']['mode']) and \ @@ -1400,7 +1400,7 @@ class SSH(object): '--local-node-id', rconf.args.resource_remote_id] + \ [ # Add all config arguments here, slave gsyncd will not use - # config file in slave side, so all overridding options should + # config file in slave side, so all overriding options should # be sent as arguments '--slave-timeout', str(gconf.get("slave-timeout")), '--slave-log-level', gconf.get("slave-log-level"), diff --git a/geo-replication/syncdaemon/syncdutils.py b/geo-replication/syncdaemon/syncdutils.py index f7173017e5d..93e09756198 100644 --- a/geo-replication/syncdaemon/syncdutils.py +++ b/geo-replication/syncdaemon/syncdutils.py @@ -935,7 +935,7 @@ class VolinfoFromGconf(object): # Glusterd will generate following config items before Geo-rep start # So that Geo-rep need not run gluster commands from inside # Volinfo object API/interface kept as is so that caller need not - # change anything exept calling this instead of Volinfo() + # change anything except calling this instead of Volinfo() # # master-bricks= # master-bricks=NODEID:HOSTNAME:PATH,.. diff --git a/glusterfsd/src/glusterfsd.c b/glusterfsd/src/glusterfsd.c index 3de12bc125f..c16d2b6b90f 100644 --- a/glusterfsd/src/glusterfsd.c +++ b/glusterfsd/src/glusterfsd.c @@ -287,7 +287,7 @@ set_fuse_mount_options (glusterfs_ctx_t *ctx, dict_t *options) cmd_args = &ctx->cmd_args; /* Check if mount-point is absolute path, - * if not convert to absolute path by concating with CWD + * if not convert to absolute path by concatenating with CWD */ if (cmd_args->mount_point[0] != '/') { if (getcwd (cwd, PATH_MAX) != NULL) { @@ -1536,7 +1536,7 @@ cleanup_and_exit (int signum) * But in another thread (epoll thread), upon poll error in the * socket the transports are cleaned up where again rpcsvc object * is accessed (which is already freed by the below function). - * Since the process is about to be killed dont execute the function + * Since the process is about to be killed don't execute the function * below. */ /* if (ctx->listener) { */ diff --git a/heal/src/glfs-heal.c b/heal/src/glfs-heal.c index 9c628016898..0fd8c098385 100644 --- a/heal/src/glfs-heal.c +++ b/heal/src/glfs-heal.c @@ -88,7 +88,7 @@ glfsh_init () int glfsh_end_op_granular_entry_heal (int op_ret, char *op_errstr) { - /* If error sting is available, give it higher precedence.*/ + /* If error string is available, give it higher precedence.*/ if (op_errstr) { printf ("%s\n", op_errstr); @@ -1509,7 +1509,7 @@ cleanup (glfs_t *fs) return; #if 0 /* glfs fini path is still racy and crashing the program. Since - * this program any way has to die, we are not gonna call fini + * this program any way has to die, we are not going to call fini * in the released versions. i.e. final builds. For all * internal testing lets enable this so that glfs_fini code * path becomes stable. */ 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) && diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index 9497ecf78e5..946e65b879c 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -205,7 +205,7 @@ rpc_transport_load (glusterfs_ctx_t *ctx, dict_t *options, char *trans_name) "\"socket\""); } else { { - /* Backword compatibility to handle * /client, + /* Backward compatibility to handle * /client, * * /server. */ char *tmp = strchr (type, '/'); @@ -563,7 +563,7 @@ out: //give negative values to skip setting that value //this function asserts if both the values are negative. -//why call it if you dont set it. +//why call it if you don't set it. int rpc_transport_keepalive_options_set (dict_t *options, int32_t interval, int32_t time, int32_t timeout) diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index 01847e6c5ad..c8aaf4c7fa9 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -2859,7 +2859,7 @@ rpcsvc_transport_privport_check (rpcsvc_t *svc, char *volname, uint16_t port) return ret; gf_log (GF_RPCSVC, GF_LOG_TRACE, "Client port: %d", (int)port); - /* If the port is already a privileged one, dont bother with checking + /* If the port is already a privileged one, don't bother with checking * options. */ if (port <= 1024) { @@ -2973,7 +2973,7 @@ rpcsvc_match_subnet_v4 (const char *addrtok, const char *ipaddr) *slash = '\0'; /* * Find the IPv4 network mask in network byte order. - * IMP: String slash+1 is already validated, it cant have value + * IMP: String slash+1 is already validated, it can't have value * more than IPv4_ADDR_SIZE (32). */ prefixlen = (uint32_t) atoi (slash + 1); diff --git a/rpc/rpc-transport/rdma/src/name.c b/rpc/rpc-transport/rdma/src/name.c index 121960aab26..f132b9638f8 100644 --- a/rpc/rpc-transport/rdma/src/name.c +++ b/rpc/rpc-transport/rdma/src/name.c @@ -91,7 +91,7 @@ loop: port--; } - /* Incase if all the secure ports are exhausted, we are no more + /* In case if all the secure ports are exhausted, we are no more * binding to secure ports, hence instead of getting a random * port, lets define the range to restrict it from getting from * ports reserved for bricks i.e from range of 49152 - 65535 diff --git a/rpc/rpc-transport/rdma/src/rdma.c b/rpc/rpc-transport/rdma/src/rdma.c index 1595be2e049..f1859a73bdf 100644 --- a/rpc/rpc-transport/rdma/src/rdma.c +++ b/rpc/rpc-transport/rdma/src/rdma.c @@ -4052,7 +4052,7 @@ gf_rdma_process_recv (gf_rdma_peer_t *peer, struct ibv_wc *wc) * have to account for the quota used while sending * first msg (which may or may not be returned to pool * at this point) while deriving peer.quota from - * header->rm_credit. Hence the arithmatic below, + * header->rm_credit. Hence the arithmetic below, * instead of directly setting it to header->rm_credit. */ priv->peer.quota = header->rm_credit diff --git a/rpc/rpc-transport/socket/src/name.c b/rpc/rpc-transport/socket/src/name.c index c64b46baa11..077736a2e52 100644 --- a/rpc/rpc-transport/socket/src/name.c +++ b/rpc/rpc-transport/socket/src/name.c @@ -79,7 +79,7 @@ loop: port--; } - /* Incase if all the secure ports are exhausted, we are no more + /* In case if all the secure ports are exhausted, we are no more * binding to secure ports, hence instead of getting a random * port, lets define the range to restrict it from getting from * ports reserved for bricks i.e from range of 49152 - 65535 diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 3d0e22b88f9..3068b879802 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -3084,7 +3084,7 @@ socket_server_event_handler (int fd, int idx, int gen, void *data, /* event_register() could have failed for some * reason, implying that the new_sock cannot be - * added to the epoll set. If we wont get any + * added to the epoll set. If we won't get any * more notifications for new_sock from epoll, * then we better remove the corresponding * new_trans object from the RPCSVC service list. @@ -3313,7 +3313,7 @@ socket_connect (rpc_transport_t *this, int port) goto unlock; } - /* Cant help if setting socket options fails. We can continue + /* Can't help if setting socket options fails. We can continue * working nonetheless. */ if (priv->windowsize != 0) { @@ -3340,7 +3340,7 @@ socket_connect (rpc_transport_t *this, int port) /* Make sure we are not vulnerable to someone setting * net.ipv6.bindv6only to 1 so that gluster services are - * avalable over IPv4 & IPv6. + * available over IPv4 & IPv6. */ #ifdef IPV6_DEFAULT int disable_v6only = 0; @@ -3562,7 +3562,7 @@ err: /* Cleaup requires to send notification to upper layer which intern holds the big_lock. There can be dead-lock situation if big_lock is already held by the current thread. - So transfer the ownership to seperate thread for cleanup. + So transfer the ownership to separate thread for cleanup. */ arg = GF_CALLOC (1, sizeof (*arg), gf_sock_connect_error_state_t); @@ -3645,7 +3645,7 @@ socket_listen (rpc_transport_t *this) goto unlock; } - /* Cant help if setting socket options fails. We can continue + /* Can't help if setting socket options fails. We can continue * working nonetheless. */ if (priv->windowsize != 0) { diff --git a/rpc/xdr/src/glusterfs3.h b/rpc/xdr/src/glusterfs3.h index 550b9a3ceb8..5e19f5e0133 100644 --- a/rpc/xdr/src/glusterfs3.h +++ b/rpc/xdr/src/glusterfs3.h @@ -725,7 +725,8 @@ dict_to_xdr (dict_t *this, gfx_dict *dict) /* This is done for backward compatibility as dict is heavily used for transporting data over wire. - Ideally, whereever there is an issue, fix and move on */ + Ideally, wherever there is an issue, fix and + move on */ xpair->value.gfx_value_u.other.other_val = dpair->value->data; xpair->value.gfx_value_u.other.other_len = diff --git a/tests/basic/ec/ec-fast-fgetxattr.c b/tests/basic/ec/ec-fast-fgetxattr.c index ddf5ae90290..ecdbcbe44a6 100644 --- a/tests/basic/ec/ec-fast-fgetxattr.c +++ b/tests/basic/ec/ec-fast-fgetxattr.c @@ -87,7 +87,7 @@ main (int argc, char *argv[]) ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: retuned %d\n", ret); + fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); goto out; } ret = glfs_set_logging (fs, "/tmp/ec-fgetxattr.log", 7); diff --git a/tests/basic/gfapi/mandatory-lock-optimal.c b/tests/basic/gfapi/mandatory-lock-optimal.c index 9fb5ad657b0..4142258c06d 100644 --- a/tests/basic/gfapi/mandatory-lock-optimal.c +++ b/tests/basic/gfapi/mandatory-lock-optimal.c @@ -1,6 +1,6 @@ /* Pre-requisites:- * - * 1. Make sure that peformance translators are switched off while running this test. + * 1. Make sure that performance translators are switched off while running this test. * 2. Perform the following volume set operation: * # gluster volume set <VOLNAME> locks.mandatory-locking optimal * 3. For installation under non-standard paths, export LD_LIBRARY_PATH to diff --git a/tests/basic/gfapi/upcall-cache-invalidate.c b/tests/basic/gfapi/upcall-cache-invalidate.c index d1b421dff18..2014bb9dccf 100644 --- a/tests/basic/gfapi/upcall-cache-invalidate.c +++ b/tests/basic/gfapi/upcall-cache-invalidate.c @@ -123,7 +123,7 @@ main (int argc, char *argv[]) LOG_ERR ("glfs_write", ret); } else { fprintf (stderr, - "glfs_write suceeded\n"); + "glfs_write succeeded\n"); } free(writebuf); } else { @@ -175,7 +175,7 @@ main (int argc, char *argv[]) reason, object, flags, expire); } else { fprintf (stderr, - "Didnt receive upcall notify event"); + "Didn't receive upcall notify event"); ret = -1; goto err; } diff --git a/tests/basic/gfapi/upcall-register-api.c b/tests/basic/gfapi/upcall-register-api.c index cabd8be4f31..994069c0446 100644 --- a/tests/basic/gfapi/upcall-register-api.c +++ b/tests/basic/gfapi/upcall-register-api.c @@ -178,7 +178,7 @@ main (int argc, char *argv[]) ret = glfs_init (fs); LOG_ERR("glfs_init", ret); - /* Intialize fs2 */ + /* Initialize fs2 */ fs2 = glfs_new (volname); if (!fs2) { fprintf (stderr, "glfs_new fs2: returned NULL\n"); @@ -199,7 +199,7 @@ main (int argc, char *argv[]) /* Check if the return mask contains the event */ if (!(ret & GLFS_EVENT_INODE_INVALIDATE)) { - fprintf (stderr, "glfs_upcall_register return doesnt contain" + fprintf (stderr, "glfs_upcall_register return doesn't contain" " upcall event\n"); return -1; } @@ -208,7 +208,7 @@ main (int argc, char *argv[]) /* Check if the return mask contains the event */ if ((ret < 0) || !(ret & GLFS_EVENT_INODE_INVALIDATE)) { - fprintf (stderr, "glfs_upcall_register return doesnt contain" + fprintf (stderr, "glfs_upcall_register return doesn't contain" " upcall event\n"); return -1; } @@ -233,7 +233,7 @@ main (int argc, char *argv[]) /* Check if the return mask contains the event */ if ((ret < 0) || !(ret & GLFS_EVENT_INODE_INVALIDATE)) { - fprintf (stderr, "glfs_upcall_register return doesnt contain" + fprintf (stderr, "glfs_upcall_register return doesn't contain" " upcall event\n"); return -1; } @@ -242,7 +242,7 @@ main (int argc, char *argv[]) /* Check if the return mask contains the event */ if ((ret < 0) || !(ret & GLFS_EVENT_INODE_INVALIDATE)) { - fprintf (stderr, "glfs_upcall_register return doesnt contain" + fprintf (stderr, "glfs_upcall_register return doesn't contain" " upcall event\n"); return -1; } diff --git a/tests/basic/posix/zero-fill-enospace.c b/tests/basic/posix/zero-fill-enospace.c index b1aaa57c9ca..7c0d31128b3 100644 --- a/tests/basic/posix/zero-fill-enospace.c +++ b/tests/basic/posix/zero-fill-enospace.c @@ -23,7 +23,7 @@ main (int argc, char *argv[]) ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: retuned %d\n", ret); + fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); goto out; } ret = glfs_set_logging (fs, argv[4], 7); diff --git a/tests/bugs/ec/bug-1161886.c b/tests/bugs/ec/bug-1161886.c index e8093e48a7a..1faae831898 100644 --- a/tests/bugs/ec/bug-1161886.c +++ b/tests/bugs/ec/bug-1161886.c @@ -23,7 +23,7 @@ main (int argc, char *argv[]) ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: retuned %d\n", ret); + fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); goto out; } ret = glfs_set_logging (fs, "/dev/null", 7); diff --git a/tests/bugs/shard/bug-shard-discard.c b/tests/bugs/shard/bug-shard-discard.c index 645bacf7d83..b1268278fa5 100644 --- a/tests/bugs/shard/bug-shard-discard.c +++ b/tests/bugs/shard/bug-shard-discard.c @@ -25,7 +25,7 @@ main (int argc, char *argv[]) ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: retuned %d\n", ret); + fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); goto out; } diff --git a/tests/bugs/shard/bug-shard-zerofill.c b/tests/bugs/shard/bug-shard-zerofill.c index 838a656b3bb..c0525a58afc 100644 --- a/tests/bugs/shard/bug-shard-zerofill.c +++ b/tests/bugs/shard/bug-shard-zerofill.c @@ -22,7 +22,7 @@ main (int argc, char *argv[]) ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: retuned %d\n", ret); + fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); goto out; } ret = glfs_set_logging (fs, argv[4], 7); diff --git a/tests/bugs/shard/shard-fallocate.c b/tests/bugs/shard/shard-fallocate.c index e16620964c9..8745c0ece1d 100644 --- a/tests/bugs/shard/shard-fallocate.c +++ b/tests/bugs/shard/shard-fallocate.c @@ -61,7 +61,7 @@ main (int argc, char *argv[]) ret = glfs_set_volfile_server (fs, "tcp", argv[1], 24007); if (ret != 0) { - fprintf (stderr, "glfs_set_volfile_server: retuned %d\n", ret); + fprintf (stderr, "glfs_set_volfile_server: returned %d\n", ret); goto out; } diff --git a/tests/features/glfs-lease.c b/tests/features/glfs-lease.c index 1a375ecbeb3..535b3019a8c 100644 --- a/tests/features/glfs-lease.c +++ b/tests/features/glfs-lease.c @@ -199,7 +199,7 @@ do { do { \ if (ret != value) { \ fprintf (log_file, "\n Testcase %d failed, ret = %d, value=%d\n", test_case, ret, value); \ - goto error; /*test unsuccesfull*/ \ + goto error; /*test unsuccessful*/ \ } \ fprintf (log_file, "\n Testcase %d Succeeded\n", test_case); \ } while (0) \ @@ -210,7 +210,7 @@ recall_cbk (struct glfs_lease lease, void *data) int ret = -1; char ld[GLFS_LEASE_ID_SIZE] = ""; - fprintf (log_file, "\nRECALL recieved on lease_id:(%s)", lease.lease_id); + fprintf (log_file, "\nRECALL received on lease_id:(%s)", lease.lease_id); memcpy (ld, lease.lease_id, GLFS_LEASE_ID_SIZE); ret = unlk_write_lease ((glfs_fd_t *)data, ld); VERIFY_RESULT (500, ret, SHUD_PASS); diff --git a/tests/utils/arequal-checksum.c b/tests/utils/arequal-checksum.c index aede4f48adb..6ab68f38db8 100644 --- a/tests/utils/arequal-checksum.c +++ b/tests/utils/arequal-checksum.c @@ -31,7 +31,7 @@ /* * FTW_ACTIONRETVAL is a GNU libc extension. It is used here to skip - * hiearchies. On other systems we will still walk the tree, ignoring + * hierarchies. On other systems we will still walk the tree, ignoring * entries. */ #ifndef FTW_ACTIONRETVAL @@ -482,7 +482,7 @@ process_entry (const char *path, const struct stat *sb, This mainly helps in calculating the checksum of network filesystems (client-server), where the server might have some hidden directories - for managing the filesystem. So to calculate the sanity of filesytem + for managing the filesystem. So to calculate the sanity of filesystem one has to get the checksum of the client and then the export directory of server by telling arequal to ignore some of the directories which are not part of the namespace. diff --git a/tests/utils/getfattr.py b/tests/utils/getfattr.py index 7d1f7368e3e..b0dba822d64 100755 --- a/tests/utils/getfattr.py +++ b/tests/utils/getfattr.py @@ -65,7 +65,7 @@ if __name__ == '__main__': " them. Valid values of [en] are `text`, `hex`," " and `base64`. Values encoded as text strings are" " enclosed in double quotes (\"), while strings" - " encoded as hexidecimal and base64 are prefixed with" + " encoded as hexadecimal and base64 are prefixed with" " 0x and 0s, respectively.") parser.add_option("-m", action="store", dest="pattern", type="string", help="Only include attributes with names matching the" diff --git a/tests/utils/libcxattr.py b/tests/utils/libcxattr.py index 4e6e6c46df9..fd0b08378fc 100644 --- a/tests/utils/libcxattr.py +++ b/tests/utils/libcxattr.py @@ -15,7 +15,7 @@ from ctypes import CDLL, c_int, create_string_buffer class Xattr(object): - """singleton that wraps the extended attribues system + """singleton that wraps the extended attributes system interface for python using ctypes Just implement it to the degree we need it, in particular diff --git a/tools/glusterfind/src/main.py b/tools/glusterfind/src/main.py index 2b782c8dca4..c9fef18c095 100644 --- a/tools/glusterfind/src/main.py +++ b/tools/glusterfind/src/main.py @@ -381,7 +381,7 @@ def _get_args(): action=StoreAbsPath) parser_query.add_argument("--since-time", help="UNIX epoch time since " "which listing is required", type=int) - parser_query.add_argument("--end-time", help="UNIX epoch time upto " + parser_query.add_argument("--end-time", help="UNIX epoch time up to " "which listing is required", type=int) parser_query.add_argument("--no-encode", help="Do not encode path in output file", diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index e2821f1b295..e60d5315dbe 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -912,7 +912,7 @@ afr_set_split_brain_choice (int ret, call_frame_t *frame, void *opaque) /* If timer cancel failed here it means that the * previous cbk will be executed which will set * spb_choice to -1. So we can consider the - * 'valid to -1' case to be a sucess + * 'valid to -1' case to be a success * (i.e. ret = 0) and goto unlock. */ goto unlock; @@ -4722,7 +4722,7 @@ afr_ipc_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int child_index = (long)cookie; int call_count = 0; gf_boolean_t failed = _gf_false; - gf_boolean_t succeded = _gf_false; + gf_boolean_t succeeded = _gf_false; int i = 0; afr_private_t *priv = NULL; @@ -4742,7 +4742,7 @@ afr_ipc_cbk (call_frame_t *frame, void *cookie, xlator_t *this, * return error else return success unless all the subvolumes * failed. * TODO: In case of failure, we need to unregister the xattrs - * from the other subvolumes where it succeded (once upcall + * from the other subvolumes where it succeeded (once upcall * fixes the Bz-1371622)*/ for (i = 0; i < priv->child_count; i++) { if (!local->replies[i].valid) @@ -4762,7 +4762,7 @@ afr_ipc_cbk (call_frame_t *frame, void *cookie, xlator_t *this, break; } if (local->replies[i].op_ret == 0) { - succeded = _gf_true; + succeeded = _gf_true; local->op_ret = 0; local->op_errno = 0; if (!local->xdata_rsp && local->replies[i].xdata) { @@ -4772,7 +4772,7 @@ afr_ipc_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } } - if (!succeded && !failed) { + if (!succeeded && !failed) { local->op_ret = -1; local->op_errno = ENOTCONN; } @@ -5314,7 +5314,7 @@ __afr_handle_child_down_event (xlator_t *this, xlator_t *child_xlator, if (down_children == priv->child_count) { gf_msg (this->name, GF_LOG_ERROR, 0, AFR_MSG_SUBVOLS_DOWN, "All subvolumes are down. Going " - "offline until atleast one of them " + "offline until at least one of them " "comes back up."); gf_event (EVENT_AFR_SUBVOLS_DOWN, "subvol=%s", this->name); } else { @@ -5364,7 +5364,7 @@ afr_notify (xlator_t *this, int32_t event, priv->did_discovery = _gf_false; - /* parent xlators dont need to know about every child_up, child_down + /* parent xlators don't need to know about every child_up, child_down * because of afr ha. If all subvolumes go down, child_down has * to be triggered. In that state when 1 subvolume comes up child_up * needs to be triggered. dht optimizes revalidate lookup by sending diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index 8d3c823043f..e8192a2b753 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -735,7 +735,7 @@ afr_getxattr_node_uuid_cbk (call_frame_t *frame, void *cookie, /** * _current_ becomes _next_ - * If done with all childs and yet no success; give up ! + * If done with all children and yet no success; give up ! */ curr_call_child = (int) ((long)cookie); if (++curr_call_child == priv->child_count) diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 9a9ef2e90a5..755e928ef62 100644 --- a/xlators/cluster/afr/src/afr-inode-write.c +++ b/xlators/cluster/afr/src/afr-inode-write.c @@ -102,7 +102,7 @@ __afr_inode_write_finalize (call_frame_t *frame, xlator_t *this) below is important. - Highest precedence: largest op_ret - - Next precendence: if all op_rets are equal, read subvol + - Next precedence: if all op_rets are equal, read subvol - Least precedence: any succeeded subvol */ if ((local->op_ret < local->replies[i].op_ret) || diff --git a/xlators/cluster/afr/src/afr-lk-common.c b/xlators/cluster/afr/src/afr-lk-common.c index dff6644eb96..d7ff2b01a06 100644 --- a/xlators/cluster/afr/src/afr-lk-common.c +++ b/xlators/cluster/afr/src/afr-lk-common.c @@ -601,7 +601,7 @@ is_blocking_locks_count_sufficient (call_frame_t *frame, xlator_t *this) "gfid:%s.", uuid_utoa (local->inode->gfid)); return _gf_false; } else { - /*inodelk succeded on atleast one child. */ + /*inodelk succeeded on at least one child. */ return _gf_true; } @@ -611,7 +611,7 @@ is_blocking_locks_count_sufficient (call_frame_t *frame, xlator_t *this) return _gf_false; } /* For FOPS that take multiple sets of locks (mkdir, rename), - * there must be atleast one brick on which the locks from + * there must be at least one brick on which the locks from * all lock sets were successful. */ for (child = 0; child < priv->child_count; child++) { ret = _gf_true; diff --git a/xlators/cluster/afr/src/afr.c b/xlators/cluster/afr/src/afr.c index 0d6773c96e8..0e86e33d03b 100644 --- a/xlators/cluster/afr/src/afr.c +++ b/xlators/cluster/afr/src/afr.c @@ -309,7 +309,7 @@ afr_pending_xattrs_init (afr_private_t *priv, xlator_t *this) child_count = priv->child_count; if (priv->thin_arbiter_count) { /* priv->pending_key[THIN_ARBITER_BRICK_INDEX] is used as the - * name of the thin arbiter file for persistance across add/ + * name of the thin arbiter file for persistence across add/ * removal of DHT subvols.*/ child_count++; } @@ -621,7 +621,7 @@ fini (xlator_t *this) UNLOCK (&priv->lock); this->private = NULL; afr_priv_destroy (priv); - //if (this->itable);//I dont see any destroy func + //if (this->itable);//I don't see any destroy func return 0; } 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 (¤t_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> diff --git a/xlators/cluster/ec/src/ec-code.c b/xlators/cluster/ec/src/ec-code.c index 44957dd788f..2cdd5bebe11 100644 --- a/xlators/cluster/ec/src/ec-code.c +++ b/xlators/cluster/ec/src/ec-code.c @@ -479,7 +479,7 @@ ec_code_space_create(ec_code_t *code, size_t size) done_close: /* If everything has succeeded, we already have the memory areas * mapped. We don't need the file descriptor anymore because the - * backend storage will be there until the mmaped regions are + * backend storage will be there until the mmap()'d regions are * unmapped. */ sys_close(fd); done: diff --git a/xlators/cluster/ec/src/ec-common.c b/xlators/cluster/ec/src/ec-common.c index e3e34811395..4776b697a8b 100644 --- a/xlators/cluster/ec/src/ec-common.c +++ b/xlators/cluster/ec/src/ec-common.c @@ -1631,7 +1631,7 @@ int32_t ec_get_real_size_cbk(call_frame_t *frame, void *cookie, xlator_t *this, } /* This function is used to get the trusted.ec.size xattr from a file when - * no lock is needed on the inode. This is only required to maintan iatt + * no lock is needed on the inode. This is only required to maintain iatt * structs on fops that manipulate directory entries but do not operate * directly on the inode, like link, rename, ... * diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h index 372be52470c..a92752952ad 100644 --- a/xlators/cluster/ec/src/ec-common.h +++ b/xlators/cluster/ec/src/ec-common.h @@ -41,7 +41,7 @@ enum _ec_xattrop_flags { }; /* We keep two sets of flags. One to determine what's really providing the - * currect xattrop and the other to know what the parent fop of the xattrop + * current xattrop and the other to know what the parent fop of the xattrop * needs to proceed. It might happen that a fop needs some information that * is being already requested by a previous fop. The two sets are stored * contiguously. */ diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c index 2ff713b7bbd..6b4c45fa370 100644 --- a/xlators/cluster/ec/src/ec-heal.c +++ b/xlators/cluster/ec/src/ec-heal.c @@ -2933,7 +2933,7 @@ ec_need_data_heal (ec_t *ec, inode_t *inode, default_args_cbk_t *replies, size = alloca0 (ec->nodes * sizeof (*size)); /* When dd is going on and heal info is called there is a very good - * chance for on disk sizes to mismatch eventhough nothing is wrong + * chance for on disk sizes to mismatch even though nothing is wrong * we don't need ondisk size check there. But if the file is either * self-locked or the caller wants a thorough check then make sure to * perform on disk check also. */ diff --git a/xlators/cluster/ec/src/ec-helpers.h b/xlators/cluster/ec/src/ec-helpers.h index 71b8978abf8..b548f802361 100644 --- a/xlators/cluster/ec/src/ec-helpers.h +++ b/xlators/cluster/ec/src/ec-helpers.h @@ -96,7 +96,7 @@ ec_adjust_size_up(ec_t *ec, uint64_t *value, gf_boolean_t scale) tmp += ec->fragment_size; } else { tmp += ec->stripe_size; - /* If no scaling is requested there's a posibility of + /* If no scaling is requested there's a possibility of * overflow. */ if (tmp < ec->stripe_size) { tmp = UINT64_MAX; diff --git a/xlators/cluster/ec/src/ec-inode-write.c b/xlators/cluster/ec/src/ec-inode-write.c index bf45a867971..c9fbd3cf7df 100644 --- a/xlators/cluster/ec/src/ec-inode-write.c +++ b/xlators/cluster/ec/src/ec-inode-write.c @@ -1167,7 +1167,7 @@ void ec_discard_adjust_offset_size(ec_fop_data_t *fop) ec_t *ec = fop->xl->private; fop->user_size = fop->size; - /* If discard length covers atleast a fragment on brick, we will + /* If discard length covers at least a fragment on brick, we will * perform discard operation(when fop->size is non-zero) else we just * write zeros. */ diff --git a/xlators/cluster/ec/src/ec-locks.c b/xlators/cluster/ec/src/ec-locks.c index 996035de90b..d8ad7721f53 100644 --- a/xlators/cluster/ec/src/ec-locks.c +++ b/xlators/cluster/ec/src/ec-locks.c @@ -43,7 +43,7 @@ int32_t ec_lock_check(ec_fop_data_t *fop, uintptr_t *mask) case EC_LOCK_MODE_NONE: case EC_LOCK_MODE_ALL: /* Goal is to treat non-blocking lock as failure - * even if there is a signle EAGAIN*/ + * even if there is a single EAGAIN*/ notlocked |= ans->mask; break; } diff --git a/xlators/cluster/ec/src/ec-types.h b/xlators/cluster/ec/src/ec-types.h index 15b4c77abfe..2724da6415f 100644 --- a/xlators/cluster/ec/src/ec-types.h +++ b/xlators/cluster/ec/src/ec-types.h @@ -323,7 +323,7 @@ struct _ec_fop_data { int32_t id; /* ID of the file operation */ int32_t refs; int32_t state; - int32_t minimum; /* Mininum number of successful + int32_t minimum; /* Minimum number of successful operation required to conclude a fop as successful */ int32_t expected; diff --git a/xlators/cluster/ec/src/ec.c b/xlators/cluster/ec/src/ec.c index cb995646959..a82305104c5 100644 --- a/xlators/cluster/ec/src/ec.c +++ b/xlators/cluster/ec/src/ec.c @@ -1543,7 +1543,7 @@ struct volume_options options[] = .op_version = { GD_OP_VERSION_4_0_0 }, .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC, .tags = { "disperse", "locks", "timeout" }, - .description = "It's equivalent ot eager-lock-timeout option but for " + .description = "It's equivalent to eager-lock-timeout option but for " "non regular files." }, { .key = {"background-heals"}, diff --git a/xlators/cluster/stripe/src/stripe-helpers.c b/xlators/cluster/stripe/src/stripe-helpers.c index 217f4d2b6e8..06568389cc2 100644 --- a/xlators/cluster/stripe/src/stripe-helpers.c +++ b/xlators/cluster/stripe/src/stripe-helpers.c @@ -563,7 +563,7 @@ set_stripe_block_size (xlator_t *this, stripe_private_t *priv, char *data) if (stripe_opt->block_size < STRIPE_MIN_BLOCK_SIZE) { gf_log (this->name, GF_LOG_ERROR, "Invalid Block-size: " - "%s. Should be atleast %llu bytes", num, + "%s. Should be at least %llu bytes", num, STRIPE_MIN_BLOCK_SIZE); goto out; } diff --git a/xlators/cluster/stripe/src/stripe.c b/xlators/cluster/stripe/src/stripe.c index fae80c3e200..a8534cfca1e 100644 --- a/xlators/cluster/stripe/src/stripe.c +++ b/xlators/cluster/stripe/src/stripe.c @@ -4436,7 +4436,7 @@ stripe_setxattr_cbk (call_frame_t *frame, void *cookie, call_cnt = --local->wind_count; /** - * We overwrite ->op_* values here for subsequent faliure + * We overwrite ->op_* values here for subsequent failure * conditions, hence we propagate the last errno down the * stack. */ @@ -5553,7 +5553,7 @@ stripe_getxattr (call_frame_t *frame, xlator_t *this, (void) strncpy (local->xsel, name, strlen (name)); /** - * for xattrs that need info from all childs, fill ->xsel + * for xattrs that need info from all children, fill ->xsel * as above and call the filler function in cbk based on * it */ diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c index 28e6e362b6b..7eaffa00c78 100644 --- a/xlators/debug/io-stats/src/io-stats.c +++ b/xlators/debug/io-stats/src/io-stats.c @@ -4022,7 +4022,7 @@ init (xlator_t *this) if (!this->children) { gf_log (this->name, GF_LOG_ERROR, - "io_stats translator requires atleast one subvolume"); + "io_stats translator requires at least one subvolume"); return -1; } diff --git a/xlators/encryption/crypt/src/atom.c b/xlators/encryption/crypt/src/atom.c index 6d7b351b370..fc90892fae8 100644 --- a/xlators/encryption/crypt/src/atom.c +++ b/xlators/encryption/crypt/src/atom.c @@ -612,7 +612,7 @@ void submit_full(call_frame_t *frame, xlator_t *this) granularity = 1; /* * calculate start offset using cursor value; - * here we should take into accout head block, + * here we should take into account head block, * which corresponds to cursor value 0. */ off_in_file = atom->offset_at(frame, object) + diff --git a/xlators/encryption/crypt/src/crypt.c b/xlators/encryption/crypt/src/crypt.c index 72384a5595a..70087820211 100644 --- a/xlators/encryption/crypt/src/crypt.c +++ b/xlators/encryption/crypt/src/crypt.c @@ -1361,7 +1361,7 @@ int32_t end_writeback_ftruncate(call_frame_t *frame, if (should_resume_submit_hole(local)) submit_hole(frame, this); /* - * case of hole, when we should't resume + * case of hole, when we shouldn't resume */ put_one_call: put_one_call_ftruncate(frame, this); @@ -3528,7 +3528,7 @@ static int32_t __crypt_writev_done(call_frame_t *frame, if (local->xattr) dict_unref(local->xattr); /* - * Calculate amout of butes to be returned + * Calculate amount of butes to be returned * to user. We need to subtract paddings that * have been written as a part of atom. */ diff --git a/xlators/encryption/crypt/src/data.c b/xlators/encryption/crypt/src/data.c index 8b467bf2c60..82e29c0405a 100644 --- a/xlators/encryption/crypt/src/data.c +++ b/xlators/encryption/crypt/src/data.c @@ -68,7 +68,7 @@ static int32_t set_private_aes_xts(struct crypt_inode_info *info, return ENOMEM; /* - * retrieve data keying meterial + * retrieve data keying material */ ret = get_data_file_key(info, master, object->o_dkey_size, data_key); if (ret) { @@ -547,7 +547,7 @@ int32_t set_config_avec_hole(xlator_t *this, case GF_FOP_FTRUNCATE: /* * expanding truncate, hole goes after data, - * and will be submited in any case. + * and will be submitted in any case. */ break; default: @@ -671,7 +671,7 @@ void set_config_offsets(call_frame_t *frame, uint32_t nr_full_blocks; int32_t size_full_blocks; - uint32_t acount; /* number of alifned components to write. + uint32_t acount; /* number of aligned components to write. * The same as number of occupied logical * blocks (atoms) */ diff --git a/xlators/encryption/crypt/src/metadata.c b/xlators/encryption/crypt/src/metadata.c index 1364f825a98..cd2bb7dda5d 100644 --- a/xlators/encryption/crypt/src/metadata.c +++ b/xlators/encryption/crypt/src/metadata.c @@ -558,7 +558,7 @@ static int32_t open_format_v1(unsigned char *wire, /* * perform metadata authentication against @loc->path; - * extract crypt-specific attribtes and populate @info + * extract crypt-specific attribute and populate @info * with them (optional) */ int32_t open_format(unsigned char *str, diff --git a/xlators/experimental/jbr-server/src/all-templates.c b/xlators/experimental/jbr-server/src/all-templates.c index 9720442e63f..530c4187571 100644 --- a/xlators/experimental/jbr-server/src/all-templates.c +++ b/xlators/experimental/jbr-server/src/all-templates.c @@ -416,7 +416,7 @@ jbr_@NAME@_complete (call_frame_t *frame, void *cookie, xlator_t *this, GF_VALIDATE_OR_GOTO (this->name, priv, err); GF_VALIDATE_OR_GOTO (this->name, local, err); - /* If the fop failed on the leader, then reduce one succesful ack + /* If the fop failed on the leader, then reduce one successful ack * before calculating the fop quorum */ LOCK(&frame->lock); diff --git a/xlators/experimental/jbr-server/src/jbr.c b/xlators/experimental/jbr-server/src/jbr.c index 68ec10a7e54..d76cf78030e 100644 --- a/xlators/experimental/jbr-server/src/jbr.c +++ b/xlators/experimental/jbr-server/src/jbr.c @@ -592,8 +592,8 @@ out: } /* - * Called from leader for locking fop, being writen as a separate * - * function so as to support queues. * + * Called from leader for locking fop, being written as a separate + * function so as to support queues. */ int32_t jbr_perform_lk_on_leader (call_frame_t *frame, xlator_t *this, 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 e393ae0f64e..8e432aee645 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 a9b70b61f8a..66e58948fa9 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 c2c0c225792..670060c8d88 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 fff7a7eedf2..cc1a6e9a66f 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 830357070d6..c4853487e80 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: diff --git a/xlators/features/changelog/lib/src/gf-changelog-helpers.c b/xlators/features/changelog/lib/src/gf-changelog-helpers.c index 45cf55778e4..9ff1d135933 100644 --- a/xlators/features/changelog/lib/src/gf-changelog-helpers.c +++ b/xlators/features/changelog/lib/src/gf-changelog-helpers.c @@ -57,7 +57,7 @@ gf_rfc3986_encode_space_newline (unsigned char *s, char *enc, char *estr) * that can be done via @fflush(fp), @ftruncate(fd) and @fseek(fp), * but this involves mixing POSIX file descriptors and stream FILE *). * - * NOTE: This implmentation still does work with more than one fd's + * NOTE: This implementation still does work with more than one fd's * used to perform gf_readline(). For this very reason it's not * made a part of libglusterfs. */ diff --git a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c index 07de76e7cda..9c1a498f655 100644 --- a/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c +++ b/xlators/features/changelog/lib/src/gf-changelog-journal-handler.c @@ -524,7 +524,7 @@ gf_changelog_publish (xlator_t *this, (void) snprintf (to_path, PATH_MAX, "%s%s", jnl->jnl_current_dir, basename (from_path)); - /* handle zerob file that wont exist in current */ + /* handle zerob file that won't exist in current */ ret = sys_stat (to_path, &stbuf); if (ret) { if (errno == ENOENT) diff --git a/xlators/features/changelog/lib/src/gf-changelog-reborp.c b/xlators/features/changelog/lib/src/gf-changelog-reborp.c index d1b3059a60c..f9fb8fcf01a 100644 --- a/xlators/features/changelog/lib/src/gf-changelog-reborp.c +++ b/xlators/features/changelog/lib/src/gf-changelog-reborp.c @@ -61,7 +61,7 @@ gf_changelog_connection_janitor (void *arg) "brick=%s", entry->brick, NULL); - /* 0x0: disbale rpc-clnt */ + /* 0x0: disable rpc-clnt */ rpc_clnt_disable (RPC_PROBER (entry)); /* 0x1: cleanup callback invoker thread */ @@ -155,7 +155,7 @@ gf_changelog_reborp_init_rpc_listner (xlator_t *this, } /** - * This is dirty and painful as of now untill there is event filtering in the + * This is dirty and painful as of now until there is event filtering in the * server. The entire event buffer is scanned and interested events are picked, * whereas we _should_ be notified with the events we were interested in * (selected at the time of probe). As of now this is complete BS and needs @@ -283,7 +283,7 @@ orderfn (struct list_head *pos1, struct list_head *pos2) void queue_ordered_event (struct gf_event_list *ev, struct gf_event *event) { - /* add event to the ordered event list and wake up listner(s) */ + /* add event to the ordered event list and wake up listener(s) */ pthread_mutex_lock (&ev->lock); { list_add_order (&event->list, &ev->events, orderfn); diff --git a/xlators/features/changelog/lib/src/gf-history-changelog.c b/xlators/features/changelog/lib/src/gf-history-changelog.c index 2f245a725f6..7b973b674a4 100644 --- a/xlators/features/changelog/lib/src/gf-history-changelog.c +++ b/xlators/features/changelog/lib/src/gf-history-changelog.c @@ -476,7 +476,7 @@ out: /* * Description: Checks if the changelog path is usable or not, - * which is differenciated by checking for "changelog" + * which is differentiated by checking for "changelog" * in the path and not "CHANGELOG". * * Returns: diff --git a/xlators/features/changelog/src/changelog-helpers.c b/xlators/features/changelog/src/changelog-helpers.c index 8bc994fa417..fb1ee06da2c 100644 --- a/xlators/features/changelog/src/changelog-helpers.c +++ b/xlators/features/changelog/src/changelog-helpers.c @@ -1172,7 +1172,7 @@ changelog_local_init (xlator_t *this, inode_t *inode, /** * We relax the presence of inode if @update_flag is true. - * The caller (implmentation of the fop) needs to be careful to + * The caller (implementation of the fop) needs to be careful to * not blindly use local->inode. */ if (!update_flag && !inode) { @@ -1253,7 +1253,7 @@ changelog_drain_black_fops (xlator_t *this, changelog_priv_t *priv) NULL); while (priv->dm.black_fop_cnt > 0) { gf_msg_debug (this->name, 0, - "Condtional wait on black fops: %ld", + "Conditional wait on black fops: %ld", priv->dm.black_fop_cnt); priv->dm.drain_wait_black = _gf_true; ret = pthread_cond_wait (&priv->dm.drain_black_cond, @@ -1297,7 +1297,7 @@ changelog_drain_white_fops (xlator_t *this, changelog_priv_t *priv) NULL); while (priv->dm.white_fop_cnt > 0) { gf_msg_debug (this->name, 0, - "Condtional wait on white fops : %ld", + "Conditional wait on white fops : %ld", priv->dm.white_fop_cnt); priv->dm.drain_wait_white = _gf_true; ret = pthread_cond_wait (&priv->dm.drain_white_cond, @@ -1403,7 +1403,7 @@ changelog_rollover (void *data) /* Adding delay of 1 second only during explicit rollover: * * Changelog rollover can happen either due to actual - * or the explict rollover during snapshot. Actual + * or the explicit rollover during snapshot. Actual * rollover is controlled by tuneable called 'rollover-time'. * The minimum granularity for rollover-time is 1 second. * Explicit rollover is asynchronous in nature and happens diff --git a/xlators/features/changelog/src/changelog.c b/xlators/features/changelog/src/changelog.c index 12997181da4..6d32de63db5 100644 --- a/xlators/features/changelog/src/changelog.c +++ b/xlators/features/changelog/src/changelog.c @@ -988,7 +988,7 @@ out: return 0; } -/* creat */ +/* create */ int32_t changelog_create_cbk (call_frame_t *frame, diff --git a/xlators/features/changetimerecorder/src/changetimerecorder.c b/xlators/features/changetimerecorder/src/changetimerecorder.c index 40bfcf4a32a..a9d73ed0ac8 100644 --- a/xlators/features/changetimerecorder/src/changetimerecorder.c +++ b/xlators/features/changetimerecorder/src/changetimerecorder.c @@ -48,7 +48,7 @@ These are the scenarios when the hardlink list is updated: 1) Named-Lookup: Whenever a named lookup happens on a file, in the wind path we copy all required hardlink and inode information to ctr_db_record structure, which resides in the frame->local variable. - We dont update the database in wind. During the unwind, we read the + We don't update the database in wind. During the unwind, we read the information from the ctr_db_record and , Check if the inode context variable is created, if not we create it. Check if the hard link is there in the hardlink list. @@ -74,12 +74,12 @@ These are the scenarios when the hardlink list is updated: What is pending: 1) This solution will only work for named lookups. -2) We dont track afr-self-heal/dht-rebalancer traffic for healing. +2) We don't track afr-self-heal/dht-rebalancer traffic for healing. */ -/* This function doesnot write anything to the db, +/* This function does not write anything to the db, * just created the local variable * for the frame and sets values for the ctr_db_record */ static int @@ -109,9 +109,9 @@ ctr_lookup_wind(call_frame_t *frame, goto out; }; ctr_local = frame->local; - /*Definately no internal fops will reach here*/ + /*Definitely no internal fops will reach here*/ ctr_local->is_internal_fop = _gf_false; - /*Dont record counters*/ + /*Don't record counters*/ CTR_DB_REC(ctr_local).do_record_counters = _gf_false; /*Don't record time at all*/ CTR_DB_REC(ctr_local).do_record_times = _gf_false; @@ -135,7 +135,7 @@ ctr_lookup_wind(call_frame_t *frame, /* Since we are in lookup we can ignore errors while * Inserting in the DB, because there may be many * to write to the DB attempts for healing. - * We dont want to log all failed attempts and + * We don't want to log all failed attempts and * bloat the log*/ ctr_local->gfdb_db_record.ignore_errors = _gf_true; } @@ -216,7 +216,7 @@ ctr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, CTR_IS_DISABLED_THEN_GOTO(this, out); - /* if the lookup failed lookup dont do anything*/ + /* if the lookup failed lookup don't do anything*/ if (op_ret == -1) { gf_msg_trace (this->name, 0, "lookup failed with %s", strerror (op_errno)); @@ -229,7 +229,7 @@ ctr_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, } /* if frame local was not set by the ctr_lookup() - * so dont so anything*/ + * so don't so anything*/ if (!frame->local) { goto out; } @@ -329,7 +329,7 @@ ctr_lookup (call_frame_t *frame, xlator_t *this, GF_ASSERT(frame); GF_ASSERT(frame->root); - /* Dont handle nameless lookups*/ + /* Don't handle nameless lookups*/ if (!loc->parent || !loc->name) goto out; @@ -941,7 +941,7 @@ ctr_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, "Failed to insert rename wind"); } else { /* We are doing updation of hard link in inode context in wind - * As we dont get the "inode" in the call back for rename */ + * As we don't get the "inode" in the call back for rename */ ret = update_hard_link_ctx (frame, this, oldloc->inode); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, @@ -950,13 +950,13 @@ ctr_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc, goto out; } - /* If the newloc has an inode. i.e aquiring hardlink of an + /* If the newloc has an inode. i.e acquiring hardlink of an * exisitng file i.e overwritting a file. * */ if (newloc->inode) { /* Getting the ctr inode context variable for - * inode whose hardlink will be aquired during + * inode whose hardlink will be acquired during * the rename * */ ctr_xlator_ctx = get_ctr_xlator_ctx (this, @@ -1106,7 +1106,7 @@ ctr_unlink (call_frame_t *frame, xlator_t *this, "Failed to insert unlink wind"); } else { /* We are doing delete of hard link in inode context in wind - * As we dont get the "inode" in the call back for rename */ + * As we don't get the "inode" in the call back for rename */ ret = delete_hard_link_ctx (frame, this, loc->inode); if (ret) { gf_msg (this->name, GF_LOG_ERROR, 0, diff --git a/xlators/features/changetimerecorder/src/ctr-helper.c b/xlators/features/changetimerecorder/src/ctr-helper.c index 822526ca833..5a409c2b65e 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.c +++ b/xlators/features/changetimerecorder/src/ctr-helper.c @@ -198,7 +198,7 @@ extract_sql_params(xlator_t *this, dict_t *params_dict) SET_DB_PARAM_TO_DICT(this->name, params_dict, GFDB_SQL_PARAM_DBPATH, db_full_path, ret, out); - /*Extact rest of the sql params*/ + /*Extract rest of the sql params*/ ret = gfdb_set_sql_params(this->name, this->options, params_dict); if (ret) { gf_msg (GFDB_DATA_STORE, GF_LOG_ERROR, 0, diff --git a/xlators/features/changetimerecorder/src/ctr-helper.h b/xlators/features/changetimerecorder/src/ctr-helper.h index 4fd4f745f4d..9232c16c5a9 100644 --- a/xlators/features/changetimerecorder/src/ctr-helper.h +++ b/xlators/features/changetimerecorder/src/ctr-helper.h @@ -76,7 +76,7 @@ typedef struct gf_ctr_private { * but currently we record only file inode information. * * is_internal_fop in gf_ctr_local will tell us if this is a internal fop and - * take special/no action. We dont record change/acces times or increement heat + * take special/no action. We don't record change/access times or increement heat * counter for internal fops from rebalancer. * */ typedef struct gf_ctr_local { @@ -146,7 +146,7 @@ free_ctr_local (gf_ctr_local_t *ctr_local) * ****************************************************************************/ /* - * Context Carrier structures are used to carry relavent information about + * Context Carrier structures are used to carry relevant information about * inodes and links from the fops calls to the ctr_insert_wind. * These structure just have pointers to the original data and donot * do a deep copy of any data. This info is deep copied to diff --git a/xlators/features/compress/src/cdc-helper.c b/xlators/features/compress/src/cdc-helper.c index 0a9a0e3d29c..7baccb0cd3d 100644 --- a/xlators/features/compress/src/cdc-helper.c +++ b/xlators/features/compress/src/cdc-helper.c @@ -335,7 +335,7 @@ cdc_compress (xlator_t *this, cdc_priv_t *priv, cdc_info_t *ci, if (ret) { /* Send uncompressed data if we can't _tell_ the client * that deflated data is on it's way. So, we just log - * the faliure and continue as usual. + * the failure and continue as usual. */ gf_log (this->name, GF_LOG_ERROR, "Data deflated, but could not set canary" diff --git a/xlators/features/gfid-access/src/gfid-access.c b/xlators/features/gfid-access/src/gfid-access.c index 49d781c59ba..0a82321ed3c 100644 --- a/xlators/features/gfid-access/src/gfid-access.c +++ b/xlators/features/gfid-access/src/gfid-access.c @@ -756,7 +756,7 @@ ga_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, priv = this->private; - /* do we need to copy root stbuf everytime? */ + /* do we need to copy root stbuf every time? */ /* mostly yes, as we want to have the 'stat' info show latest in every _cbk() */ diff --git a/xlators/features/leases/src/leases.c b/xlators/features/leases/src/leases.c index 34143859c56..cbcbff73022 100644 --- a/xlators/features/leases/src/leases.c +++ b/xlators/features/leases/src/leases.c @@ -899,7 +899,7 @@ block: out: /* * * currently release is not called after the close fop from the - * application. Hence lease fd ctx is resetted on here. + * application. Hence lease fd ctx is reset on here. * This is actually not the right way, since flush can be called * not only from the close op. * TODO : diff --git a/xlators/features/locks/src/locks.h b/xlators/features/locks/src/locks.h index c2edfff8f00..e9b75fb3f13 100644 --- a/xlators/features/locks/src/locks.h +++ b/xlators/features/locks/src/locks.h @@ -87,7 +87,7 @@ struct __pl_inode_lock { struct timeval blkd_time; /*time at which lock was queued into blkd list*/ struct timeval granted_time; /*time at which lock was queued into active list*/ - /*last time at wich lock contention was detected and notified*/ + /*last time at which lock contention was detected and notified*/ struct timespec contention_time; /* These two together serve to uniquely identify each process @@ -137,7 +137,7 @@ struct __entry_lock { struct timeval blkd_time; /*time at which lock was queued into blkd list*/ struct timeval granted_time; /*time at which lock was queued into active list*/ - /*last time at wich lock contention was detected and notified*/ + /*last time at which lock contention was detected and notified*/ struct timespec contention_time; void *client; diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index dc11ab62d0f..e83a93ded11 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -4477,7 +4477,7 @@ struct volume_options options[] = { .tags = {"locks"}, .description = "Specifies the mandatory-locking mode. Valid options " "are 'file' to use linux style mandatory locks, " - "'forced' to use volume striclty under mandatory lock " + "'forced' to use volume strictly under mandatory lock " "semantics only and 'optimal' to treat advisory and " "mandatory locks separately on their own." }, diff --git a/xlators/features/marker/src/marker-quota.c b/xlators/features/marker/src/marker-quota.c index b6bf2fb36a4..06ba0820a54 100644 --- a/xlators/features/marker/src/marker-quota.c +++ b/xlators/features/marker/src/marker-quota.c @@ -1325,7 +1325,7 @@ mq_reduce_parent_size_task (void *opaque) locked = _gf_true; if (contri.size >= 0) { - /* contri paramater is supplied only for rename operation. + /* contri parameter is supplied only for rename operation. * remove xattr is alreday performed, we need to skip * removexattr for rename operation */ @@ -1554,7 +1554,7 @@ mq_initiate_quota_task (void *opaque) Suppose hard link for a file f1 present in a directory d1 is created in the directory d2 (as f2). Now, since d2's contribution is not there in f1's inode ctx, d2's - contribution xattr wont be created and will create problems + contribution xattr won't be created and will create problems for quota operations. Don't create contribution if parent has been changed after diff --git a/xlators/features/marker/src/marker.c b/xlators/features/marker/src/marker.c index 659ca890066..522fdfb86d1 100644 --- a/xlators/features/marker/src/marker.c +++ b/xlators/features/marker/src/marker.c @@ -1364,7 +1364,7 @@ marker_rename_unwind (call_frame_t *frame, void *cookie, xlator_t *this, if (local->stub != NULL) { /* Remove contribution node from in-memory even if * remove-xattr has failed as the rename is already performed - * if local->stub is set, which means rename was sucessful + * if local->stub is set, which means rename was successful */ (void) mq_inode_ctx_get (oplocal->loc.inode, this, &ctx); if (ctx) { @@ -1641,7 +1641,7 @@ err: * b) we should subtract from src-parent exactly what we contributed to * src-parent * So, We hold a lock on src-parent to block any parallel transcations on - * src-inode (since thats the one which survives rename). + * src-inode (since that's the one which survives rename). * * If there are any parallel transactions on dst-inode they keep succeeding * till the association of dst-inode with dst-parent is broken because of an diff --git a/xlators/features/read-only/src/worm-helper.c b/xlators/features/read-only/src/worm-helper.c index 0770f9d77c4..b5fa4f84a29 100644 --- a/xlators/features/read-only/src/worm-helper.c +++ b/xlators/features/read-only/src/worm-helper.c @@ -288,7 +288,7 @@ out: } -/*This function checks whether a file's timeout is happend for the state +/*This function checks whether a file's timeout is happened for the state * transition and if yes, then it will do the transition from the current state * to the appropriate state. It also decides whether to continue or to block * the FOP. diff --git a/xlators/features/snapview-client/src/snapview-client.c b/xlators/features/snapview-client/src/snapview-client.c index 63ed160bd71..77be491655c 100644 --- a/xlators/features/snapview-client/src/snapview-client.c +++ b/xlators/features/snapview-client/src/snapview-client.c @@ -261,7 +261,7 @@ gf_svc_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, /* There is a possibility that, the client process just came online and does not have the inode on which the lookup came. In that case, - the fresh inode created from fuse for the lookup fop, wont have + the fresh inode created from fuse for the lookup fop, won't have the inode context set without which svc cannot decide where to STACK_WIND to. So by default it decides to send the fop to the regular subvolume (i.e first child of the xlator). If lookup fails @@ -2129,7 +2129,7 @@ out: /* Creating hardlinks for the files from the snapshot is not allowed as it will be equivalent of creating hardlinks across different filesystems. - And so is vise versa. + And so is vice versa. */ static int32_t gf_svc_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc, @@ -2196,7 +2196,7 @@ gf_svc_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc, ret = svc_inode_ctx_get (this, loc->inode, &inode_type); if (ret < 0) { - gf_log (this->name, GF_LOG_ERROR, "failed to get te inode " + gf_log (this->name, GF_LOG_ERROR, "failed to get the inode " "context for %s (gfid: %s)", loc->path, uuid_utoa (loc->inode->gfid)); op_ret = -1; diff --git a/xlators/features/snapview-server/src/snapview-server.c b/xlators/features/snapview-server/src/snapview-server.c index 18f00d7d2d8..89684ccac07 100644 --- a/xlators/features/snapview-server/src/snapview-server.c +++ b/xlators/features/snapview-server/src/snapview-server.c @@ -822,7 +822,7 @@ svs_getxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, const char *name, or the inode is SNAP_VIEW_ENTRY_POINT_INODE. Entry point is a virtual directory on which setxattr operations are not allowed. If getxattr has to be faked as success, then a value - for the name of the xattr has to be sent which we dont have. + for the name of the xattr has to be sent which we don't have. */ if (inode_ctx->type == SNAP_VIEW_ENTRY_POINT_INODE) { op_ret = -1; @@ -953,7 +953,7 @@ svs_fgetxattr (call_frame_t *frame, xlator_t *this, fd_t *fd, const char *name, or the inode is SNAP_VIEW_ENTRY_POINT_INODE. Entry point is a virtual directory on which setxattr operations are not allowed. If getxattr has to be faked as success, then a value - for the name of the xattr has to be sent which we dont have. + for the name of the xattr has to be sent which we don't have. */ if (inode_ctx->type == SNAP_VIEW_ENTRY_POINT_INODE) { op_ret = -1; @@ -1185,7 +1185,7 @@ svs_forget (xlator_t *this, inode_t *inode) ret = inode_ctx_del (inode, this, &value); if (ret) { - gf_log (this->name, GF_LOG_ERROR, "failed to delte the inode " + gf_log (this->name, GF_LOG_ERROR, "failed to delete the inode " "context of %s", uuid_utoa (inode->gfid)); goto out; } @@ -1633,11 +1633,11 @@ unwind: * the gfid it got from NFS client, for which it was not able to find the right * inode. So snapview-server was able to get the fs instance (glfs_t) of the * snapshot volume to which the entry belongs to, and the handle for the entry - * from the corresponding snapshot volume and fill those informations in the + * from the corresponding snapshot volume and fill those information in the * inode context. * * But now, since NFS server is able to find the inode from the inode table for - * the gfid it got from the NFS client, it wont send lookup. Rather it directly + * the gfid it got from the NFS client, it won't send lookup. Rather it directly * sends the fop it received from the client. Now this causes problems for * snapview-server. Because for each fop snapview-server assumes that lookup has * been performed on that entry and the entry's inode context contains the diff --git a/xlators/features/trash/src/trash.c b/xlators/features/trash/src/trash.c index 8a92685cf4b..e0bfcd9db43 100644 --- a/xlators/features/trash/src/trash.c +++ b/xlators/features/trash/src/trash.c @@ -90,7 +90,7 @@ out: } /** - * The trash directory path should be append at begining of file path for + * The trash directory path should be append at beginning of file path for * delete or truncate operations. Normal trashing moves the contents to * trash directory and trashing done by internal operations are moved to * internal_op directory inside trash. @@ -114,7 +114,7 @@ copy_trash_path (const char *priv_value, gf_boolean_t internal, char *path, /** * This function performs the reverse operation of copy_trash_path(). It gives * out a pointer, whose starting value will be the path inside trash directory, - * similar to orginal path. + * similar to original path. */ void remove_trash_path (const char *path, gf_boolean_t internal, char **rem_path) @@ -1062,7 +1062,7 @@ trash_unlink_rename_cbk (call_frame_t *frame, void *cookie, xlator_t *this, GF_VALIDATE_OR_GOTO ("trash", local, out); if ((op_ret == -1) && (op_errno == ENOENT)) { - /* the file path doesnot exists we want to create path + /* the file path does not exist we want to create path * for the file */ tmp_str = gf_strdup (local->newpath); @@ -1925,7 +1925,7 @@ trash_truncate_stat_cbk (call_frame_t *frame, void *cookie, xlator_t *this, goto out; } - /* Retrives the name of file from path */ + /* Retrieves the name of file from path */ local->loc.name = gf_strdup (strrchr (local->loc.path, '/')); if (!local->loc.name) { gf_log (this->name, GF_LOG_DEBUG, "out of memory"); @@ -2290,7 +2290,7 @@ out: } /** - * Volume set option is handled by the reconfigure funtion. + * Volume set option is handled by the reconfigure function. * Here we checks whether each option is set or not ,if it * sets then corresponding modifciations will be made */ @@ -2412,7 +2412,7 @@ notify (xlator_t *this, int event, void *data, ...) goto out; } - /* Here there is two possiblities ,if trash directory already + /* Here there is two possibilities ,if trash directory already * exist ,then we need to perform a rename operation on the * old one. Otherwise, we need to create the trash directory * For both, we need to pass location variable, gfid of parent diff --git a/xlators/features/upcall/src/upcall-internal.c b/xlators/features/upcall/src/upcall-internal.c index d8131a9f2ab..73ade8324b7 100644 --- a/xlators/features/upcall/src/upcall-internal.c +++ b/xlators/features/upcall/src/upcall-internal.c @@ -705,7 +705,7 @@ out: } /* - * This is called during upcall_inode_ctx cleanup incase of 'inode_forget'. + * This is called during upcall_inode_ctx cleanup in case of 'inode_forget'. * Send "UP_FORGET" to all the clients so that they invalidate their cache * entry and do a fresh lookup next time when any I/O comes in. */ diff --git a/xlators/features/upcall/src/upcall.c b/xlators/features/upcall/src/upcall.c index 0bf1f413a94..6dfc8723553 100644 --- a/xlators/features/upcall/src/upcall.c +++ b/xlators/features/upcall/src/upcall.c @@ -326,7 +326,7 @@ up_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this, goto out; } /* XXX: setattr -> UP_SIZE or UP_OWN or UP_MODE or UP_TIMES - * or INODE_UPDATE (or UP_PERM esp incase of ACLs -> INODE_INVALIDATE) + * or INODE_UPDATE (or UP_PERM esp in case of ACLs -> INODE_INVALIDATE) * Need to check what attr is changed and accordingly pass UP_FLAGS. * Bug1200271. */ @@ -2118,11 +2118,11 @@ err: * - Do not filter unregistered xattrs in the cbk, but in the call path. * Else, we will be invalidating on every preop, if the file already has * pending xattr set. Filtering unregistered xattrs on the fop path - * ensures we invalidate only in postop, everytime a postop comes with + * ensures we invalidate only in postop, every time a postop comes with * pending xattr value 1. * - Consider a brick is down, and the postop sets pending xattrs as long - * as the other brick is down. But we do not want to invalidate everytime - * a pending xattr is set, but we wan't to inalidate only the first time + * as the other brick is down. But we do not want to invalidate every time + * a pending xattr is set, but we want to invalidate only the first time * a pending xattr is set on any file. Hence, to identify if its the first * time a pending xattr is set, we compare the value of pending xattrs that * came in postop and postop cbk, if its same then its the first time. @@ -2527,7 +2527,7 @@ struct xlator_fops fops = { * notifications are not sent in this case. * But however, we need to store/update the * client info in the upcall state to be able - * to notify them incase of any changes done + * to notify them in case of any changes done * to the data. * * Below such fops do not trigger upcall diff --git a/xlators/lib/src/libxlator.h b/xlators/lib/src/libxlator.h index 53ea404cd73..0825ddb0f70 100644 --- a/xlators/lib/src/libxlator.h +++ b/xlators/lib/src/libxlator.h @@ -84,7 +84,7 @@ struct volume_mark { * Cf. evaluate_marker_results() and marker_idx_errno_map[] * in libxlator.c - * We provide two default gauges, one inteded for xtime + * We provide two default gauges, one intended for xtime * aggregation, other for volume mark aggregation. The * policies they represent agree with the hard-coded * one prior to gauges. Cf. marker_xtime_default_gauge diff --git a/xlators/mgmt/glusterd/src/glusterd-bitrot.c b/xlators/mgmt/glusterd/src/glusterd-bitrot.c index 8c5ddfd7896..167c434dffc 100644 --- a/xlators/mgmt/glusterd/src/glusterd-bitrot.c +++ b/xlators/mgmt/glusterd/src/glusterd-bitrot.c @@ -475,7 +475,7 @@ glusterd_should_i_stop_bitd () return stopped; } - /* Before stoping bitrot/scrubber daemon check + /* Before stopping bitrot/scrubber daemon check * other volume also whether respective volume * host a brick from this node or not.*/ continue; diff --git a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c index 3362f7323c9..c3ec249e6ba 100644 --- a/xlators/mgmt/glusterd/src/glusterd-brick-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-brick-ops.c @@ -1749,7 +1749,7 @@ glusterd_op_stage_add_brick (dict_t *dict, char **op_errstr, dict_t *rsp_dict) goto out; } /* op-version check for replica 2 to arbiter conversion. If we - * dont have this check, an older peer added as arbiter brick + * don't have this check, an older peer added as arbiter brick * will not have the arbiter xlator in its volfile. */ if ((conf->op_version < GD_OP_VERSION_3_8_0) && (arbiter_count == 1) && (replica_count == 3)) { diff --git a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c index 5a5d4ec2540..6761277be05 100644 --- a/xlators/mgmt/glusterd/src/glusterd-geo-rep.c +++ b/xlators/mgmt/glusterd/src/glusterd-geo-rep.c @@ -4070,7 +4070,7 @@ out: /* * glusterd_gsync_op_already_set: - * This funcion checks whether the op_value is same as in the + * This function checks whether the op_value is same as in the * gsyncd.conf file. * * RETURN VALUE: diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c index 8fdf9a3819a..d90e82c495c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-handler.c +++ b/xlators/mgmt/glusterd/src/glusterd-handler.c @@ -3871,7 +3871,7 @@ set_probe_error_str (int op_ret, int op_errno, char *op_errstr, char *errstr, break; case GF_PROBE_VOLUME_CONFLICT: - snprintf (errstr, len, "Atleast one volume on " + snprintf (errstr, len, "At least one volume on " "%s conflicts with existing volumes " "in the cluster", hostname); break; @@ -4086,7 +4086,7 @@ glusterd_list_friends (rpcsvc_request_t *req, dict_t *dict, int32_t flags) goto out; } - /* Reset ret to 0, needed to prevent failure incase no peers exist */ + /* Reset ret to 0, needed to prevent failure in case no peers exist */ ret = 0; rcu_read_lock (); if (!cds_list_empty (&priv->peers)) { @@ -6552,7 +6552,7 @@ struct rpcsvc_program gd_svc_cli_prog = { /** * This set of RPC progs are deemed to be trusted. Most of the actors support * read only queries, the only exception being MOUNT/UMOUNT which is required - * by geo-replication to supprt unprivileged master -> slave sessions. + * by geo-replication to support unprivileged master -> slave sessions. */ rpcsvc_actor_t gd_svc_cli_trusted_actors[GLUSTER_CLI_MAXVALUE] = { [GLUSTER_CLI_LIST_FRIENDS] = { "LIST_FRIENDS", GLUSTER_CLI_LIST_FRIENDS, glusterd_handle_cli_list_friends, NULL, 0, DRC_NA}, diff --git a/xlators/mgmt/glusterd/src/glusterd-locks.c b/xlators/mgmt/glusterd/src/glusterd-locks.c index ab69c78b0f0..cc9c03f5683 100644 --- a/xlators/mgmt/glusterd/src/glusterd-locks.c +++ b/xlators/mgmt/glusterd/src/glusterd-locks.c @@ -280,7 +280,7 @@ glusterd_acquire_multiple_locks_per_entity (dict_t *dict, uuid_t uuid, } if (count == locked_count) { - /* If all locking ops went successfuly, return as success */ + /* If all locking ops went successfully, return as success */ ret = 0; goto out; } @@ -528,7 +528,7 @@ glusterd_multiple_mgmt_v3_lock (dict_t *dict, uuid_t uuid, uint32_t *op_errno) } if (locked_count == GF_MAX_LOCKING_ENTITIES) { - /* If all locking ops went successfuly, return as success */ + /* If all locking ops went successfully, return as success */ ret = 0; goto out; } @@ -889,7 +889,7 @@ glusterd_mgmt_v3_unlock (const char *name, uuid_t uuid, char *type) type, name); ret = 0; - /* Release owner refernce which was held during lock */ + /* Release owner reference which was held during lock */ if (mgmt_lock_timer->timer) { ret = -1; mgmt_lock_timer_xl = mgmt_lock_timer->xl; diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index a19d98a51c2..63220ffd133 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -5800,7 +5800,7 @@ glusterd_op_txn_complete (uuid_t *txn_id) /* Based on the op-version, we release the cluster or mgmt_v3 lock */ if (priv->op_version < GD_OP_VERSION_3_6_0) { ret = glusterd_unlock (MY_UUID); - /* unlock cant/shouldnt fail here!! */ + /* unlock can't/shouldn't fail here!! */ if (ret) gf_msg (this->name, GF_LOG_CRITICAL, 0, GD_MSG_GLUSTERD_UNLOCK_FAIL, diff --git a/xlators/mgmt/glusterd/src/glusterd-rebalance.c b/xlators/mgmt/glusterd/src/glusterd-rebalance.c index 146090924a2..9066e038dd7 100644 --- a/xlators/mgmt/glusterd/src/glusterd-rebalance.c +++ b/xlators/mgmt/glusterd/src/glusterd-rebalance.c @@ -264,7 +264,7 @@ glusterd_handle_defrag_start (glusterd_volinfo_t *volinfo, char *op_errstr, if (dict_get_str (this->options, "transport.socket.bind-address", &volfileserver) == 0) { /*In the case of running multiple glusterds on a single machine, - *we should ensure that log file and unix socket file shouls be + *we should ensure that log file and unix socket file should be *unique in given cluster */ GLUSTERD_GET_DEFRAG_SOCK_FILE_OLD (sockfile, volinfo, diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c index 249d99ea3dd..1bb1df049f9 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c @@ -63,7 +63,7 @@ glusterd_snapobject_delete (glusterd_snap_t *snap) /* * This function is to be called only from glusterd_peer_detach_cleanup() - * as this continues to delete snaps inspite of faiure while deleting + * as this continues to delete snaps in spite of faiure while deleting * one, as we don't want to fail peer_detach in such a case. */ int @@ -447,7 +447,7 @@ out: /* Exports a bricks snapshot details only if required * - * The details will be exported only if the cluster op-version is greather than + * The details will be exported only if the cluster op-version is greater than * 4, ie. snapshot is supported in the cluster */ int @@ -1473,7 +1473,7 @@ out: return missed_delete; } -/* Genrate and store snap volfiles for imported snap object */ +/* Generate and store snap volfiles for imported snap object */ int32_t glusterd_gen_snap_volfiles (glusterd_volinfo_t *snap_vol, char *peer_snap_name) { @@ -3087,7 +3087,7 @@ glusterd_snap_common_quorum_calculate (glusterd_volinfo_t *volinfo, default. AFR does this: if quorum type is "auto": - - for odd numner of bricks (n), n/2 + 1 + - for odd number of bricks (n), n/2 + 1 bricks should be present - for even number of bricks n, n/2 bricks should be present along with the 1st diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index 3d984fa3f57..ef3ca7014b1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -75,7 +75,7 @@ struct snap_create_args_ { int32_t brickorder; }; -/* This structure is used to store unsupported options and thier values +/* This structure is used to store unsupported options and their values * for snapshotted volume. */ struct gd_snap_unsupported_opt_t { @@ -187,7 +187,7 @@ glusterd_find_missed_snap (dict_t *rsp_dict, glusterd_volinfo_t *vol, rcu_read_lock (); cds_list_for_each_entry_rcu (peerinfo, peers, uuid_list) { if (gf_uuid_compare (peerinfo->uuid, brickinfo->uuid)) { - /* If the brick doesnt belong to this peer */ + /* If the brick doesn't belong to this peer */ continue; } @@ -475,7 +475,7 @@ out: /* Third argument of scandir(used in glusterd_copy_geo_rep_session_files) - * is filter function. As we dont want "." and ".." files present in the + * is filter function. As we don't want "." and ".." files present in the * directory, we are excliding these 2 files. * "file_select" function here does the job of filtering. */ @@ -5679,7 +5679,7 @@ glusterd_snapshot_activate_deactivate_prevalidate (dict_t *dict, goto out; } - /*TODO: When multiple snapvolume are involved a cummulative + /*TODO: When multiple snapvolume are involved a cumulative * logic is required to tell whether is snapshot is * started/partially started/stopped*/ if (is_op_activate) { @@ -7681,7 +7681,7 @@ glusterd_get_single_brick_status (char **op_errstr, dict_t *rsp_dict, if (ret < 0) { goto out; } - /* While getting snap status we should show relevent information + /* While getting snap status we should show relevant information * for deactivated snaps. */ if (snap_volinfo->status == GLUSTERD_STATUS_STOPPED) { @@ -8415,7 +8415,7 @@ glusterd_snapshot_create_postvalidate (dict_t *dict, int32_t op_ret, * send EVENT_SNAPSHOT_ACTIVATED event. * * * * Also check, if hard limit and soft limit is reached in case * - * of successfuly creating the snapshot, and generate the event * + * of successfully creating the snapshot, and generate the event * */ if (is_origin_glusterd (dict) == _gf_true) { snap_activate = dict_get_str_boolean (priv->opts, @@ -9671,7 +9671,7 @@ glusterd_handle_snapshot_fn (rpcsvc_request_t *req) break; default: gf_msg (this->name, GF_LOG_ERROR, EINVAL, - GD_MSG_COMMAND_NOT_FOUND, "Unkown snapshot request " + GD_MSG_COMMAND_NOT_FOUND, "Unknown snapshot request " "type (%d)", type); ret = -1; /* Failure */ } @@ -10112,7 +10112,7 @@ gd_restore_snap_volume (dict_t *dict, dict_t *rsp_dict, goto out; } - /* Snap volume must be stoped before performing the + /* Snap volume must be stopped before performing the * restore operation. */ ret = glusterd_stop_volume (snap_vol); diff --git a/xlators/mgmt/glusterd/src/glusterd-tier.c b/xlators/mgmt/glusterd/src/glusterd-tier.c index 446cb33ff11..0823a83449d 100644 --- a/xlators/mgmt/glusterd/src/glusterd-tier.c +++ b/xlators/mgmt/glusterd/src/glusterd-tier.c @@ -744,7 +744,7 @@ glusterd_op_tier_start_stop (dict_t *dict, char **op_errstr, dict_t *rsp_dict) switch (cmd) { case GF_DEFRAG_CMD_START_TIER: - /* we check if its running and skip so that we dont get a + /* we check if its running and skip so that we don't get a * failure during force start */ ret = dict_get_int32 (dict, "force", &is_force); diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c index 55b2e735dc3..6be40ef8c02 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.c +++ b/xlators/mgmt/glusterd/src/glusterd-utils.c @@ -1920,7 +1920,7 @@ glusterd_set_brick_socket_filepath (glusterd_volinfo_t *volinfo, glusterd_set_socket_filepath (sock_filepath, sockpath, len); } -/* connection happens only if it is not aleady connected, +/* connection happens only if it is not already connected, * reconnections are taken care by rpc-layer */ int32_t @@ -4465,7 +4465,7 @@ glusterd_volinfo_copy_brickinfo (glusterd_volinfo_t *old_volinfo, if (!realpath (new_brickinfo->path, abspath)) { /* Here an ENOENT should also be a * failure as the brick is expected to - * be in existance + * be in existence */ gf_msg (this->name, GF_LOG_CRITICAL, errno, @@ -4573,7 +4573,7 @@ glusterd_delete_stale_volume (glusterd_volinfo_t *stale_volinfo, /* If stale volume is in started state, stop the stale bricks if the new * volume is started else, stop all bricks. - * We dont want brick_rpc_notify to access already deleted brickinfo, + * We don't want brick_rpc_notify to access already deleted brickinfo, * so disconnect all bricks from stale_volinfo (unconditionally), since * they are being deleted subsequently. */ @@ -12351,7 +12351,7 @@ op_version_check (xlator_t *this, int min_op_version, char *msg, int msglen) if (priv->op_version < min_op_version) { snprintf (msg, msglen, "One or more nodes do not support " "the required op-version. Cluster op-version must " - "atleast be %d.", min_op_version); + "at least be %d.", min_op_version); gf_msg (this->name, GF_LOG_ERROR, 0, GD_MSG_UNSUPPORTED_VERSION, "%s", msg); ret = -1; @@ -12781,7 +12781,7 @@ glusterd_launch_synctask (synctask_fn_t fn, void *opaque) * @option - option to be set to default. If NULL, all possible options will be * set to default * - * Returns 0 on sucess and -1 on failure. If @option is given, but doesn't match + * Returns 0 on success and -1 on failure. If @option is given, but doesn't match * any of the options that could be set, it is a success. */ /* @@ -13397,7 +13397,7 @@ glusterd_get_volopt_content (dict_t * ctx, gf_boolean_t xml_out) gf_msg_debug ("glusterd", 0, "Failed to " "get %s key from volume option entry", vme->key); - goto out; /*Some error while geting key*/ + goto out; /*Some error while getting key*/ } ret = xlator_volopt_dynload (vme->voltype, @@ -14322,7 +14322,7 @@ glusterd_get_dst_brick_info (char **dst_brick, char *volname, char **op_errstr, /* * IPv4 address contains '.' and ipv6 addresses contains ':' - * So finding the last occurance of ':' to + * So finding the last occurrence of ':' to * mark the start of brick path */ c = strrchr(*dup_dstbrick, ':'); diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 76266e1e194..fd256083722 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1119,7 +1119,7 @@ get_vol_transport_type (glusterd_volinfo_t *volinfo, char *tt) transport_type_to_str (volinfo->transport_type, tt); } -/* If no value has specfied for tcp,rdma volume from cli +/* If no value has specified for tcp,rdma volume from cli * use tcp as default value.Otherwise, use transport type * mentioned in volinfo */ diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c index 3973a0da78a..ec4c699c471 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c @@ -2705,7 +2705,7 @@ glusterd_op_start_volume (dict_t *dict, char **op_errstr) if (conf->op_version <= GD_OP_VERSION_3_7_6) { /* * Starting tier daemon on originator node will fail if - * atleast one of the peer host brick for the volume. + * at least one of the peer host brick for the volume. * Because The bricks in the peer haven't started when you * commit on originator node. * Please upgrade to version greater than GD_OP_VERSION_3_7_6 diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-set.c b/xlators/mgmt/glusterd/src/glusterd-volume-set.c index 26a076905e9..c5a4b267692 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volume-set.c +++ b/xlators/mgmt/glusterd/src/glusterd-volume-set.c @@ -682,7 +682,7 @@ validate_uss_dir (glusterd_volinfo_t *volinfo, dict_t *dict, char *key, goto out; } else if (i < 2) { snprintf (errstr, sizeof (errstr), "value of %s too short, " - "expects atleast two characters", key); + "expects at least two characters", key); goto out; } @@ -1224,7 +1224,7 @@ out: * Fifth field is <doctype>, which decides if the option is public and available * in "set help" or not. "NO_DOC" entries are not part of the public interface * and are subject to change at any time. This also decides if an option is - * global (apllies to all volumes) or normal (applies to only specified volume). + * global (applies to all volumes) or normal (applies to only specified volume). * * Sixth field is <flags>. * @@ -1233,7 +1233,7 @@ out: * Eight field is description of option: If NULL, tried to fetch from * translator code's xlator_options table. * - * Nineth field is validation function: If NULL, xlator's option specific + * Ninth field is validation function: If NULL, xlator's option specific * validation will be tried, otherwise tried at glusterd code itself. * * There are two type of entries: basic and special. @@ -1963,7 +1963,7 @@ struct volopt_map_entry glusterd_volopt_map[] = { .option = "xattr-cache-list", .op_version = GD_OP_VERSION_4_0_0, .flags = VOLOPT_FLAG_CLIENT_OPT, - .description = "A comma separeted list of xattrs that shall be " + .description = "A comma separated list of xattrs that shall be " "cached by md-cache. The only wildcard allowed is '*'" }, { .key = "performance.nl-cache-pass-through", diff --git a/xlators/mgmt/glusterd/src/glusterd.c b/xlators/mgmt/glusterd/src/glusterd.c index 7dc45129312..0714714d33e 100644 --- a/xlators/mgmt/glusterd/src/glusterd.c +++ b/xlators/mgmt/glusterd/src/glusterd.c @@ -2062,9 +2062,9 @@ fini (xlator_t *this) #if 0 /* Running threads might be using these resourses, we have to cancel/stop - * running threads before deallocating the memeory, but we don't have + * running threads before deallocating the memory, but we don't have * control over the running threads to do pthread_cancel(). - * So memeory freeing handover to kernel. + * So memory freeing handover to kernel. */ /*TODO: cancel/stop the running threads*/ diff --git a/xlators/mount/fuse/src/fuse-bridge.c b/xlators/mount/fuse/src/fuse-bridge.c index ed70f82f745..20f015431a0 100644 --- a/xlators/mount/fuse/src/fuse-bridge.c +++ b/xlators/mount/fuse/src/fuse-bridge.c @@ -5581,7 +5581,7 @@ fuse_dumper (xlator_t *this, fuse_in_header_t *finh, void *msg, &fts, &fsig); diov[4] = (struct iovec){ finh, sizeof (*finh) }; if (finh->opcode == FUSE_WRITE) { - /* WRITE has special data alingment, see comment in + /* WRITE has special data alignment, see comment in fuse_write(). */ diov[4].iov_len += sizeof (struct fuse_write_in); } diff --git a/xlators/nfs/server/src/exports.c b/xlators/nfs/server/src/exports.c index 75780587147..671aa04ffcb 100644 --- a/xlators/nfs/server/src/exports.c +++ b/xlators/nfs/server/src/exports.c @@ -458,7 +458,7 @@ out: * * @dict : the dict to walk * @key : the key in the dict we are currently on - * @val : the value in the dict assocated with the key + * @val : the value in the dict associated with the key * @tmp : Additional parameter data (not used) * * Passed as a function pointer to dict_foreach (). @@ -479,7 +479,7 @@ __exp_item_print_walk (dict_t *dict, char *key, data_t *val, void *tmp) * * @dict : the dict to walk * @key : the key in the dict we are currently on - * @val : the value in the dict assocated with the key + * @val : the value in the dict associated with the key * @tmp : Additional parameter data (not used) * * Passed as a function pointer to dict_foreach (). @@ -765,7 +765,7 @@ __exp_line_ng_host_str_parse (char *str, struct export_item **exp_item) *parens = '('; /* Restore the string */ - /* Options start at the parantheses */ + /* Options start at the parentheses */ optstr = parens; ret = __exp_line_opt_parse (optstr, &exp_opts); @@ -996,7 +996,7 @@ out: * it will point to a valid memory region that is allocated by * this function. * @check_ms: If this variable is set then we cross check the directory line - * with whats in gluster's vol files and reject them if they don't + * with what's in gluster's vol files and reject them if they don't * match. * * @return : success: GF_EXP_PARSE_SUCCESS @@ -1200,7 +1200,7 @@ _exp_line_parse (const char *line, struct export_dir **dir, gf_msg (GF_EXP, GF_LOG_WARNING, 0, NFS_MSG_PARSE_FAIL, "Error parsing hosts for: %s", line); /* If netgroups parsing failed, AND - * host parsing failed, then theres something really + * host parsing failed, then there's something really * wrong with this line, so we're just going to * log it and fail out. */ diff --git a/xlators/nfs/server/src/mount3.c b/xlators/nfs/server/src/mount3.c index 40244e9b794..472915fb067 100644 --- a/xlators/nfs/server/src/mount3.c +++ b/xlators/nfs/server/src/mount3.c @@ -373,7 +373,7 @@ out: return ret; } -/* Overwrite the contents of the rwtab with te in-memory client list. +/* Overwrite the contents of the rwtab with the in-memory client list. * Fail gracefully if the stora_handle is not locked. */ static void diff --git a/xlators/performance/md-cache/src/md-cache.c b/xlators/performance/md-cache/src/md-cache.c index a3721a8e3f4..8cb30e1a2c3 100644 --- a/xlators/performance/md-cache/src/md-cache.c +++ b/xlators/performance/md-cache/src/md-cache.c @@ -312,7 +312,7 @@ __is_cache_valid (xlator_t *this, time_t mdc_time) /* conf->lock here is not taken deliberately, so that the multi * threaded IO doesn't contend on a global lock. While updating - * the variable, the lock is taken, so that atleast the writes are + * the variable, the lock is taken, so that at least the writes are * intact. The read of last_child_down may return junk, but that * is for a very short period of time. */ @@ -3694,7 +3694,7 @@ struct volume_options mdc_options[] = { .default_value = "", .op_version = {GD_OP_VERSION_4_0_0}, .flags = OPT_FLAG_SETTABLE | OPT_FLAG_CLIENT_OPT | OPT_FLAG_DOC, - .description = "A comma separeted list of xattrs that shall be " + .description = "A comma separated list of xattrs that shall be " "cached by md-cache. The only wildcard allowed is '*'", }, { .key = {"pass-through"}, diff --git a/xlators/performance/nl-cache/src/nl-cache-helper.c b/xlators/performance/nl-cache/src/nl-cache-helper.c index 67b17af8b69..b6b60a74918 100644 --- a/xlators/performance/nl-cache/src/nl-cache-helper.c +++ b/xlators/performance/nl-cache/src/nl-cache-helper.c @@ -23,14 +23,14 @@ * are sent before creating the file. Hence the negative entry cache. * It can exist even when the positive entry cache is invalid. It also * has the entries that were deleted from this directory. - * Freed on recieving upcall(with dentry change flag) or on expiring + * Freed on receiving upcall(with dentry change flag) or on expiring * timeout of the cache. * * - Positive entries: Populated as a part of readdirp, and as a part of * mkdir followed by creates inside that directory. Lookups and other * fops do not populate the positive entry (as it can grow long and is * of no value add) - * Freed on recieving upcall(with dentry change flag) or on expiring + * Freed on receiving upcall(with dentry change flag) or on expiring * timeout of the cache. * * Data structures to store cache? @@ -172,7 +172,7 @@ nlc_inode_ctx_set (xlator_t *this, inode_t *inode, nlc_ctx_t *nlc_ctx, int ret = -1; /* The caller may choose to set one of the ctxs, hence check - * if the ctx1/2 is non zero and then send the adress. If we + * if the ctx1/2 is non zero and then send the address. If we * blindly send the address of both the ctxs, it may reset the * ctx the caller had sent NULL(intended as leave untouched) for.*/ LOCK(&inode->lock); @@ -903,7 +903,7 @@ nlc_dir_add_ne (xlator_t *this, inode_t *inode, const char *name) LOCK (&nlc_ctx->lock); { - /* There is one possiblility where we need to search before + /* There is one possibility where we need to search before * adding NE: when there are two parallel lookups on a non * existent file */ if (!__nlc_search_ne (nlc_ctx, name)) { diff --git a/xlators/performance/nl-cache/src/nl-cache.h b/xlators/performance/nl-cache/src/nl-cache.h index 3bd7c83237a..afc3bec4a7f 100644 --- a/xlators/performance/nl-cache/src/nl-cache.h +++ b/xlators/performance/nl-cache/src/nl-cache.h @@ -105,7 +105,7 @@ struct nlc_statistics { gf_atomic_t getrealfilename_miss; gf_atomic_t pe_inode_cnt; gf_atomic_t ne_inode_cnt; - gf_atomic_t nlc_invals; /* No. of invalidates recieved from upcall*/ + gf_atomic_t nlc_invals; /* No. of invalidates received from upcall*/ }; struct nlc_conf { diff --git a/xlators/performance/write-behind/src/write-behind.c b/xlators/performance/write-behind/src/write-behind.c index 20767955e4e..bb07cb53c4b 100644 --- a/xlators/performance/write-behind/src/write-behind.c +++ b/xlators/performance/write-behind/src/write-behind.c @@ -107,7 +107,7 @@ typedef struct wb_inode { size_t size; /* Size of the file to catch write after EOF. */ gf_lock_t lock; xlator_t *this; - int dontsync; /* If positive, dont pick lies for + int dontsync; /* If positive, don't pick lies for * winding. This is needed to break infinite * recursion during invocation of * wb_process_queue from @@ -1354,7 +1354,7 @@ __wb_preprocess_winds (wb_inode_t *wb_inode) * as winding these lies again will trigger an infinite * recursion of wb_process_queue being called from a * failed fulfill. However, pick non-lied requests for - * winding so that application wont block indefinitely + * winding so that application won't block indefinitely * waiting for write result. */ @@ -1586,7 +1586,7 @@ __wb_pick_winds (wb_inode_t *wb_inode, list_head_t *tasks, } else { /* There is a conflicting liability which was * not attempted to sync even once. Wait till - * atleast one attempt to sync is made. + * at least one attempt to sync is made. */ } diff --git a/xlators/protocol/auth/addr/src/addr.c b/xlators/protocol/auth/addr/src/addr.c index cc5897316b0..88deb49a822 100644 --- a/xlators/protocol/auth/addr/src/addr.c +++ b/xlators/protocol/auth/addr/src/addr.c @@ -317,7 +317,7 @@ struct volume_options options[] = { .tags = {}, /* option_validation_fn validate_fn; */ }, - /* Backword compatibility */ + /* Backward compatibility */ { .key = {"auth.ip.*.allow"}, .type = GF_OPTION_TYPE_INTERNET_ADDRESS_LIST, .default_value = "*", diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c index 1c1ec5ce7e1..0025fb55697 100644 --- a/xlators/protocol/client/src/client-handshake.c +++ b/xlators/protocol/client/src/client-handshake.c @@ -1265,7 +1265,7 @@ client_setvolume (xlator_t *this, struct rpc_clnt *rpc) * Connection-id should always be unique so that server never gets to * reuse the previous connection resources so it cleans up the resources * on every disconnect. Otherwise it may lead to stale resources, i.e. - * leaked file desciptors, inode/entry locks + * leaked file descriptors, inode/entry locks */ snprintf (counter_str, sizeof (counter_str), diff --git a/xlators/protocol/server/src/authenticate.c b/xlators/protocol/server/src/authenticate.c index c0007766f85..5163d465261 100644 --- a/xlators/protocol/server/src/authenticate.c +++ b/xlators/protocol/server/src/authenticate.c @@ -38,7 +38,7 @@ init (dict_t *this, char *key, data_t *value, void *data) PS_MSG_AUTHENTICATE_ERROR, "AUTHENTICATION MODULE " "\"IP\" HAS BEEN REPLACED BY \"ADDR\""); dict_set (this, key, data_from_dynptr (NULL, 0)); - /* TODO: 1.3.x backword compatibility */ + /* TODO: 1.3.x backward compatibility */ // *error = -1; // return; key = "addr"; diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c index 702856da216..f6fb32ed140 100644 --- a/xlators/protocol/server/src/server-helpers.c +++ b/xlators/protocol/server/src/server-helpers.c @@ -486,7 +486,7 @@ get_frame_from_request (rpcsvc_request_t *req) /* For nfs clients the server processes will be running within the trusted storage pool machines. So if we do not do root-squashing for nfs servers, thinking - that its a trusted client, then root-squashing wont + that its a trusted client, then root-squashing won't work for nfs clients. */ if (req->pid == NFS_PID) @@ -1345,7 +1345,7 @@ auth_set_username_passwd (dict_t *input_params, dict_t *config_params, gf_msg_debug ("auth/login", 0, "username not found, returning " "DONT-CARE"); /* For non trusted clients username and password - will not be there. So dont reject the client. + will not be there. So don't reject the client. */ ret = 0; goto out; diff --git a/xlators/protocol/server/src/server-rpc-fops.c b/xlators/protocol/server/src/server-rpc-fops.c index 30f288742a2..915e166223c 100644 --- a/xlators/protocol/server/src/server-rpc-fops.c +++ b/xlators/protocol/server/src/server-rpc-fops.c @@ -146,7 +146,7 @@ server_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, * It also might lead to wrong decisions being * taken if the future lookups on this inode are * successful since they are able to find the - * inode in the inode table (atleast gfid based + * inode in the inode table (at least gfid based * lookups will be successful, if the lookup * is a soft lookup) */ diff --git a/xlators/protocol/server/src/server-rpc-fops_v2.c b/xlators/protocol/server/src/server-rpc-fops_v2.c index ac6fb86c8cd..d1b2a55131b 100644 --- a/xlators/protocol/server/src/server-rpc-fops_v2.c +++ b/xlators/protocol/server/src/server-rpc-fops_v2.c @@ -131,7 +131,7 @@ server4_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, * It also might lead to wrong decisions being * taken if the future lookups on this inode are * successful since they are able to find the - * inode in the inode table (atleast gfid based + * inode in the inode table (at least gfid based * lookups will be successful, if the lookup * is a soft lookup) */ @@ -5645,7 +5645,7 @@ server4_0_icreate (rpcsvc_request_t *req) state->mode = args.mode; gf_asprintf (&state->resolve.bname, INODE_PATH_FMT, uuid_utoa (gfid)); - /* parent is an auxillary inode number */ + /* parent is an auxiliary inode number */ memset (state->resolve.pargfid, 0, sizeof (uuid_t)); state->resolve.pargfid[15] = GF_AUXILLARY_PARGFID; diff --git a/xlators/protocol/server/src/server.c b/xlators/protocol/server/src/server.c index 35c14a39c6c..e4a5bdac1f5 100644 --- a/xlators/protocol/server/src/server.c +++ b/xlators/protocol/server/src/server.c @@ -360,7 +360,7 @@ _check_for_auth_option (dict_t *d, char *k, data_t *v, goto out; } - /* fast fwd thru module type */ + /* fast fwd through module type */ tail = strchr (tail, '.'); if (!tail) goto out; @@ -1146,7 +1146,7 @@ server_init (xlator_t *this) } glusterfs3_3_fop_prog.options = this->options; - /* make sure we register the fop prgram at the head to optimize + /* make sure we register the fop program at the head to optimize * lookup */ ret = rpcsvc_program_register (conf->rpc, &glusterfs3_3_fop_prog, diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c index 21e7bed9159..419df784585 100644 --- a/xlators/storage/bd/src/bd-helper.c +++ b/xlators/storage/bd/src/bd-helper.c @@ -74,7 +74,7 @@ bd_local_init (call_frame_t *frame, xlator_t *this) /* * VG are set with the tag in GF_XATTR_VOL_ID_KEY:<uuid> format. - * This function validates this tag agains volume-uuid. Also goes + * This function validates this tag against volume-uuid. Also goes * through LV list to find out if a thin-pool is configured or not. */ int bd_scan_vg (xlator_t *this, bd_priv_t *priv) @@ -128,7 +128,7 @@ int bd_scan_vg (xlator_t *this, bd_priv_t *priv) } check: - /* If there is no volume-id set in dict, we cant validate */ + /* If there is no volume-id set in dict, we can't validate */ tmp_data = dict_get (this->options, "volume-id"); if (!tmp_data) { op_ret = 0; @@ -295,7 +295,7 @@ bd_fd_ctx_get (xlator_t *this, fd_t *fd, bd_fd_t **bdfd) * Validates if LV exists for given inode or not. * Returns 0 if LV exists and size also matches. * If LV does not exist -1 returned - * If LV size mismatches, returnes 1 also lv_size is updated with actual + * If LV size mismatches, returns 1 also lv_size is updated with actual * size */ int diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c index 57699ae0aac..e37bfeaf83b 100644 --- a/xlators/storage/bd/src/bd.c +++ b/xlators/storage/bd/src/bd.c @@ -678,7 +678,7 @@ bd_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags, posix: - /* open posix equivalant of this file, fd needed for fd related + /* open posix equivalent of this file, fd needed for fd related operations like fsetxattr, ftruncate etc */ STACK_WIND (frame, bd_open_cbk, FIRST_CHILD(this), FIRST_CHILD(this)->fops->open, loc, flags, fd, xdata); @@ -895,7 +895,7 @@ out: } /* - * Call back for removexattr after removing BD_XATTR incase of + * Call back for removexattr after removing BD_XATTR in case of * bd create failure */ int diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c index c17534536d2..a7161de3396 100644 --- a/xlators/storage/posix/src/posix-common.c +++ b/xlators/storage/posix/src/posix-common.c @@ -1252,7 +1252,7 @@ struct volume_options options[] = { "of fsyncs.\n" "\t- syncfs-single-fsync: Perform one syncfs() on behalf of a batch" " of fsyncs and one fsync() per batch.\n" - "\t- syncfs-reverse-fsync: Preform one syncfs() on behalf of a batch" + "\t- syncfs-reverse-fsync: Perform one syncfs() on behalf of a batch" " of fsyncs and fsync() each file in the batch in reverse order.\n" " in reverse order.\n" "\t- reverse-fsync: Perform fsync() of each file in the batch in" @@ -1305,7 +1305,7 @@ struct volume_options options[] = { .type = GF_OPTION_TYPE_STR, .default_value = "none", .description = "Option to control XATTR user namespace on the raw filesystem: " - "\t- None: Will use the user namespace, so files will be exchangable with Linux.\n" + "\t- None: Will use the user namespace, so files will be exchangeable with Linux.\n" " The raw filesystem will not be compatible with OS X Finder.\n" "\t- Strip: Will strip the user namespace before setting. The raw filesystem will work in OS X.\n", .op_version = {GD_OP_VERSION_3_6_0}, diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c index 0bb4c055a3c..ed95b04b69c 100644 --- a/xlators/storage/posix/src/posix-handle.c +++ b/xlators/storage/posix/src/posix-handle.c @@ -209,7 +209,7 @@ posix_make_ancestryfromgfid (xlator_t *this, char *path, int pathsize, if (top == PATH_MAX/2) { gf_msg (this->name, GF_LOG_ERROR, P_MSG_ANCESTORY_FAILED, - 0, "build ancestory failed due to " + 0, "build ancestry failed due to " "deep directory hierarchy, depth: %d.", top); *op_errno = EINVAL; ret = -1; diff --git a/xlators/storage/posix/src/posix-metadata.c b/xlators/storage/posix/src/posix-metadata.c index 00cd2409532..03e14f9873f 100644 --- a/xlators/storage/posix/src/posix-metadata.c +++ b/xlators/storage/posix/src/posix-metadata.c @@ -20,7 +20,7 @@ static int gf_posix_xattr_enotsup_log; /* posix_mdata_to_disk converts posix_mdata_t into network byte order to - * save it on disk in machine independant format + * save it on disk in machine independent format */ static inline void posix_mdata_to_disk (posix_mdata_disk_t *out, posix_mdata_t *in) |