diff --git a/base/data-struct/hash.c b/base/data-struct/hash.c index 7ef33c11b..6f15a33f7 100644 --- a/base/data-struct/hash.c +++ b/base/data-struct/hash.c @@ -30,10 +30,10 @@ struct dm_hash_table { unsigned num_nodes; unsigned num_hint; unsigned mask_slots; /* (slots - 1) -> used as hash mask */ - unsigned collisions; /* Collissions of hash keys */ + unsigned collisions; /* Collisions of hash keys */ unsigned search; /* How many keys were searched */ unsigned found; /* How many nodes were found */ - unsigned same_hash; /* Was there a colision with same masked hash and len ? */ + unsigned same_hash; /* Was there a collision with same masked hash and len ? */ struct dm_hash_node **slots; }; @@ -348,7 +348,7 @@ int dm_hash_insert_allow_multiple(struct dm_hash_table *t, const char *key, /* * Look through multiple entries with the same key for one that has a - * matching val and return that. If none have maching val, return NULL. + * matching val and return that. If none have matching val, return NULL. */ void *dm_hash_lookup_with_val(struct dm_hash_table *t, const char *key, const void *val, uint32_t val_len) diff --git a/coverity/coverity_model.c b/coverity/coverity_model.c index a6840a6ed..ea83bd312 100644 --- a/coverity/coverity_model.c +++ b/coverity/coverity_model.c @@ -21,7 +21,7 @@ * compile (using outdir 'cov'): * cov-build --dir=cov make CC=gcc * - * analyze (agressively, using 'cov') + * analyze (aggressively, using 'cov') * cov-analyze --dir cov --wait-for-license --hfa --concurrency --enable-fnptr --enable-constraint-fpp --security --all --aggressiveness-level=high --field-offset-escape --user-model-file=coverity/coverity_model.xml * * generate html output (to 'html' from 'cov'): @@ -70,7 +70,7 @@ void *memccpy(void *dest, const void *src, int c, size_t n) } /* - * 2 lines bellow needs to be placed in coverity/config/user_nodefs.h + * 2 lines below needs to be placed in coverity/config/user_nodefs.h * Not sure about any other way. * Without them, coverity shows warning since x86 system header files * are using inline assembly to reset fdset diff --git a/daemons/cmirrord/cluster.c b/daemons/cmirrord/cluster.c index 4071daf79..e2af10228 100644 --- a/daemons/cmirrord/cluster.c +++ b/daemons/cmirrord/cluster.c @@ -279,7 +279,7 @@ static int handle_cluster_request(struct clog_cpg *entry __attribute__((unused)) * With resumes, we only handle our own. * Resume is a special case that requires * local action (to set up CPG), followed by - * a cluster action to co-ordinate reading + * a cluster action to coordinate reading * the disk and checkpointing */ if (tmp->u_rq.request_type == DM_ULOG_RESUME) { diff --git a/daemons/cmirrord/functions.c b/daemons/cmirrord/functions.c index 032fa0153..e230aa642 100644 --- a/daemons/cmirrord/functions.c +++ b/daemons/cmirrord/functions.c @@ -254,7 +254,7 @@ static int read_log(struct log_c *lc) bitset_size = lc->region_count / 8; bitset_size += (lc->region_count % 8) ? 1 : 0; - /* 'lc->clean_bits + 1' becasue dm_bitset_t leads with a uint32_t */ + /* 'lc->clean_bits + 1' because dm_bitset_t leads with a uint32_t */ memcpy(lc->clean_bits + 1, (char *)lc->disk_buffer + 1024, bitset_size); return 0; @@ -281,7 +281,7 @@ static int write_log(struct log_c *lc) bitset_size = lc->region_count / 8; bitset_size += (lc->region_count % 8) ? 1 : 0; - /* 'lc->clean_bits + 1' becasue dm_bitset_t leads with a uint32_t */ + /* 'lc->clean_bits + 1' because dm_bitset_t leads with a uint32_t */ memcpy((char *)lc->disk_buffer + 1024, lc->clean_bits + 1, bitset_size); if (rw_log(lc, 1)) { @@ -927,7 +927,7 @@ int local_resume(struct dm_ulog_request *rq) * * Since this value doesn't change, the kernel * should not need to talk to server to get this - * The function is here for completness + * The function is here for completeness * * Returns: 0 on success, -EXXX on failure */ @@ -1018,7 +1018,7 @@ static int clog_in_sync(struct dm_ulog_request *rq) * happen for reads is that additional read attempts may be * taken. * - * Futher investigation may be required to determine if there are + * Further investigation may be required to determine if there are * similar possible outcomes when the mirror is in the process of * recovering. In that case, lc->in_sync would not have been set * yet. diff --git a/daemons/dmeventd/dmeventd.c b/daemons/dmeventd/dmeventd.c index 27b19ea3c..0e8524548 100644 --- a/daemons/dmeventd/dmeventd.c +++ b/daemons/dmeventd/dmeventd.c @@ -236,7 +236,7 @@ struct thread_status { int status; /* See DM_THREAD_{REGISTERING,RUNNING,DONE} */ int events; /* bitfield for event filter. */ - int current_events; /* bitfield for occured events. */ + int current_events; /* bitfield for occurred events. */ struct dm_task *wait_task; int pending; /* Set when event filter change is pending */ time_t next_time; @@ -427,7 +427,7 @@ static struct thread_status *_alloc_thread_status(const struct message_data *dat if (!(thread->device.name = strdup(data->device_uuid))) goto_out; - /* runs ioctl and may register lvm2 pluging */ + /* runs ioctl and may register lvm2 plugin */ thread->processing = 1; thread->status = DM_THREAD_REGISTERING; @@ -520,7 +520,7 @@ static int _fetch_string(char **ptr, char **src, const int delimiter) *p = delimiter; *src = p; } - (*src)++; /* Skip delmiter, next field */ + (*src)++; /* Skip delimiter, next field */ } else if ((len = strlen(*src))) { /* No delimiter, item ends with '\0' */ if (!(*ptr = strdup(*src))) { diff --git a/daemons/dmeventd/libdevmapper-event.c b/daemons/dmeventd/libdevmapper-event.c index 53ddfdfa9..485f04605 100644 --- a/daemons/dmeventd/libdevmapper-event.c +++ b/daemons/dmeventd/libdevmapper-event.c @@ -404,7 +404,7 @@ int daemon_talk(struct dm_event_fifos *fifos, /* * Check for usable client fifo file * - * Returns: 2 cliant path does not exists, dmeventd should be restarted + * Returns: 2 client path does not exists, dmeventd should be restarted * 1 on success, 0 otherwise */ static int _check_for_usable_fifos(char *dmeventd_path, struct dm_event_fifos *fifos) @@ -1007,7 +1007,7 @@ void dm_event_log(const char *subsys, int level, const char *file, static char *_skip_string(char *src, const int delimiter) { - src = srtchr(src, delimiter); + src = strchr(src, delimiter); if (src && *(src + 1)) return src + 1; return NULL; diff --git a/daemons/dmeventd/libdevmapper-event.h b/daemons/dmeventd/libdevmapper-event.h index cc65e7263..27292f16c 100644 --- a/daemons/dmeventd/libdevmapper-event.h +++ b/daemons/dmeventd/libdevmapper-event.h @@ -41,7 +41,7 @@ enum dm_event_mask { DM_EVENT_STATUS_MASK = 0xFF0000, DM_EVENT_SYNC_STATUS = 0x010000, /* Mirror synchronization completed/failed. */ - DM_EVENT_TIMEOUT = 0x020000, /* Timeout has occured */ + DM_EVENT_TIMEOUT = 0x020000, /* Timeout has occurred */ DM_EVENT_REGISTRATION_PENDING = 0x1000000, /* Monitor thread is setting-up/shutting-down */ }; @@ -109,7 +109,7 @@ int dm_event_unregister_handler(const struct dm_event_handler *dmevh); /* Set debug level for logging, and whether to log on stdout/stderr or syslog */ void dm_event_log_set(int debug_log_level, int use_syslog); -/* Log messages acroding to current debug level */ +/* Log messages according to current debug level */ __attribute__((format(printf, 6, 0))) void dm_event_log(const char *subsys, int level, const char *file, int line, int dm_errno_or_class, diff --git a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c index 5f1db3203..2263e67a1 100644 --- a/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c +++ b/daemons/dmeventd/plugins/mirror/dmeventd_mirror.c @@ -38,7 +38,7 @@ static void _process_status_code(dm_status_mirror_health_t health, * A => Alive - No failures * D => Dead - A write failure occurred leaving mirror out-of-sync * F => Flush failed. - * S => Sync - A sychronization failure occurred, mirror out-of-sync + * S => Sync - A synchronization failure occurred, mirror out-of-sync * R => Read - A read failure occurred, mirror data unaffected * U => Unclassified failure (bug) */ diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c index 5be605a35..cc101fc49 100644 --- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c +++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c @@ -17,7 +17,7 @@ #include "daemons/dmeventd/libdevmapper-event.h" #include "lib/config/defaults.h" -/* Hold enough elements for the mximum number of RAID images */ +/* Hold enough elements for the maximum number of RAID images */ #define RAID_DEVS_ELEMS ((DEFAULT_RAID_MAX_IMAGES + 63) / 64) struct dso_state { diff --git a/daemons/dmeventd/plugins/thin/dmeventd_thin.c b/daemons/dmeventd/plugins/thin/dmeventd_thin.c index 5ff5bb8e4..43b1b848d 100644 --- a/daemons/dmeventd/plugins/thin/dmeventd_thin.c +++ b/daemons/dmeventd/plugins/thin/dmeventd_thin.c @@ -87,7 +87,7 @@ static int _run_command(struct dso_state *state) log_verbose("Executing command: %s", state->cmd_str); /* TODO: - * Support parallel run of 'task' and it's waitpid maintainence + * Support parallel run of 'task' and it's waitpid maintenance * ATM we can't handle signaling of SIGALRM * as signalling is not allowed while 'process_event()' is running */ @@ -245,7 +245,7 @@ void process_event(struct dm_task *dmt, /* * Trigger action when threshold boundary is exceeded. * Report 80% threshold warning when it's used above 80%. - * Only 100% is exception as it cannot be surpased so policy + * Only 100% is exception as it cannot be surpassed so policy * action is called for: >50%, >55% ... >95%, 100% */ state->metadata_percent = dm_make_percent(tps->used_metadata_blocks, tps->total_metadata_blocks); @@ -379,7 +379,7 @@ int register_device(const char *device, state->argv[1] = str + 1; /* 1 argument - vg/lv */ _init_thread_signals(state); - } else /* Unuspported command format */ + } else /* Unsupported command format */ goto inval; state->pid = -1; diff --git a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c index d3f1ba4b9..cf93c4551 100644 --- a/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c +++ b/daemons/dmeventd/plugins/vdo/dmeventd_vdo.c @@ -19,7 +19,7 @@ /* * Use parser from new device_mapper library. * Although during compilation we can see dm_vdo_status_parse() - * in runtime we are linked agains systems libdm 'older' library + * in runtime we are linked against systems libdm 'older' library * which does not provide this symbol and plugin fails to load */ /* coverity[unnecessary_header] used for parsing */ @@ -78,7 +78,7 @@ static int _run_command(struct dso_state *state) log_verbose("Executing command: %s", state->cmd_str); /* TODO: - * Support parallel run of 'task' and it's waitpid maintainence + * Support parallel run of 'task' and it's waitpid maintenance * ATM we can't handle signaling of SIGALRM * as signalling is not allowed while 'process_event()' is running */ @@ -227,7 +227,7 @@ void process_event(struct dm_task *dmt, /* * Trigger action when threshold boundary is exceeded. * Report 80% threshold warning when it's used above 80%. - * Only 100% is exception as it cannot be surpased so policy + * Only 100% is exception as it cannot be surpassed so policy * action is called for: >50%, >55% ... >95%, 100% */ if ((state->percent > WARNING_THRESH) && @@ -354,7 +354,7 @@ int register_device(const char *device, _init_thread_signals(state); } else if (cmd[0] == 0) { state->name = "volume"; /* What to use with 'others?' */ - } else/* Unuspported command format */ + } else/* Unsupported command format */ goto inval; state->pid = -1; diff --git a/daemons/lvmdbusd/lv.py b/daemons/lvmdbusd/lv.py index caee23379..293e2070d 100644 --- a/daemons/lvmdbusd/lv.py +++ b/daemons/lvmdbusd/lv.py @@ -67,7 +67,7 @@ def lvs_state_retrieve(selection, cache_refresh=True): try: # When building up the model, it's best to process LVs with the least - # dependencies to those that are dependant upon other LVs. Otherwise, when + # dependencies to those that are dependent upon other LVs. Otherwise, when # we are trying to gather information we could be in a position where we # don't have information available yet. lvs = sorted(cfg.db.fetch_lvs(selection), key=get_key) diff --git a/daemons/lvmdbusd/lvmdb.py.in b/daemons/lvmdbusd/lvmdb.py.in index e6bec926a..9f03399af 100644 --- a/daemons/lvmdbusd/lvmdb.py.in +++ b/daemons/lvmdbusd/lvmdb.py.in @@ -351,7 +351,7 @@ class DataStore(object): else: rc = [] for s in pv_name: - # Ths user could be using a symlink instead of the actual + # The user could be using a symlink instead of the actual # block device, make sure we are using actual block device file # if the pv name isn't in the lookup if s not in self.pv_path_to_uuid: diff --git a/daemons/lvmdbusd/objectmanager.py b/daemons/lvmdbusd/objectmanager.py index ed62feb42..c61ce5418 100644 --- a/daemons/lvmdbusd/objectmanager.py +++ b/daemons/lvmdbusd/objectmanager.py @@ -160,7 +160,7 @@ class ObjectManager(AutomatedProperties): # (path, dbus_object.lvm_id)) # We want fast access to the object by a number of different ways, - # so we use multiple hashs with different keys + # so we use multiple hashes with different keys self._lookup_add(dbus_object, path, dbus_object.lvm_id, dbus_object.Uuid) diff --git a/daemons/lvmlockd/lvmlockd-core.c b/daemons/lvmlockd/lvmlockd-core.c index 53ed816d4..733e71821 100644 --- a/daemons/lvmlockd/lvmlockd-core.c +++ b/daemons/lvmlockd/lvmlockd-core.c @@ -78,7 +78,7 @@ static int str_to_mode(const char *str); * . Other misc actions are are passed to the worker_thread: * add_work_action(act). * - * Onec the client_thread has passed the action off to another + * Once the client_thread has passed the action off to another * thread to process, it goes back to waiting for more client * handling work to do. * @@ -1413,7 +1413,7 @@ static int res_lock(struct lockspace *ls, struct resource *r, struct action *act * It can be lost during dlm recovery when the master node * is removed. * - * If we're the next to write the lvb, reinitialze it to the + * If we're the next to write the lvb, reinitialize it to the * new VG seqno, or a new GL counter larger than was seen by * any hosts before (how to estimate that?) * @@ -2798,7 +2798,7 @@ out_rem: * operating under the assumption that they hold the lock. * drop_vg drops all existing locks, but should only * happen when the VG access has been forcibly and - * succesfully terminated. + * successfully terminated. * * For vgremove of a sanlock vg, the vg lock will be held, * and possibly the gl lock if this vg holds the gl. @@ -3042,7 +3042,7 @@ static int add_lockspace_thread(const char *ls_name, ls->start_client_id = act->client_id; /* - * Copy PV list to lockspact structure, so this is + * Copy PV list to lockspace structure, so this is * used for VG locking for idm scheme. */ if (lm_type == LD_LM_IDM && @@ -3287,7 +3287,7 @@ static int add_lockspace(struct action *act) /* * vgchange --lock-stop vgname will lock the vg ex, then send a stop, - * so we exect to find the ex vg lock held here, and will automatically + * so we expect to find the ex vg lock held here, and will automatically * unlock it when stopping. * * Should we attempt to stop the lockspace containing the gl last? @@ -4026,7 +4026,7 @@ static int client_send_result(struct client *cl, struct action *act) * The lockspace could not be found, in which case * the caller may want to know if any lockspaces exist * or if lockspaces exist, but not one with the global lock. - * Given this detail, it may be able to procede without + * Given this detail, it may be able to proceed without * the lock. */ pthread_mutex_lock(&lockspaces_mutex); diff --git a/daemons/lvmlockd/lvmlockd-idm.c b/daemons/lvmlockd/lvmlockd-idm.c index a36780385..fd88838f1 100644 --- a/daemons/lvmlockd/lvmlockd-idm.c +++ b/daemons/lvmlockd/lvmlockd-idm.c @@ -364,7 +364,7 @@ static void lm_idm_update_vb_timestamp(uint64_t *vb_timestamp) /* * It's possible that the multiple nodes have no clock - * synchronization with microsecond prcision and the time + * synchronization with microsecond precision and the time * is going backward. For this case, simply increment the * existing timestamp and write out to drive. */ diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c index 70dc9f8d0..7492dbc90 100644 --- a/daemons/lvmlockd/lvmlockd-sanlock.c +++ b/daemons/lvmlockd/lvmlockd-sanlock.c @@ -106,7 +106,7 @@ which: 1. Uses syslog to explain what is happening. 2. Notifies lvmlockd that the VG is being killed, so lvmlockd can - immediatley return an error for this condition if any new lock + immediately return an error for this condition if any new lock requests are made. (This step would not be strictly necessary.) 3. Attempts to quit using the VG. This is not yet implemented, but @@ -136,7 +136,7 @@ release all the leases for the VG. * from each pid: signals due to a sanlock_request, and * acquire/release/convert/inquire. The later can probably be * addressed with a flag to indicate that the pid field should be - * interpretted as 'ci' (which the caller would need to figure + * interpreted as 'ci' (which the caller would need to figure * out somehow.) */ diff --git a/daemons/lvmpolld/lvmpolld-data-utils.c b/daemons/lvmpolld/lvmpolld-data-utils.c index b5bf0d0e0..5212d14e1 100644 --- a/daemons/lvmpolld/lvmpolld-data-utils.c +++ b/daemons/lvmpolld/lvmpolld-data-utils.c @@ -278,7 +278,7 @@ static void _pdlv_locked_dump(struct buffer *buff, const struct lvmpolld_lv *pdl if (dm_snprintf(tmp, sizeof(tmp), "\t\tinit_requests_count=%d\n", pdlv->init_rq_count) > 0) buffer_append(buff, tmp); - /* lvm_commmand-section { */ + /* lvm_command-section { */ buffer_append(buff, "\t\tlvm_command {\n"); if (cmd_state->retcode == -1 && !cmd_state->signal) buffer_append(buff, "\t\t\tstate=\"" LVMPD_RESP_IN_PROGRESS "\"\n"); @@ -290,7 +290,7 @@ static void _pdlv_locked_dump(struct buffer *buff, const struct lvmpolld_lv *pdl buffer_append(buff, tmp); } buffer_append(buff, "\t\t}\n"); - /* } lvm_commmand-section */ + /* } lvm_command-section */ buffer_append(buff, "\t}\n"); /* } pdlv-section */ diff --git a/daemons/lvmpolld/lvmpolld-data-utils.h b/daemons/lvmpolld/lvmpolld-data-utils.h index dc4a0e600..8437e664b 100644 --- a/daemons/lvmpolld/lvmpolld-data-utils.h +++ b/daemons/lvmpolld/lvmpolld-data-utils.h @@ -68,7 +68,7 @@ struct lvmpolld_lv { struct lvmpolld_cmd_stat cmd_state; unsigned init_rq_count; /* for debugging purposes only */ unsigned polling_finished:1; /* no more updates */ - unsigned error:1; /* unrecoverable error occured in lvmpolld */ + unsigned error:1; /* unrecoverable error occurred in lvmpolld */ }; typedef void (*lvmpolld_parse_output_fn_t) (struct lvmpolld_lv *pdlv, const char *line); diff --git a/daemons/lvmpolld/lvmpolld-protocol.h b/daemons/lvmpolld/lvmpolld-protocol.h index 18c7de85a..9b87593c2 100644 --- a/daemons/lvmpolld/lvmpolld-protocol.h +++ b/daemons/lvmpolld/lvmpolld-protocol.h @@ -45,7 +45,7 @@ #define LVMPD_RESP_OK "OK" #define LVMPD_REAS_RETCODE "retcode" /* lvm cmd ret code */ -#define LVMPD_REAS_SIGNAL "signal" /* lvm cmd terminating singal */ +#define LVMPD_REAS_SIGNAL "signal" /* lvm cmd terminating signal */ #define LVMPD_RET_DUP_FAILED 100 #define LVMPD_RET_EXC_FAILED 101 diff --git a/device_mapper/all.h b/device_mapper/all.h index fb6030419..71e160a34 100644 --- a/device_mapper/all.h +++ b/device_mapper/all.h @@ -304,15 +304,15 @@ int dm_task_add_target(struct dm_task *dmt, #define DM_FORMAT_DEV_BUFSIZE 13 /* Minimum bufsize to handle worst case. */ int dm_format_dev(char *buf, int bufsize, uint32_t dev_major, uint32_t dev_minor); -/* Use this to retrive target information returned from a STATUS call */ +/* Use this to retrieve target information returned from a STATUS call */ void *dm_get_next_target(struct dm_task *dmt, void *next, uint64_t *start, uint64_t *length, char **target_type, char **params); /* - * Following dm_get_status_* functions will allocate approriate status structure + * Following dm_get_status_* functions will allocate appropriate status structure * from passed mempool together with the necessary character arrays. - * Destroying the mempool will release all asociated allocation. + * Destroying the mempool will release all associated allocation. */ /* Parse params from STATUS call for mirror target */ @@ -541,7 +541,7 @@ const char *dm_sysfs_dir(void); /* * Configure default UUID prefix string. - * Conventionally this is a short capitalised prefix indicating the subsystem + * Conventionally this is a short capitalized prefix indicating the subsystem * that is managing the devices, e.g. "LVM-" or "MPATH-". * To support stacks of devices from different subsystems, recursive functions * stop recursing if they reach a device with a different prefix. @@ -584,7 +584,7 @@ int dm_device_has_mounted_fs(uint32_t major, uint32_t minor); /* - * Callback is invoked for individal mountinfo lines, + * Callback is invoked for individual mountinfo lines, * minor, major and mount target are parsed and unmangled. */ typedef int (*dm_mountinfo_line_callback_fn) (char *line, unsigned maj, unsigned min, @@ -698,7 +698,7 @@ void *dm_tree_node_get_context(const struct dm_tree_node *node); /* * Returns 0 when node size and its children is unchanged. * Returns 1 when node or any of its children has increased size. - * Rerurns -1 when node or any of its children has reduced size. + * Returns -1 when node or any of its children has reduced size. */ int dm_tree_node_size_changed(const struct dm_tree_node *dnode); @@ -885,7 +885,7 @@ struct dm_tree_node_raid_params { }; /* - * Version 2 of above node raid params struct to keeep API compatibility. + * Version 2 of above node raid params struct to keep API compatibility. * * Extended for more than 64 legs (max 253 in the MD kernel runtime!), * delta_disks for disk add/remove reshaping, @@ -908,7 +908,7 @@ struct dm_tree_node_raid_params_v2 { * 'rebuilds' and 'writemostly' are bitfields that signify * which devices in the array are to be rebuilt or marked * writemostly. The kernel supports up to 253 legs. - * We limit ourselvs by choosing a lower value + * We limit ourselves by choosing a lower value * for DEFAULT_RAID_MAX_IMAGES. */ uint64_t rebuilds[RAID_BITMAP_SIZE]; @@ -945,7 +945,7 @@ struct dm_config_node; * * policy_settings { * migration_threshold=2048 - * sequention_threashold=100 + * sequential_threshold=100 * ... * } * @@ -1094,7 +1094,7 @@ int dm_tree_node_add_replicator_dev_target(struct dm_tree_node *node, /* End of Replicator API */ /* - * FIXME: Defines bellow are based on kernel's dm-thin.c defines + * FIXME: Defines below are based on kernel's dm-thin.c defines * DATA_DEV_BLOCK_SIZE_MIN_SECTORS (64 * 1024 >> SECTOR_SHIFT) * DATA_DEV_BLOCK_SIZE_MAX_SECTORS (1024 * 1024 * 1024 >> SECTOR_SHIFT) */ @@ -1160,7 +1160,7 @@ int dm_tree_node_set_thin_pool_error_if_no_space(struct dm_tree_node *node, int dm_tree_node_set_thin_pool_read_only(struct dm_tree_node *node, unsigned read_only); /* - * FIXME: Defines bellow are based on kernel's dm-thin.c defines + * FIXME: Defines below are based on kernel's dm-thin.c defines * MAX_DEV_ID ((1 << 24) - 1) */ #define DM_THIN_MAX_DEVICE_ID (UINT32_C((1 << 24) - 1)) @@ -2058,7 +2058,7 @@ void dm_config_destroy(struct dm_config_tree *cft); /* Simple output line by line. */ typedef int (*dm_putline_fn)(const char *line, void *baton); -/* More advaced output with config node reference. */ +/* More advanced output with config node reference. */ typedef int (*dm_config_node_out_fn)(const struct dm_config_node *cn, const char *line, void *baton); /* @@ -2121,7 +2121,7 @@ struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const st * Common formatting flags applicable to all config node types (lower 16 bits). */ #define DM_CONFIG_VALUE_FMT_COMMON_ARRAY 0x00000001 /* value is array */ -#define DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES 0x00000002 /* add spaces in "key = value" pairs in constrast to "key=value" for better readability */ +#define DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES 0x00000002 /* add spaces in "key = value" pairs in contrast to "key=value" for better readability */ /* * Type-related config node formatting flags (higher 16 bits). diff --git a/device_mapper/ioctl/libdm-iface.c b/device_mapper/ioctl/libdm-iface.c index 336749b47..3f8a3e4eb 100644 --- a/device_mapper/ioctl/libdm-iface.c +++ b/device_mapper/ioctl/libdm-iface.c @@ -659,7 +659,7 @@ void *dm_get_next_target(struct dm_task *dmt, void *next, return t->next; } -/* Unmarshall the target info returned from a status call */ +/* Unmarshal the target info returned from a status call */ static int _unmarshal_status(struct dm_task *dmt, struct dm_ioctl *dmi) { char *outbuf = (char *) dmi + dmi->data_start; diff --git a/device_mapper/libdm-common.c b/device_mapper/libdm-common.c index b4a5e013f..e4b82b231 100644 --- a/device_mapper/libdm-common.c +++ b/device_mapper/libdm-common.c @@ -1796,7 +1796,7 @@ static int _mountinfo_parse_line(const char *line, unsigned *maj, unsigned *min, } /* - * Function to operate on individal mountinfo line, + * Function to operate on individual mountinfo line, * minor, major and mount target are parsed and unmangled */ int dm_mountinfo_read(dm_mountinfo_line_callback_fn read_fn, void *cb_data) diff --git a/device_mapper/libdm-deptree.c b/device_mapper/libdm-deptree.c index 46f7abf50..771b21a62 100644 --- a/device_mapper/libdm-deptree.c +++ b/device_mapper/libdm-deptree.c @@ -265,7 +265,7 @@ struct load_properties { /* * Preload tree normally only loads and not resume, but there is * automatic resume when target is extended, as it's believed - * there can be no i/o flying to this 'new' extedend space + * there can be no i/o flying to this 'new' extended space * from any device above. Reason is that preloaded target above * may actually need to see its bigger subdevice before it * gets suspended. As long as devices are simple linears @@ -277,7 +277,7 @@ struct load_properties { /* * When comparing table lines to decide if a reload is - * needed, ignore any differences betwen the lvm device + * needed, ignore any differences between the lvm device * params and the kernel-reported device params. * dm-integrity reports many internal parameters on the * table line when lvm does not explicitly set them, @@ -288,8 +288,8 @@ struct load_properties { /* * Call node_send_messages(), set to 2 if there are messages * When != 0, it validates matching transaction id, thus thin-pools - * where transation_id is passed as 0 are never validated, this - * allows external managment of thin-pool TID. + * where transaction_id is passed as 0 are never validated, this + * allows external management of thin-pool TID. */ unsigned send_messages; /* Skip suspending node's children, used when sending messages to thin-pool */ @@ -1816,7 +1816,7 @@ static int _dm_tree_deactivate_children(struct dm_tree_node *dnode, if (info.open_count) { /* Skip internal non-toplevel opened nodes */ - /* On some old udev systems without corrrect udev rules + /* On some old udev systems without correct udev rules * this hack avoids 'leaking' active _mimageX legs after * deactivation of mirror LV. Other suffixes are not added * since it's expected newer systems with wider range of @@ -2182,7 +2182,7 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, /* * FIXME: Implement delayed error reporting * activation should be stopped only in the case, - * the submission of transation_id message fails, + * the submission of transaction_id message fails, * resume should continue further, just whole command * has to report failure. */ @@ -2274,7 +2274,7 @@ static int _build_dev_string(char *devbuf, size_t bufsize, struct dm_tree_node * return 1; } -/* simplify string emiting code */ +/* simplify string emitting code */ #define EMIT_PARAMS(p, str...)\ do {\ int w;\ @@ -2970,7 +2970,7 @@ static int _vdo_emit_segment_line(struct dm_task *dmt, uint32_t major, uint32_t * If there is already running VDO target, read 'existing' virtual size out of table line * and avoid reading it them from VDO metadata device * - * NOTE: ATM VDO virtual size can be ONLY extended thus it's simple to recongnize 'right' size. + * NOTE: ATM VDO virtual size can be ONLY extended thus it's simple to recognize 'right' size. * However if there would be supported also reduction, this check would need to check range. */ if ((vdo_dmt = dm_task_create(DM_DEVICE_TABLE))) { @@ -3382,7 +3382,7 @@ int dm_tree_preload_children(struct dm_tree_node *dnode, if (!child->info.exists && !(node_created = _create_node(child, dnode))) return_0; - /* Propagate delayed resume from exteded child node */ + /* Propagate delayed resume from extended child node */ if (child->props.delay_resume_if_extended) dnode->props.delay_resume_if_extended = 1; @@ -3818,7 +3818,7 @@ int dm_tree_node_add_raid_target(struct dm_tree_node *node, * - maximum 253 legs in a raid set (MD kernel limitation) * - delta_disks for disk add/remove reshaping * - data_offset for out-of-place reshaping - * - data_copies to cope witth odd numbers of raid10 disks + * - data_copies to cope with odd numbers of raid10 disks */ int dm_tree_node_add_raid_target_with_params_v2(struct dm_tree_node *node, uint64_t size, diff --git a/device_mapper/libdm-report.c b/device_mapper/libdm-report.c index a6a1f77f4..77d181533 100644 --- a/device_mapper/libdm-report.c +++ b/device_mapper/libdm-report.c @@ -459,7 +459,7 @@ static int _report_field_string_list(struct dm_report *rh, * * The very first item in the array of 'struct pos_len' is always * a pair denoting '[list_size,strlen(field->report_string)]'. The - * rest of items denote start and lenght of each item in the list. + * rest of items denote start and length of each item in the list. * * * For example, if we have a list with "abc", "xy", "defgh" @@ -1396,7 +1396,7 @@ struct dm_report *dm_report_init(uint32_t *report_types, } /* - * Return updated types value for further compatility check by caller. + * Return updated types value for further compatibility check by caller. */ _dm_report_init_update_types(rh, report_types); @@ -4025,7 +4025,7 @@ error: return NULL; } -/* AND_EXPRESSION := EX (AND_OP AND_EXPRSSION) */ +/* AND_EXPRESSION := EX (AND_OP AND_EXPRESSION) */ static struct selection_node *_parse_and_ex(struct dm_report *rh, const char *s, const char **next, diff --git a/device_mapper/misc/dm-log-userspace.h b/device_mapper/misc/dm-log-userspace.h index a770ae62e..e66bdd03a 100644 --- a/device_mapper/misc/dm-log-userspace.h +++ b/device_mapper/misc/dm-log-userspace.h @@ -62,7 +62,7 @@ * * The UUID contained in the dm_ulog_request structure is the reference that * will be used by all request types to a specific log. The constructor must - * record this assotiation with the instance created. + * record this association with the instance created. * * When the request has been processed, user-space must return the * dm_ulog_request to the kernel - setting the 'error' field, filling the diff --git a/device_mapper/mm/pool.c b/device_mapper/mm/pool.c index 18df7ca1e..709339768 100644 --- a/device_mapper/mm/pool.c +++ b/device_mapper/mm/pool.c @@ -129,7 +129,7 @@ int dm_pool_locked(struct dm_pool *p) * Bool specifies whether to store the pool crc/hash checksum. * * \return - * 1 (success) when the pool was preperly locked, 0 otherwise. + * 1 (success) when the pool was properly locked, 0 otherwise. */ int dm_pool_lock(struct dm_pool *p, int crc) { diff --git a/device_mapper/vdo/vdo_reader.c b/device_mapper/vdo/vdo_reader.c index 1e7f12aa3..9aab3ec99 100644 --- a/device_mapper/vdo/vdo_reader.c +++ b/device_mapper/vdo/vdo_reader.c @@ -136,7 +136,7 @@ struct vdo_volume_geometry_4 { struct vdo_index_config index_config; } __packed; -/* Decoding mostly only some used stucture members */ +/* Decoding mostly only some used structure members */ static void _vdo_decode_version(struct vdo_version_number *v) { diff --git a/lib/activate/activate.c b/lib/activate/activate.c index 3844992f8..50b8523ed 100644 --- a/lib/activate/activate.c +++ b/lib/activate/activate.c @@ -855,7 +855,7 @@ int lv_info_with_seg_status(struct cmd_context *cmd, /* Merge not yet started, still a snapshot... */ } - /* Hadle fictional lvm2 snapshot and query snapshotX volume */ + /* Handle fictional lvm2 snapshot and query snapshotX volume */ lv_seg = find_snapshot(lv); } @@ -936,7 +936,7 @@ int lv_check_not_in_use(const struct logical_volume *lv, int error_if_used) log_debug_activation("Retrying open_count check for %s.", display_lvname(lv)); if (!lv_info(lv->vg->cmd, lv, 0, &info, 1, 0) || !info.exists) { - stack; /* device dissappeared? */ + stack; /* device disappeared? */ return 1; } else if (!info.open_count) return 1; @@ -1006,7 +1006,7 @@ int lv_mirror_percent(struct cmd_context *cmd, const struct logical_volume *lv, int r; struct dev_manager *dm; - /* If mirrored LV is temporarily shrinked to 1 area (= linear), + /* If mirrored LV is temporarily shrunk to 1 area (= linear), * it should be considered in-sync. */ if (dm_list_size(&lv->segments) == 1 && first_seg(lv)->area_count == 1) { *percent = DM_PERCENT_100; @@ -2235,7 +2235,7 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s, (pvmove_lv = find_pvmove_lv_in_lv(lv_pre))) { /* * When starting PVMOVE, suspend participating LVs first - * with committed metadata by looking at precommited pvmove list. + * with committed metadata by looking at precommitted pvmove list. * In committed metadata these LVs are not connected in any way. * * TODO: prepare list of LVs needed to be suspended and pass them @@ -2264,7 +2264,7 @@ static int _lv_suspend(struct cmd_context *cmd, const char *lvid_s, log_error("lv_list alloc failed."); goto out; } - /* Look for precommitted LV name in commmitted VG */ + /* Look for precommitted LV name in committed VG */ if (!(lvl->lv = find_lv(lv->vg, lv_tmp->name))) { log_error(INTERNAL_ERROR "LV %s missing from preload metadata.", display_lvname(lv_tmp)); @@ -2524,7 +2524,7 @@ int lv_deactivate(struct cmd_context *cmd, const char *lvid_s, const struct logi /* * Remove any transiently activated error - * devices which arean't used any more. + * devices which aren't used any more. */ if (r && lv_is_raid(lv) && !lv_deactivate_any_missing_subdevs(lv)) { log_error("Failed to remove temporary SubLVs from %s", @@ -2771,7 +2771,7 @@ static int _lv_remove_any_missing_subdevs(struct logical_volume *lv) return 1; } -/* Remove any "*-missing_*" sub devices added by the activation layer for an rmate/rimage missing PV mapping */ +/* Remove any "*-missing_*" sub devices added by the activation layer for an rmeta/rimage missing PV mapping */ int lv_deactivate_any_missing_subdevs(const struct logical_volume *lv) { uint32_t s; @@ -2849,7 +2849,7 @@ static int _component_cb(struct logical_volume *lv, void *data) * Finds out for any LV if any of its component LVs are active. * Function first checks if an existing LV is visible and active eventually * it's lock holding LV is already active. In such case sub LV cannot be - * actived alone and no further checking is needed. + * activated alone and no further checking is needed. * * Returns active component LV if there is such. */ @@ -2912,7 +2912,7 @@ static int _deactivate_sub_lv_cb(struct logical_volume *lv, void *data) } /* - * Deactivates LV toghether with explicit deactivation call made also for all its component LVs. + * Deactivates LV together with explicit deactivation call made also for all its component LVs. */ int deactivate_lv_with_sub_lv(const struct logical_volume *lv) { diff --git a/lib/activate/dev_manager.c b/lib/activate/dev_manager.c index da4af3697..c9dd59b67 100644 --- a/lib/activate/dev_manager.c +++ b/lib/activate/dev_manager.c @@ -840,7 +840,7 @@ int dm_device_is_usable(struct cmd_context *cmd, struct device *dev, struct dev_ * * This is a quick check for now, but replace it with more * robust and better check that would check the stack - * correctly, not just snapshots but any cobimnation possible + * correctly, not just snapshots but any combination possible * in a stack - use proper dm tree to check this instead. */ if (check.check_suspended && @@ -2340,7 +2340,7 @@ static int _add_new_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, * Check for device holders (ATM used only for removed pvmove targets) * and add them into dtree structures. * When 'laopts != NULL' add them as new nodes - which also corrects READ_AHEAD. - * Note: correct table are already explicitelly PRELOADED. + * Note: correct table are already explicitly PRELOADED. */ static int _check_holder(struct dev_manager *dm, struct dm_tree *dtree, const struct logical_volume *lv, @@ -2887,7 +2887,7 @@ static int _add_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, .send_messages = 1 /* Node with messages */ }; /* - * Add some messsages if right node exist in the table only + * Add some messages if right node exist in the table only * when building SUSPEND tree for origin-only thin-pool. * * TODO: Fix call of '_add_target_to_dtree()' to add message @@ -3613,7 +3613,7 @@ static int _add_new_lv_to_dtree(struct dev_manager *dm, struct dm_tree *dtree, * so just use the tree's existing nodes' info */ if ((dinfo = _cached_dm_info(dm->mem, dtree, lv, NULL))) { - /* Merging origin LV is present, check if mergins is already running. */ + /* Merging origin LV is present, check if merging is already running. */ if ((seg_is_thin_volume(seg) && _lv_has_thin_device_id(dm->mem, lv, NULL, seg->device_id)) || (!seg_is_thin_volume(seg) && lv_has_target_type(dm->mem, lv, NULL, TARGET_NAME_SNAPSHOT_MERGE))) { log_debug_activation("Merging of snapshot volume %s to origin %s is in progress.", diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index b96ccd58a..39ab368b1 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -1462,7 +1462,7 @@ void lvmcache_extra_md_component_checks(struct cmd_context *cmd) * not careful to do it only when there's a good reason to believe a * dev is an md component. * - * If the pv/dev size mismatches are commonly occuring for + * If the pv/dev size mismatches are commonly occurring for * non-md-components then we'll want to stop using that as a trigger * for the full md check. */ @@ -1547,7 +1547,7 @@ void lvmcache_extra_md_component_checks(struct cmd_context *cmd) * incorrectly placed PVs should have been moved from the orphan vginfo * onto their correct vginfo's, and the orphan vginfo should (in theory) * represent only real orphan PVs. (Note: if lvmcache_label_scan is run - * after vg_read udpates to lvmcache state, then the lvmcache will be + * after vg_read updates to lvmcache state, then the lvmcache will be * incorrect again, so do not run lvmcache_label_scan during the * processing phase.) * @@ -2243,7 +2243,7 @@ int lvmcache_update_vgname_and_id(struct cmd_context *cmd, struct lvmcache_info if (!_lvmcache_update_vgstatus(info, vgsummary->vgstatus, vgsummary->creation_host, vgsummary->lock_type, vgsummary->system_id)) { /* - * This shouldn't happen, it's an internal errror, and we can leave + * This shouldn't happen, it's an internal error, and we can leave * the info in place without saving the summary values in vginfo. */ log_error("Failed to update VG %s info in lvmcache.", vgname); diff --git a/lib/cache_segtype/cache.c b/lib/cache_segtype/cache.c index ef4351031..027d5cda1 100644 --- a/lib/cache_segtype/cache.c +++ b/lib/cache_segtype/cache.c @@ -82,7 +82,7 @@ static void _cache_display(const struct lv_segment *seg) /* * When older metadata are loaded without newer settings, * set then to default settings (the one that could have been - * used implicitely at that time). + * used implicitly at that time). * * Needs both segments cache and cache_pool to be loaded. */ @@ -144,8 +144,8 @@ static int _settings_text_import(struct lv_segment *seg, * Read in policy args: * policy_settings { * migration_threshold=2048 - * sequention_threashold=100 - * random_threashold=200 + * sequential_threshold=100 + * random_threshold=200 * read_promote_adjustment=10 * write_promote_adjustment=20 * discard_promote_adjustment=40 @@ -706,7 +706,7 @@ static int _cache_add_target_line(struct dev_manager *dm, } }; - /* Check if cache settings are acceptable to knownm policies */ + /* Check if cache settings are acceptable to known policies */ for (i = 0; i < DM_ARRAY_SIZE(_accepted); i++) { if (strcasecmp(cache_pool_seg->policy_name, _accepted[i].name)) continue; diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index f3ac3dbf5..60739af8f 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -1228,7 +1228,7 @@ static struct dev_filter *_init_filter_chain(struct cmd_context *cmd) * sysfs filter. Only available on 2.6 kernels. Non-critical. * Eliminates unavailable devices. * TODO: this may be unnecessary now with device ids - * (currently not used for devs match to device id using syfs) + * (currently not used for devs match to device id using sysfs) */ if (find_config_tree_bool(cmd, devices_sysfs_scan_CFG, NULL)) { if ((filters[nr_filt] = sysfs_filter_create(dm_sysfs_dir()))) @@ -1312,7 +1312,7 @@ int init_filters(struct cmd_context *cmd, unsigned load_persistent_cache) init_ignore_lvm_mirrors(find_config_tree_bool(cmd, devices_ignore_lvm_mirrors_CFG, NULL)); /* - * persisent filter is a cache of the previous result real filter result. + * persistent filter is a cache of the previous result real filter result. * If a dev is found in persistent filter, the pass/fail result saved by * the pfilter is used. If a dev does not existing in the persistent * filter, the dev is passed on to the real filter, and when the result diff --git a/lib/config/config.c b/lib/config/config.c index d7fa7d910..1b45a8214 100644 --- a/lib/config/config.c +++ b/lib/config/config.c @@ -507,7 +507,7 @@ int config_file_read_fd(struct dm_config_tree *cft, struct device *dev, dev_io_r use_plain_read = 0; /* Ensure there is extra '\0' after end of buffer since we pass - * buffer to funtions like strtoll() */ + * buffer to functions like strtoll() */ if (!(buf = zalloc(size + size2 + 1))) { log_error("Failed to allocate circular buffer."); return 0; diff --git a/lib/config/config.h b/lib/config/config.h index 6a30c6e9f..ade89dbaa 100644 --- a/lib/config/config.h +++ b/lib/config/config.h @@ -112,7 +112,7 @@ typedef union { * and whether it can be attached to VG/LV metadata at the same time * The CFG_PROFILABLE_METADATA flag incorporates CFG_PROFILABLE flag!!! */ #define CFG_PROFILABLE_METADATA 0x0030 -/* whether the default value is undefned */ +/* whether the default value is undefined */ #define CFG_DEFAULT_UNDEFINED 0x0040 /* whether the default value is commented out on output */ #define CFG_DEFAULT_COMMENTED 0x0080 @@ -218,7 +218,7 @@ struct cft_check_handle { unsigned skip_if_checked:1; /* skip the check if already done before - return last state */ unsigned suppress_messages:1; /* suppress messages during the check if config item is found invalid */ unsigned check_diff:1; /* check if the value used differs from default one */ - unsigned ignoreadvanced:1; /* do not include advnced configs */ + unsigned ignoreadvanced:1; /* do not include advanced configs */ unsigned ignoreunsupported:1; /* do not include unsupported configs */ uint16_t disallowed_flags; /* set of disallowed flags */ uint8_t status[CFG_COUNT]; /* flags for each configuration item - the result of the check */ diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h index 691bbfe83..297daebc2 100644 --- a/lib/config/config_settings.h +++ b/lib/config/config_settings.h @@ -47,7 +47,7 @@ * * flags: Configuration item flags: * CFG_NAME_VARIABLE - configuration node name is variable - * CFG_ALLOW_EMPTY - node value can be emtpy + * CFG_ALLOW_EMPTY - node value can be empty * CFG_ADVANCED - this node belongs to advanced config set * CFG_UNSUPPORTED - this node is not officially supported and it's used primarily by developers * CFG_PROFILABLE - this node is customizable by a profile @@ -59,7 +59,7 @@ * CFG_SECTION_NO_CHECK - do not check content of the section at all - use with care!!! * CFG_DISALLOW_INTERACTIVE - disallow configuration node for use in interactive environment (e.g. cmds run in lvm shell) * - * type: Allowed type for the value of simple configuation setting, one of: + * type: Allowed type for the value of simple configuration setting, one of: * CFG_TYPE_BOOL * CFG_TYPE_INT * CFG_TYPE_FLOAT diff --git a/lib/config/defaults.h b/lib/config/defaults.h index efe36d1fa..5407282d3 100644 --- a/lib/config/defaults.h +++ b/lib/config/defaults.h @@ -183,7 +183,7 @@ #define DEFAULT_VDO_FORMAT_OPTIONS_CONFIG "#S" "" /* - * VDO pool will reverve some sectors in the front and the back of pool device to avoid + * VDO pool will reserve some sectors in the front and the back of pool device to avoid * seeing same device twice in the system. */ #define DEFAULT_VDO_POOL_HEADER_SIZE_KB (512) diff --git a/lib/device/bcache.c b/lib/device/bcache.c index a458958e1..c61f7a5d5 100644 --- a/lib/device/bcache.c +++ b/lib/device/bcache.c @@ -666,7 +666,7 @@ struct bcache { struct block *raw_blocks; /* - * Lists that categorise the blocks. + * Lists that categorize the blocks. */ unsigned nr_locked; unsigned nr_dirty; @@ -1502,7 +1502,7 @@ int bcache_set_fd(int fd) } /* - * Should we check for unflushed or inprogress io on an fd + * Should we check for unflushed or in-progress io on an fd * prior to doing clear_fd or change_fd? (To catch mistakes; * the caller should be smart enough to not do that.) */ diff --git a/lib/device/bcache.h b/lib/device/bcache.h index f437c45e1..219f07c77 100644 --- a/lib/device/bcache.h +++ b/lib/device/bcache.h @@ -148,7 +148,7 @@ void bcache_abort_di(struct bcache *cache, int di); //---------------------------------------------------------------- // The next four functions are utilities written in terms of the above api. -// Prefetches the blocks neccessary to satisfy a byte range. +// Prefetches the blocks necessary to satisfy a byte range. void bcache_prefetch_bytes(struct bcache *cache, int di, uint64_t start, size_t len); // Reads, writes and zeroes bytes. Returns false if errors occur. diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 4e4723449..bd1c1b4d5 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -836,7 +836,7 @@ static size_t _collapse_slashes(char *str) static int _insert_dir(const char *dir) { - /* alphanetically! sorted list used by bsearch of + /* alphabetically! sorted list used by bsearch of * /dev subdirectories that should not contain * any block device, so no reason to scan them. */ static const char _no_scan[][12] = { diff --git a/lib/device/dev-dasd.c b/lib/device/dev-dasd.c index 0448e1f78..e51425645 100644 --- a/lib/device/dev-dasd.c +++ b/lib/device/dev-dasd.c @@ -36,7 +36,7 @@ /* * struct dasd_information2_t * represents any data about the device, which is visible to userspace. - * including foramt and featueres. + * including format and features. */ typedef struct dasd_information2_t { unsigned int devno; /* S/390 devno */ diff --git a/lib/device/dev-ext-udev-constants.h b/lib/device/dev-ext-udev-constants.h index 168f8f1e8..9245e3b9e 100644 --- a/lib/device/dev-ext-udev-constants.h +++ b/lib/device/dev-ext-udev-constants.h @@ -13,7 +13,7 @@ */ /************************************************************************* - * Properties saved in udev db and accesible via libudev and used by LVM * + * Properties saved in udev db and accessible via libudev and used by LVM * *************************************************************************/ /* diff --git a/lib/device/dev-mpath.c b/lib/device/dev-mpath.c index e13c0bf21..72501e345 100644 --- a/lib/device/dev-mpath.c +++ b/lib/device/dev-mpath.c @@ -234,9 +234,9 @@ static void _read_wwid_file(const char *config_wwids_file, int *entries) /* * the initial character is the id type, * 1 is t10, 2 is eui, 3 is naa, 8 is scsi name. - * wwids are stored in the hash table without the type charater. + * wwids are stored in the hash table without the type character. * It seems that sometimes multipath does not include - * the type charater (seen with t10 scsi_debug devs). + * the type character (seen with t10 scsi_debug devs). */ typestr[0] = *wwid; if (typestr[0] == '1' || typestr[0] == '2' || typestr[0] == '3') diff --git a/lib/device/device_id.c b/lib/device/device_id.c index b3330f2ba..544e7bc19 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -2036,7 +2036,7 @@ id_done: * use_devices list will be used to update the devices file. * * The dev being added can potentially overlap existing entries - * in various ways. If one of the existing entries is truely for + * in various ways. If one of the existing entries is truly for * this device being added, then we want to update that entry. * If some other existing entries are not for the same device, but * have some overlapping values, then we want to try to update @@ -2098,7 +2098,7 @@ id_done: /* * If one of the existing entries (du_dev, du_pvid, du_devid, du_devname) - * is truely for the same device that is being added, then set update_du to + * is truly for the same device that is being added, then set update_du to * that existing entry to be updated. */ @@ -3925,7 +3925,7 @@ void device_ids_search(struct cmd_context *cmd, struct dm_list *new_devs, } /* - * The use_devices entries (repesenting the devices file) are + * The use_devices entries (representing the devices file) are * updated for the new devices on which the PVs reside. The new * correct devs are set as dil->dev on search_pvids entries. * diff --git a/lib/device/online.c b/lib/device/online.c index 863834373..77a8a63b9 100644 --- a/lib/device/online.c +++ b/lib/device/online.c @@ -331,7 +331,7 @@ check_duplicate: * duplicate PV. * * FIXME: disable autoactivation of the VG somehow? - * The VG may or may not already be activated when a dupicate appears. + * The VG may or may not already be activated when a duplicate appears. * Perhaps write a new field in the pv online or vg online file? */ diff --git a/lib/display/display.c b/lib/display/display.c index 56a0e85b7..b79c77227 100644 --- a/lib/display/display.c +++ b/lib/display/display.c @@ -32,7 +32,7 @@ static const struct { { ALLOC_CONTIGUOUS, "contiguous", 'c'}, { ALLOC_CLING, "cling", 'l'}, { - ALLOC_CLING_BY_TAGS, "cling_by_tags", 't'}, { /* Only used in log mesgs */ + ALLOC_CLING_BY_TAGS, "cling_by_tags", 't'}, { /* Only used in log messages */ ALLOC_NORMAL, "normal", 'n'}, { ALLOC_ANYWHERE, "anywhere", 'a'}, { ALLOC_INHERIT, "inherit", 'i'} @@ -383,7 +383,7 @@ static int _lvdisplay_historical_full(struct cmd_context *cmd, log_print("--- Historical Logical volume ---"); if (lvm1compat) - /* /dev/vgname/lvname doen't actually exist for historical devices */ + /* /dev/vgname/lvname doesn't actually exist for historical devices */ log_print("LV Name %s%s/%s", hlv->vg->cmd->dev_dir, hlv->vg->name, hlv->name); else @@ -439,7 +439,7 @@ int lvdisplay_full(struct cmd_context *cmd, lvm1compat = find_config_tree_bool(cmd, global_lvdisplay_shows_full_device_path_CFG, NULL); if (lvm1compat) - /* /dev/vgname/lvname doen't actually exist for internal devices */ + /* /dev/vgname/lvname doesn't actually exist for internal devices */ log_print("LV Name %s%s/%s", lv->vg->cmd->dev_dir, lv->vg->name, lv->name); else if (lv_is_visible(lv)) { diff --git a/lib/filters/filter-md.c b/lib/filters/filter-md.c index 84bfcadb0..077502d87 100644 --- a/lib/filters/filter-md.c +++ b/lib/filters/filter-md.c @@ -36,7 +36,7 @@ * which can trigger duplicate detection, and/or cause lvm to display * md components as PVs rather than ignoring them. * - * If scanning md componenents causes duplicates to be seen, then + * If scanning md components causes duplicates to be seen, then * the lvm duplicate resolution will exclude the components. * * The lvm md filter has three modes: @@ -92,7 +92,7 @@ static int _passes_md_filter(struct cmd_context *cmd, struct dev_filter *f __att dev->filtered_flags &= ~DEV_FILTERED_MD_COMPONENT; /* - * When md_component_dectection=0, don't even try to skip md + * When md_component_detection=0, don't even try to skip md * components. */ if (!md_filtering()) diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c index c1b178bc3..5536a6d3b 100644 --- a/lib/filters/filter-mpath.c +++ b/lib/filters/filter-mpath.c @@ -34,7 +34,7 @@ static int _ignore_mpath_component(struct cmd_context *cmd, struct dev_filter *f dev->filtered_flags |= DEV_FILTERED_MPATH_COMPONENT; /* - * Warn about misconfig where an mpath component is + * Warn about misconfigure where an mpath component is * in the devices file, but its mpath device is not. */ if ((dev->flags & DEV_MATCHED_USE_ID) && mpath_devno) { diff --git a/lib/format_text/export.c b/lib/format_text/export.c index f417bcbdc..983cc7338 100644 --- a/lib/format_text/export.c +++ b/lib/format_text/export.c @@ -245,13 +245,13 @@ static int _sectors_to_units(uint64_t sectors, char *buffer, size_t s) return dm_snprintf(buffer, s, "# %g %s", d, _units[i]) > 0; } -/* increment indention level */ +/* increment indentation level */ void out_inc_indent(struct formatter *f) { _inc_indent(f); } -/* decrement indention level */ +/* decrement indentation level */ void out_dec_indent(struct formatter *f) { _dec_indent(f); diff --git a/lib/format_text/flags.c b/lib/format_text/flags.c index 29d88ddd3..d835f04dc 100644 --- a/lib/format_text/flags.c +++ b/lib/format_text/flags.c @@ -242,7 +242,7 @@ int read_flags(uint64_t *status, enum pv_vg_lv_e type, int mask, const struct dm * All UNKNOWN flags will again cause the "UNKNOWN" segtype. * * Note: using these segtype status flags instead of actual - * status flags ensures wanted incompatiblity. + * status flags ensures wanted incompatibility. */ int read_segtype_lvflags(uint64_t *status, char *segtype_str) { diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index 8ddafcff7..d2c99f6bb 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -642,7 +642,7 @@ static int _vg_write_raw(struct format_instance *fid, struct volume_group *vg, fidtc->write_buf_size = write_buf_size; fidtc->new_metadata_size = new_size; - /* Immediatelly reuse existing buffer for parsing metadata back. + /* Immediately reuse existing buffer for parsing metadata back. * Such VG is then used for as precommitted VG and later committed VG. * * 'Lazy' creation of such VG might improve performance, but we diff --git a/lib/format_text/import_vsn1.c b/lib/format_text/import_vsn1.c index c03ace175..94dabf453 100644 --- a/lib/format_text/import_vsn1.c +++ b/lib/format_text/import_vsn1.c @@ -1071,7 +1071,7 @@ static struct volume_group *_read_vg(struct cmd_context *cmd, mem = vg->vgmem; /* - * The pv hash memorises the pv section names -> pv + * The pv hash memorizes the pv section names -> pv * structures. */ if (!(pv_hash = dm_hash_create(59))) { @@ -1080,7 +1080,7 @@ static struct volume_group *_read_vg(struct cmd_context *cmd, } /* - * The lv hash memorises the lv section names -> lv + * The lv hash memorizes the lv section names -> lv * structures. */ if (!(lv_hash = dm_hash_create(1023))) { diff --git a/lib/format_text/layout.h b/lib/format_text/layout.h index d3b4e6119..2ef35b3af 100644 --- a/lib/format_text/layout.h +++ b/lib/format_text/layout.h @@ -92,7 +92,7 @@ struct mda_lists { struct mda_context { struct device_area area; uint64_t free_sectors; - struct raw_locn rlocn; /* Store inbetween write and commit */ + struct raw_locn rlocn; /* Store in-between write and commit */ }; /* FIXME Convert this at runtime */ diff --git a/lib/label/hints.c b/lib/label/hints.c index 6310722ce..68842fe3c 100644 --- a/lib/label/hints.c +++ b/lib/label/hints.c @@ -1455,7 +1455,7 @@ int get_hints(struct cmd_context *cmd, struct dm_list *hints_out, int *newhints, /* * This is not related to hints, and is probably unnecessary, * but it could possibly help. When hints become invalid it's - * usually becaues devs on the system have changed, and that + * usually because devs on the system have changed, and that * also means that a missing devices file entry might be found * by searching devices again. (the searched_devnames * mechanism should eventually be replaced) diff --git a/lib/label/label.c b/lib/label/label.c index b680a22a3..91243494b 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -1403,9 +1403,9 @@ int label_scan(struct cmd_context *cmd) * * If there was an error during scan, we could recreate bcache here * with a larger size and then restart label_scan. But, this does not - * address the problem of writing new metadata that excedes the bcache + * address the problem of writing new metadata that exceeds the bcache * size and failing, which would often be hit first, i.e. we'll fail - * to write new metadata exceding the max size before we have a chance + * to write new metadata exceeding the max size before we have a chance * to read any metadata with that size, unless we find an existing vg * that has been previously created with the larger size. * diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c index 66bb6dcbd..917aef518 100644 --- a/lib/locking/lvmlockd.c +++ b/lib/locking/lvmlockd.c @@ -1563,7 +1563,7 @@ int lockd_start_wait(struct cmd_context *cmd) * 4. dlm: * If the lock_type from vgcreate is dlm, lvmlockd creates the * dlm global lockspace, and queues the global lock request - * for vgcreate. lockd_gl_create returns sucess with the gl held. + * for vgcreate. lockd_gl_create returns success with the gl held. * * sanlock: * If the lock_type from vgcreate is sanlock, lvmlockd returns -ENOLS @@ -1647,7 +1647,7 @@ int lockd_global_create(struct cmd_context *cmd, const char *def_mode, const cha return 1; /* - * This is the sanlock bootstrap condition for proceding + * This is the sanlock bootstrap condition for proceeding * without the global lock: a chicken/egg case for the first * sanlock VG that is created. When creating the first * sanlock VG, there is no global lock to acquire because @@ -2793,7 +2793,7 @@ static int _lockd_lv_vdo(struct cmd_context *cmd, struct logical_volume *lv, * acquired on the thin pool LV, and a thin LV does not have a lock * of its own. A cache pool LV does not have a lock of its own. * When the cache pool LV is linked to an origin LV, the lock of - * the orgin LV protects the combined origin + cache pool. + * the origin LV protects the combined origin + cache pool. */ int lockd_lv(struct cmd_context *cmd, struct logical_volume *lv, @@ -2950,7 +2950,7 @@ int lockd_lv_resize(struct cmd_context *cmd, struct logical_volume *lv, * the LV on remote nodes through dlm/corosync at the end * of the command. * - * If lockd_lv sucessfully acquired the LV lock ex (did not + * If lockd_lv successfully acquired the LV lock ex (did not * need to make use of SH_EXISTS_OK), then we know the LV * is active here only (or not active anywhere) and we * don't need to do any remote refresh. diff --git a/lib/log/log.c b/lib/log/log.c index eafb3ef1c..e4734737a 100644 --- a/lib/log/log.c +++ b/lib/log/log.c @@ -313,7 +313,7 @@ no_epoch: } /* - * Unlink the log file depeding on command's return value + * Unlink the log file depending on command's return value * * When envvar LVM_EXPECTED_EXIT_STATUS is set, compare * resulting status with this string. @@ -880,12 +880,12 @@ void log_set_report_object_name_and_id(const char *name, const char *id) * For this we need to be able to clearly identify when a command is * being run by dmeventd/lvmpolld/lvmdbusd. * - * TODO: log/journal_commmand_names=["lvcreate","lvconvert"] + * TODO: log/journal_command_names=["lvcreate","lvconvert"] * This would restrict log/journal=["command"] to the listed command names. * Also allow "!command" to exclude a command, e.g. ["!pvs"] * * TODO: log/journal_daemon_command_names=["lvcreate","lvconvert"] - * This would restrict log/journal=["dameon_command"] to the listed command names. + * This would restrict log/journal=["daemon_command"] to the listed command names. * * TODO: log/journal_daemon_names=["dmeventd"] * This would restrict log/journal=["daemon_command"] to commands run by diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c index c70f0fedd..451e94b68 100644 --- a/lib/metadata/cache_manip.c +++ b/lib/metadata/cache_manip.c @@ -223,7 +223,7 @@ int update_cache_pool_params(struct cmd_context *cmd, if (*chunk_size < min_chunk_size) { /* * When using more then 'standard' default, - * keep user informed he might be using things in untintended direction + * keep user informed he might be using things in unintended direction */ log_print_unless_silent("Using %s chunk size instead of default %s, " "so cache pool has less than " FMTu64 " chunks.", @@ -572,7 +572,7 @@ int lv_cache_remove(struct logical_volume *cache_lv) goto remove; /* Already dropped */ } - /* Localy active volume is needed for writeback */ + /* Locally active volume is needed for writeback */ if (!lv_info(cache_lv->vg->cmd, cache_lv, 1, NULL, 0, 0)) { /* Give up any remote locks */ if (!deactivate_lv_with_sub_lv(cache_lv)) @@ -593,7 +593,7 @@ int lv_cache_remove(struct logical_volume *cache_lv) return_0; return 1; default: - /* Otherwise localy activate volume to sync dirty blocks */ + /* Otherwise locally activate volume to sync dirty blocks */ cache_lv->status |= LV_TEMPORARY; if (!activate_lv(cache_lv->vg->cmd, cache_lv) || !lv_is_active(cache_lv)) { @@ -692,7 +692,7 @@ remove: if (!lv_remove(cache_lv)) /* Will use LV_PENDING_DELETE */ return_0; - /* CachePool or CacheVol is left inactivate for further manipulation */ + /* CachePool or CacheVol is left inactive for further manipulation */ return 1; } @@ -923,7 +923,7 @@ int cache_set_metadata_format(struct lv_segment *seg, cache_metadata_format_t fo } /* See what is a 'best' available cache metadata format - * when the specifed format is other then always existing CMFormat 1 */ + * when the specified format is other then always existing CMFormat 1 */ if (format != CACHE_METADATA_FORMAT_1) { best = _get_default_cache_metadata_format(seg->lv->vg->cmd); diff --git a/lib/metadata/lv.c b/lib/metadata/lv.c index 04264316b..36301b9a3 100644 --- a/lib/metadata/lv.c +++ b/lib/metadata/lv.c @@ -383,7 +383,7 @@ dm_percent_t lvseg_percent_with_info_and_seg_status(const struct lv_with_info_an * TODO: * Later move to segment methods, instead of using single place. * Also handle logic for mirror segments and it total_* summing - * Esentially rework _target_percent API for segtype. + * Essentially rework _target_percent API for segtype. */ switch (s->type) { case SEG_STATUS_INTEGRITY: @@ -1495,7 +1495,7 @@ char *lv_attr_dup_with_info_and_seg_status(struct dm_pool *mem, const struct lv_ repstr[8] = 'm'; /* RAID has 'm'ismatches */ else if (lv_raid_sync_action(lv, &sync_action) && !strcmp(sync_action, "reshape")) - repstr[8] = 's'; /* LV is re(s)haping */ + repstr[8] = 's'; /* LV is re's'haping */ else if (_sublvs_remove_after_reshape(lv)) repstr[8] = 'R'; /* sub-LV got freed from raid set by reshaping and has to be 'R'emoved */ @@ -1708,7 +1708,7 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv) if (lv_is_thin_pool(lv) || lv_is_external_origin(lv)) { - /* FIXME: Ensure cluster keeps thin-pool active exlusively. + /* FIXME: Ensure cluster keeps thin-pool active exclusively. * External origin can be activated on more nodes (depends on type). */ if (!lv_is_active(lv)) @@ -1722,7 +1722,7 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv) return lv; } - /* RAID changes visibility of splitted LVs but references them still as leg/meta */ + /* RAID changes visibility of split LVs but references them still as leg/meta */ if ((lv_is_raid_image(lv) || lv_is_raid_metadata(lv)) && lv_is_visible(lv)) return lv; @@ -1735,7 +1735,7 @@ const struct logical_volume *lv_lock_holder(const struct logical_volume *lv) if (lv_is_thin_volume(lv) && lv_is_thin_volume(sl->seg->lv) && first_seg(lv)->pool_lv == sl->seg->pool_lv) - continue; /* Skip thin snaphost */ + continue; /* Skip thin snapshot */ if (lv_is_pending_delete(sl->seg->lv)) continue; /* Skip deleted LVs */ if (lv_is_cache_pool(sl->seg->lv) && diff --git a/lib/metadata/lv_manip.c b/lib/metadata/lv_manip.c index c7d8afbea..5c78188fe 100644 --- a/lib/metadata/lv_manip.c +++ b/lib/metadata/lv_manip.c @@ -1450,7 +1450,7 @@ static struct logical_volume *_get_resizable_layer_lv(struct logical_volume *lv) /* Check if LV is component of resizable LV. * When resize changes size of LV this also changes the size whole stack upward. - * Support syntax suggar - so user can pick any LV in stack for resize. */ + * Support syntax sugar - so user can pick any LV in stack for resize. */ static int _is_layered_lv(struct logical_volume *lv) { return (lv_is_cache_origin(lv) || @@ -1736,7 +1736,7 @@ int lv_refresh_suspend_resume(const struct logical_volume *lv) /* * Remove any transiently activated error - * devices which arean't used any more. + * devices which aren't used any more. */ if (lv_is_raid(lv) && !lv_deactivate_any_missing_subdevs(lv)) { log_error("Failed to remove temporary SubLVs from %s", display_lvname(lv)); @@ -3059,7 +3059,7 @@ static int _find_some_parallel_space(struct alloc_handle *ah, goto next_pv; /* FIXME Split into log and non-log parallel_pvs and only check the log ones if log_iteration? */ - /* (I've temporatily disabled the check.) */ + /* (I've temporarily disabled the check.) */ /* Avoid PVs used by existing parallel areas */ if (!log_iteration_count && parallel_pvs && _pv_is_parallel(pvm->pv, parallel_pvs, ah->cling_tag_list_cn)) goto next_pv; @@ -4111,7 +4111,7 @@ int lv_add_mirror_lvs(struct logical_volume *lv, * FIXME: Mirrored logs are built inefficiently. * A mirrored log currently uses the same layout that a mirror * LV uses. The mirror layer sits on top of AREA_LVs which form the - * legs, rather on AREA_PVs. This is done to allow re-use of the + * legs, rather on AREA_PVs. This is done to allow reuse of the * various mirror functions to also handle the mirrored LV that makes * up the log. * @@ -5062,7 +5062,7 @@ static uint32_t _adjust_amount(dm_percent_t percent, int policy_threshold, int p percent <= (policy_threshold * DM_PERCENT_1)) return 0; /* nothing to do */ /* - * Evaluate the minimal amount needed to get bellow threshold. + * Evaluate the minimal amount needed to get below threshold. * Keep using DM_PERCENT_1 units for better precision. * Round-up to needed percentage value */ @@ -5292,7 +5292,7 @@ static int _lvresize_extents_from_percent(const struct logical_volume *lv, lp->extents = percent_of_extents(lp->extents, pv_extent_count, (lp->sign != SIGN_MINUS)); } else if (lp->percent_value) { - /* lvresize has PVs args and no size of exents options */ + /* lvresize has PVs args and no size of extents options */ old_extents = lp->percent_value; lp->extents = percent_of_extents(lp->percent_value, pv_extent_count, (lp->sign != SIGN_MINUS)); @@ -6034,7 +6034,7 @@ static int _lv_resize_check_used(struct logical_volume *lv) * fs or lv if the fs resize would require mounting or unmounting. * * --fs resize --fsmode offline: resize the fs only while it's unmounted - * unmounting the fs if needed. fail the commandn without + * unmounting the fs if needed. fail the command without * reducing the fs or lv if the fs resize would require having * the fs mounted. * @@ -7753,7 +7753,7 @@ int lv_remove_single(struct cmd_context *cmd, struct logical_volume *lv, return_0; /* Release unneeded blocks in thin pool */ - /* TODO: defer when multiple LVs relased at once */ + /* TODO: defer when multiple LVs released at once */ if (pool_lv && !update_thin_pool_lv(pool_lv, 1)) { if (force < DONT_PROMPT_OVERRIDE) { log_error("Failed to update thin pool %s.", display_lvname(pool_lv)); @@ -7991,7 +7991,7 @@ static int _lv_update_and_reload(struct logical_volume *lv, int origin_only) display_lvname(lock_lv)); return 0; } else if (!(r = vg_commit(vg))) - stack; /* !vg_commit() has implict vg_revert() */ + stack; /* !vg_commit() has implicit vg_revert() */ log_very_verbose("Updating logical volume %s in kernel.", display_lvname(lock_lv)); @@ -8069,7 +8069,7 @@ static int _split_parent_area(struct lv_segment *seg, uint32_t s, } /* - * Split the parent LV segments if the layer LV below it is splitted. + * Split the parent LV segments if the layer LV below it is split. */ int split_parent_segments_for_layer(struct cmd_context *cmd, struct logical_volume *layer_lv) @@ -8303,7 +8303,7 @@ int remove_layer_from_lv(struct logical_volume *lv, */ /* FIXME: * These are all INTERNAL_ERROR, but ATM there is - * some internal API problem and this code is wrongle + * some internal API problem and this code is wrongly * executed with certain mirror manipulations. * So we need to fix mirror code first, then switch... */ @@ -8352,7 +8352,7 @@ int remove_layer_from_lv(struct logical_volume *lv, return_0; /* - * recuresively rename sub LVs + * recursively rename sub LVs * currently supported only for thin data layer * FIXME: without strcmp it breaks mirrors.... */ @@ -8476,7 +8476,7 @@ struct logical_volume *insert_layer_for_lv(struct cmd_context *cmd, lv_where->profile = lv_where->vg->cmd->profile_params->global_metadata_profile; /* - * recuresively rename sub LVs + * recursively rename sub LVs * currently supported only for thin data layer * FIXME: without strcmp it breaks mirrors.... */ @@ -9218,7 +9218,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, } if (seg_is_thin_volume(lp)) { - /* Validate volume size to to aling on chunk for small extents */ + /* Validate volume size to to align on chunk for small extents */ size = first_seg(pool_lv)->chunk_size; if (size > vg->extent_size) { /* Align extents on chunk boundary size */ @@ -9568,7 +9568,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg, goto revert_new_lv; } } else if (lv_is_cache_pool(lv)) { - /* Cache pool cannot be actived and zeroed */ + /* Cache pool cannot be activated and zeroed */ log_very_verbose("Cache pool is prepared."); } else if (lv_is_thin_volume(lv)) { /* Optimize the case when taking a snapshot within same pool and thin origin @@ -9893,7 +9893,7 @@ struct logical_volume *lv_create_single(struct volume_group *vg, return NULL; } - /* Convertion via lvcreate */ + /* Conversion via lvcreate */ log_print_unless_silent("Logical volume %s is now cached.", display_lvname(lv)); return lv; diff --git a/lib/metadata/metadata-exported.h b/lib/metadata/metadata-exported.h index b8ebca62a..0d42b4464 100644 --- a/lib/metadata/metadata-exported.h +++ b/lib/metadata/metadata-exported.h @@ -407,7 +407,7 @@ struct pv_segment { #define FMT_INSTANCE_MDAS 0x00000002U /* - * Include any auxiliary mdas during format_instance intialisation. + * Include any auxiliary mdas during format_instance initialisation. * Currently, this includes metadata areas as defined by * metadata/dirs and metadata/raws setting. */ diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index c78981c17..afe224bf2 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -3150,7 +3150,7 @@ int vg_commit(struct volume_group *vg) dm_list_iterate_items(pvl, &vg->pvs) pvl->pv->status &= ~PV_MOVED_VG; - /* This *is* the original now that it's commited. */ + /* This *is* the original now that it's committed. */ _vg_move_cached_precommitted_to_committed(vg); if (vg->needs_write_and_commit){ @@ -3259,7 +3259,7 @@ static int _vg_read_orphan_pv(struct lvmcache_info *info, void *baton) * before clearing the in-use flag. In this case, the * in-use flag needs to be manually cleared on the PV. * - * . The PV may have damanged/unrecognized VG metadata + * . The PV may have damaged/unrecognized VG metadata * that lvm could not read. * * . The PV may have no mdas, and the PVs with the metadata @@ -3592,7 +3592,7 @@ static void _set_pv_device(struct format_instance *fid, } /* - * Finds the 'struct device' that correponds to each PV in the metadata, + * Finds the 'struct device' that corresponds to each PV in the metadata, * and may make some adjustments to vg fields based on the dev properties. */ void set_pv_devices(struct format_instance *fid, struct volume_group *vg) @@ -4184,10 +4184,10 @@ struct metadata_area *mda_copy(struct dm_pool *mem, } /* * This function provides a way to answer the question on a format specific - * basis - does the format specfic context of these two metadata areas + * basis - does the format specific context of these two metadata areas * match? * - * A metatdata_area is defined to be independent of the underlying context. + * A metadata_area is defined to be independent of the underlying context. * This has the benefit that we can use the same abstraction to read disks * (see _metadata_text_raw_ops) or files (see _metadata_text_file_ops). * However, one downside is there is no format-independent way to determine @@ -4954,7 +4954,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const goto bad; } - /* I belive this is unused, the name is always set. */ + /* I believe this is unused, the name is always set. */ if (!vg_name && !(vg_name = lvmcache_vgname_from_vgid(cmd->mem, vgid))) { unlock_vg(cmd, NULL, vg_name); log_error("VG name not found for vgid %s", vgid); @@ -4964,7 +4964,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const /* * If the command is process all vgs, process_each will get a list of vgname+vgid - * pairs, and then call vg_read() for each vgname+vigd. In this case we know + * pairs, and then call vg_read() for each vgname+vgid. In this case we know * which VG to read even if there are duplicate names, and we don't fail. * * If the user has requested one VG by name, process_each passes only the vgname @@ -5195,7 +5195,7 @@ bad: * there's an error. It is here for process_each_pv() which wants to * eliminate the VG's devs from the list of devs it is processing, even * when it can't access the VG because of wrong system id or similar. - * This could be done by looking at lvmcache info structs intead of 'vg'. + * This could be done by looking at lvmcache info structs instead of 'vg'. * It's also used by process_each_vg/process_each_lv which want to * include error_vg values (like system_id) in error messages. * These values could also be found from lvmcache vginfo. diff --git a/lib/metadata/metadata.h b/lib/metadata/metadata.h index f93cd263d..051d95fac 100644 --- a/lib/metadata/metadata.h +++ b/lib/metadata/metadata.h @@ -222,7 +222,7 @@ struct format_instance *alloc_fid(const struct format_type *fmt, /* * Format instance must always be set using pv_set_fid or vg_set_fid - * (NULL value as well), never asign it directly! This is essential + * (NULL value as well), never assign it directly! This is essential * for proper reference counting for the format instance. */ void pv_set_fid(struct physical_volume *pv, struct format_instance *fid); @@ -431,7 +431,7 @@ int lv_has_constant_stripes(struct logical_volume *lv); /* * Sometimes (eg, after an lvextend), it is possible to merge two - * adjacent segments into a single segment. This function trys + * adjacent segments into a single segment. This function tries * to merge as many segments as possible. */ int lv_merge_segments(struct logical_volume *lv); diff --git a/lib/metadata/mirror.c b/lib/metadata/mirror.c index 450779ca5..b8668c18e 100644 --- a/lib/metadata/mirror.c +++ b/lib/metadata/mirror.c @@ -780,7 +780,7 @@ static int _split_mirror_images(struct logical_volume *lv, * If collapse is non-zero, is guaranteed to be equal to num_removed. * * Return values: - * Failure (0) means something unexpected has happend and + * Failure (0) means something unexpected has happened and * the caller should abort. * Even if no mirror was removed (e.g. no LV matches to 'removable_pvs'), * returns success (1). diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c index b157c48fd..cdcbfea93 100644 --- a/lib/metadata/pool_manip.c +++ b/lib/metadata/pool_manip.c @@ -739,7 +739,7 @@ static struct logical_volume *_alloc_pool_metadata_spare(struct volume_group *vg int handle_pool_metadata_spare(struct volume_group *vg, uint32_t extents, struct dm_list *pvh, int poolmetadataspare) { - /* Max usable size of any spare volume is currently 16GiB rouned to extent size */ + /* Max usable size of any spare volume is currently 16GiB rounded to extent size */ const uint64_t MAX_SIZE = (UINT64_C(2 * 16) * 1024 * 1024 + vg->extent_size - 1) / vg->extent_size; struct logical_volume *lv = vg->pool_metadata_spare_lv; uint32_t seg_mirrors; diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 5f570e745..af461250a 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -81,7 +81,7 @@ static int _rebuild_with_emptymeta_is_supported(struct cmd_context *cmd, * Ensure region size exceeds the minimum for @lv because * MD's bitmap is limited to tracking 2^21 regions. * - * Pass in @lv_size, because funcion can be called with an empty @lv. + * Pass in @lv_size, because function can be called with an empty @lv. */ uint32_t raid_ensure_min_region_size(const struct logical_volume *lv, uint64_t raid_size, uint32_t region_size) { @@ -447,7 +447,7 @@ int lv_raid_in_sync(const struct logical_volume *lv) * This function makes no on-disk changes. The residual LVs * returned in 'removal_lvs' must be freed by the caller. * - * Returns: 1 on succes, 0 on failure + * Returns: 1 on success, 0 on failure */ static int _raid_remove_top_layer(struct logical_volume *lv, struct dm_list *removal_lvs) @@ -550,7 +550,7 @@ static int _reset_flags_passed_to_kernel(struct logical_volume *lv, int *flags_r * Run optional variable args function fn_post_on_lv with fn_post_data on @lv before second metadata update * Run optional variable args function fn_pre_on_lv with fn_pre_data on @lv before first metadata update * - * This minimaly involves 2 metadata commits or more, depending on + * This minimally involves 2 metadata commits or more, depending on * pre and post functions carrying out any additional ones or not. * * WARNING: needs to be called with at least 4 arguments to suit va_list processing! @@ -586,7 +586,7 @@ static int _lv_update_reload_fns_reset_eliminate_lvs(struct logical_volume *lv, va_end(ap); /* Call any fn_pre_on_lv before the first update and reload call (e.g. to rename LVs) */ - /* returns 1: ok+ask caller to update, 2: metadata commited+ask caller to resume */ + /* returns 1: ok+ask caller to update, 2: metadata committed+ask caller to resume */ if (fn_pre_on_lv && !(r = fn_pre_on_lv(lv, fn_pre_data))) { log_error(INTERNAL_ERROR "Pre callout function failed."); return 0; @@ -643,7 +643,7 @@ static int _lv_update_reload_fns_reset_eliminate_lvs(struct logical_volume *lv, * Assisted excl_local activation of lvl listed LVs before resume * * FIXME: code which needs to use this function is usually unsafe - * againt crashes as it's doing more then 1 operation per commit + * against crashes as it's doing more then 1 operation per commit * and as such is currently irreversible on error path. * * Function is not making backup as this is usually not the last @@ -701,7 +701,7 @@ static int _lv_update_and_reload_list(struct logical_volume *lv, int origin_only return r; } -/* Wipe all LVs listsed on @lv_list committing lvm metadata */ +/* Wipe all LVs listed on @lv_list committing lvm metadata */ static int _clear_lvs(struct dm_list *lv_list) { return activate_and_wipe_lvlist(lv_list, 1); @@ -1092,7 +1092,7 @@ static int _alloc_image_components(struct logical_volume *lv, * each of the rimages is the same size - 'le_count'. However * for RAID 4/5/6, the stripes add together (NOT including the parity * devices) to equal 'le_count'. Thus, when we are allocating - * individual devies, we must specify how large the individual device + * individual devices, we must specify how large the individual device * is along with the number we want ('count'). */ if (use_existing_area_len) @@ -1824,7 +1824,7 @@ static int _reshape_adjust_to_size(struct logical_volume *lv, /* * HM Helper: * - * Reshape: add immages to existing raid lv + * Reshape: add images to existing raid lv * */ static int _lv_raid_change_image_count(struct logical_volume *lv, int yes, uint32_t new_count, @@ -2128,16 +2128,16 @@ static int _raid_reshape_keep_images(struct logical_volume *lv, } /* - * Reshape layout alogorithm or chunksize: + * Reshape layout algorithm or chunksize: * * Allocate free out-of-place reshape space unless raid10_far. * - * If other raid10, allocate it appropriatly. + * If other raid10, allocate it appropriately. * * Allocate it anywhere for raid4/5 to avoid remapping * it in case it is already allocated. * - * The dm-raid target is able to use the space whereever it + * The dm-raid target is able to use the space wherever it * is found by appropriately selecting forward or backward reshape. */ if (seg->segtype != new_segtype && @@ -2268,7 +2268,7 @@ static int _pre_raid0_remove_rmeta(struct logical_volume *lv, void *data) if (!_vg_write_lv_suspend_vg_commit(lv, 1)) return_0; - /* 1: ok+ask caller to update, 2: metadata commited+ask caller to resume */ + /* 1: ok+ask caller to update, 2: metadata committed+ask caller to resume */ return _activate_sub_lvs_excl_local_list(lv, lv_list) ? 2 : 0; } @@ -2485,7 +2485,7 @@ static int _raid_reshape(struct logical_volume *lv, * - # of stripes requested to change * (i.e. add/remove disks from a striped raid set) * -or- - * - stripe size change requestd + * - stripe size change requested * (e.g. 32K -> 128K) * * Returns: @@ -5179,7 +5179,7 @@ static int _raid45_to_raid54_wrapper(TAKEOVER_FN_ARGS) } - /* Necessary when convering to raid0/striped w/o redundancy. */ + /* Necessary when converting to raid0/striped w/o redundancy. */ if (!_raid_in_sync(lv)) { log_error("Unable to convert %s while it is not in-sync.", display_lvname(lv)); @@ -5530,7 +5530,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS) if (!_lv_raid_change_image_count(lv, 1, new_image_count, allocate_pvs, NULL, 0, 1)) { /* * Rollback to initial type raid0/striped after failure to upconvert - * to raid4/5/6/10 elminating any newly allocated metadata devices + * to raid4/5/6/10 eliminating any newly allocated metadata devices * (raid4/5 -> raid6 doesn't need any explicit changes after * the allocation of the additional sub LV pair failed) * @@ -5648,7 +5648,7 @@ static int _takeover_upconvert_wrapper(TAKEOVER_FN_ARGS) /************************************************/ /* - * Customised takeover functions + * Customized takeover functions */ static int _takeover_from_linear_to_raid0(TAKEOVER_FN_ARGS) { @@ -6034,7 +6034,7 @@ static int _takeover_from_raid10_to_raid1(TAKEOVER_FN_ARGS) } /* - * This'd be a reshape, not a takeover. + * This would be a reshape, not a takeover. * static int _takeover_from_raid10_to_raid10(TAKEOVER_FN_ARGS) { @@ -6334,7 +6334,7 @@ static int _region_size_change_requested(struct logical_volume *lv, int yes, con if (!region_size) return_0; - /* CLI validation provides the check but be caucious... */ + /* CLI validation provides the check but be cautious... */ if (!lv_is_raid(lv) || !seg || seg_is_any_raid0(seg)) { log_error(INTERNAL_ERROR "Cannot change region size of %s.", display_lvname(lv)); @@ -6561,7 +6561,7 @@ int lv_raid_convert(struct logical_volume *lv, region_size = region_size ? : (uint32_t)get_default_region_size(lv->vg->cmd); /* - * Check acceptible options mirrors, region_size, + * Check acceptable options mirrors, region_size, * stripes and/or stripe_size have been provided. */ if (!_conversion_options_allowed(seg, &new_segtype, yes, @@ -6745,7 +6745,7 @@ has_enough_space: * _lv_raid_has_primary_failure_on_recover * @lv * - * The kernel behaves strangely in the presense of a primary failure + * The kernel behaves strangely in the presence of a primary failure * during a "recover" sync operation. It's not technically a bug, I * suppose, but the output of the status line can make it difficult * to determine that we are in this state. The sync ratio will be diff --git a/lib/metadata/segtype.h b/lib/metadata/segtype.h index 9f16cdb7c..4a1fdb8e4 100644 --- a/lib/metadata/segtype.h +++ b/lib/metadata/segtype.h @@ -42,7 +42,7 @@ struct dev_manager; #define SEG_CACHE (1ULL << 13) #define SEG_CACHE_POOL (1ULL << 14) #define SEG_MIRROR (1ULL << 15) -#define SEG_ONLY_EXCLUSIVE (1ULL << 16) /* In cluster only exlusive activation */ +#define SEG_ONLY_EXCLUSIVE (1ULL << 16) /* In cluster only exclusive activation */ #define SEG_CAN_ERROR_WHEN_FULL (1ULL << 17) #define SEG_RAID0 (1ULL << 18) diff --git a/lib/metadata/snapshot_manip.c b/lib/metadata/snapshot_manip.c index b34079d08..71ad0ec32 100644 --- a/lib/metadata/snapshot_manip.c +++ b/lib/metadata/snapshot_manip.c @@ -330,7 +330,7 @@ int vg_remove_snapshot(struct logical_volume *cow) clear_snapshot_merge(origin); /* * preload origin IFF "snapshot-merge" target is active - * - IMPORTANT: avoids preload if inactivate merge is pending + * - IMPORTANT: avoids preload if inactive merge is pending */ } diff --git a/lib/metadata/thin_manip.c b/lib/metadata/thin_manip.c index 6f26d02e5..4d97585b8 100644 --- a/lib/metadata/thin_manip.c +++ b/lib/metadata/thin_manip.c @@ -342,7 +342,7 @@ out: /* * Detect overprovisioning and check lvm2 is configured for auto resize. * - * If passed LV is thin volume/pool, check first only this one for overprovisiong. + * If passed LV is thin volume/pool, check first only this one for overprovisioning. * Lots of test combined together. * Test is not detecting status of dmeventd, too complex for now... */ @@ -1018,10 +1018,10 @@ int lv_is_thin_snapshot(const struct logical_volume *lv) } /* - * Explict check of new thin pool for usability + * Explicit check of new thin pool for usability * * Allow use of thin pools by external apps. When lvm2 metadata has - * transaction_id == 0 for a new thin pool, it will explicitely validate + * transaction_id == 0 for a new thin pool, it will explicitly validate * the pool is still unused. * * To prevent lvm2 to create thin volumes in externally used thin pools @@ -1102,7 +1102,7 @@ uint64_t estimate_thin_pool_metadata_size(uint32_t data_extents, uint32_t extent return _estimate_metadata_size(data_extents, extent_size, chunk_size); } -/* Validates whtether the LV can be used as external origin */ +/* Validates whether the LV can be used as external origin */ int validate_thin_external_origin(const struct logical_volume *lv, const struct logical_volume *pool_lv) { diff --git a/lib/metadata/vdo_manip.c b/lib/metadata/vdo_manip.c index ccc0bcf28..318566e5f 100644 --- a/lib/metadata/vdo_manip.c +++ b/lib/metadata/vdo_manip.c @@ -97,7 +97,7 @@ const char *get_vdo_write_policy_name(enum dm_vdo_write_policy policy) /* * Size of VDO virtual LV is adding header_size in front and back of device - * to avoid colission with blkid checks. + * to avoid collision with blkid checks. */ static uint64_t _get_virtual_size(uint32_t extents, uint32_t extent_size, uint32_t header_size) diff --git a/lib/mirror/mirrored.c b/lib/mirror/mirrored.c index 80d8ea18f..f6f815bf4 100644 --- a/lib/mirror/mirrored.c +++ b/lib/mirror/mirrored.c @@ -432,7 +432,7 @@ static int _mirrored_target_present(struct cmd_context *cmd, } /* - * Check only for modules if atttributes requested and no previous check. + * Check only for modules if attributes requested and no previous check. */ if (attributes) *attributes = _mirror_attributes; diff --git a/lib/misc/lvm-exec.h b/lib/misc/lvm-exec.h index 04291853f..607246ede 100644 --- a/lib/misc/lvm-exec.h +++ b/lib/misc/lvm-exec.h @@ -21,7 +21,7 @@ struct cmd_context; /** - * Execute command with paramaters and return status + * Execute command with parameters and return status * * \param rstatus * Returns command's exit status code. diff --git a/lib/misc/lvm-string.c b/lib/misc/lvm-string.c index 0f4c80f82..8beb6a4ac 100644 --- a/lib/misc/lvm-string.c +++ b/lib/misc/lvm-string.c @@ -153,7 +153,7 @@ static const char *_lvname_has_reserved_prefix(const char *lvname) static const char *_lvname_has_reserved_component_string(const char *lvname) { static const char _strings[][12] = { - /* Suffixes for compoment LVs */ + /* Suffixes for component LVs */ "_cdata", "_cmeta", "_corig", @@ -182,7 +182,7 @@ static const char *_lvname_has_reserved_component_string(const char *lvname) static const char *_lvname_has_reserved_string(const char *lvname) { static const char _strings[][12] = { - /* Additional suffixes for non-compoment LVs */ + /* Additional suffixes for non-component LVs */ "_pmspare", "_vorigin" }; @@ -220,7 +220,7 @@ int apply_lvname_restrictions(const char *name) } /* - * Validates name and returns an emunerated reason for name validataion failure. + * Validates name and returns an enumerated reason for name validation failure. */ name_error_t validate_name_detailed(const char *name) { @@ -247,7 +247,7 @@ char *build_dm_uuid(struct dm_pool *mem, const struct logical_volume *lv, if (!layer) { /* * Mark internal LVs with layer suffix - * so tools like blkid may immeditelly see it's + * so tools like blkid may immediately see it's * an internal LV they should not scan. * Should also make internal detection simpler. */ @@ -295,7 +295,7 @@ char *first_substring(const char *str, ...) } /* Cut suffix (if present) and write the name into NAME_LEN sized new_name buffer - * When suffix is NULL, everythin past the last '_' is removed. + * When suffix is NULL, everything past the last '_' is removed. * Returns 1 when suffix was removed, 0 otherwise. */ int drop_lvname_suffix(char *new_name, const char *name, const char *suffix) diff --git a/lib/mm/memlock.c b/lib/mm/memlock.c index 41f582e22..a7c227ae7 100644 --- a/lib/mm/memlock.c +++ b/lib/mm/memlock.c @@ -88,7 +88,7 @@ static int _memlock_count_daemon = 0; static int _priority; static int _default_priority; -/* list of maps, that are unconditionaly ignored */ +/* list of maps, that are unconditionally ignored */ static const char _ignore_maps[][16] = { "[vdso]", "[vsyscall]", @@ -179,7 +179,7 @@ static void _allocate_memory(void) /* FIXME else warn user setting got ignored */ #ifdef HAVE_MALLINFO2 - /* Prefer mallinfo2 call when avaialble with newer glibc */ + /* Prefer mallinfo2 call when available with newer glibc */ #define MALLINFO mallinfo2 #else #define MALLINFO mallinfo @@ -525,7 +525,7 @@ static void _lock_mem(struct cmd_context *cmd) /* * For daemon we need to use mlockall() - * so even future adition of thread which may not even use lvm lib + * so even future addition of thread which may not even use lvm lib * will not block memory locked thread * Note: assuming _memlock_count_daemon is updated before _memlock_count */ @@ -614,7 +614,7 @@ static void _unlock_mem_if_possible(struct cmd_context *cmd) * remains fast. * * Memory stays locked until 'memlock_unlock()' is called so when possible - * it may stay locked across multiple crictical section entrances. + * it may stay locked across multiple critical section entrances. */ void critical_section_inc(struct cmd_context *cmd, const char *reason) { diff --git a/lib/properties/prop_common.h b/lib/properties/prop_common.h index 1f6eb5bfd..5bbac9764 100644 --- a/lib/properties/prop_common.h +++ b/lib/properties/prop_common.h @@ -110,7 +110,7 @@ static int _ ## NAME ## _get (const void *obj, struct lvm_property_type *prop) \ * then prepending this argument to '_disp'. For example, if this argument * is 'uuid', the display function is _uuid_disp(). Adding a new field may * require defining a new display function (for example _myfieldname_disp()), - * or re-use of an existing one (for example, _uint32_disp()). + * or reuse of an existing one (for example, _uint32_disp()). * 8. Unique format identifier / field id. This name must be unique and is * used to select fields via '-o' in the reporting commands (pvs/vgs/lvs). * The string used to specify the field - the 'id' member of diff --git a/lib/raid/raid.c b/lib/raid/raid.c index dac7a791b..64ef4de78 100644 --- a/lib/raid/raid.c +++ b/lib/raid/raid.c @@ -560,7 +560,7 @@ static int _raid_target_present(struct cmd_context *cmd, _features[i].feature); /* - * Seperate check for proper raid4 mapping supported + * Separate check for proper raid4 mapping supported * * If we get more of these range checks, avoid them * altogether by enhancing 'struct raid_feature' diff --git a/lib/report/report.c b/lib/report/report.c index b1139e5b1..a6e478787 100644 --- a/lib/report/report.c +++ b/lib/report/report.c @@ -533,7 +533,7 @@ static int _preparse_fuzzy_time(const char *s, struct time_info *info) * If the string consists of -:+, digits or spaces, * it's not worth looking for fuzzy names here - * it's standard YYYY-MM-DD HH:MM:SS +-HH:MM format - * and that is parseable by libdm directly. + * and that is parsable by libdm directly. */ if (!(isdigit(c) || (c == '-') || (c == ':') || (c == '+'))) fuzzy = 1; @@ -2562,7 +2562,7 @@ static int _segstartpe_disp(struct dm_report *rh, return dm_report_field_uint32(rh, field, &seg->le); } -/* Hepler: get used stripes = total stripes minux any to remove after reshape */ +/* Helper: get used stripes = total stripes minus any to remove after reshape */ static int _get_seg_used_stripes(const struct lv_segment *seg) { uint32_t s; @@ -2636,7 +2636,7 @@ static struct logical_volume *_lv_for_raid_image_seg(const struct lv_segment *se return NULL; } -/* Helper: return the top-level raid LV in case it is reshapale for @seg or @seg if it is */ +/* Helper: return the top-level raid LV in case it is reshapable for @seg or @seg if it is */ static const struct lv_segment *_get_reshapable_seg(const struct lv_segment *seg, struct dm_pool *mem) { return _lv_for_raid_image_seg(seg, mem) ? seg : NULL; diff --git a/lib/report/values.h b/lib/report/values.h index 3efe2b83f..d09f91114 100644 --- a/lib/report/values.h +++ b/lib/report/values.h @@ -30,7 +30,7 @@ * _ * * FIELD_BINARY_RESERVED_VALUE is similar to FIELD_RESERVED_VALUE but it - * is specifically designed for defintion of reserved names for fields + * is specifically designed for definition of reserved names for fields * with binary values where the reserved names given denote value 1. * The first reserved_name given is also used for reporting, * others are synonyms which are recognized in addition. diff --git a/lib/thin/thin.c b/lib/thin/thin.c index e17f6719c..ae382dc9d 100644 --- a/lib/thin/thin.c +++ b/lib/thin/thin.c @@ -22,7 +22,7 @@ #include "lib/activate/activate.h" #include "lib/datastruct/str_list.h" -/* Dm kernel module name for thin provisiong */ +/* Dm kernel module name for thin provisioning */ static const char _thin_pool_module[] = "thin-pool"; static const char _thin_module[] = "thin"; @@ -350,7 +350,7 @@ static int _thin_pool_add_target_line(struct dev_manager *dm, /* * Add messages only for activation tree. * Otherwise avoid checking for existence of suspended origin. - * Also transation_id is checked only when snapshot origin is active. + * Also transaction_id is checked only when snapshot origin is active. * (This might change later) */ if (!laopts->send_messages) @@ -410,7 +410,7 @@ static int _thin_pool_target_percent(void **target_state __attribute__((unused)) if (s->fail || s->error) *percent = DM_PERCENT_INVALID; - /* With 'seg' report metadata percent, otherwice data percent */ + /* With 'seg' report metadata percent, otherwise data percent */ else if (seg) { *percent = dm_make_percent(s->used_metadata_blocks, s->total_metadata_blocks); diff --git a/lib/vdo/vdo.c b/lib/vdo/vdo.c index 8fdaae514..3a5abacd5 100644 --- a/lib/vdo/vdo.c +++ b/lib/vdo/vdo.c @@ -459,7 +459,7 @@ static int _vdo_target_present(struct cmd_context *cmd, /* If stripe target was already detected, reuse its result */ if (!(segtype = get_segtype_from_string(cmd, SEG_TYPE_NAME_STRIPED)) || !segtype->ops->target_present || !segtype->ops->target_present(cmd, NULL, NULL)) { - /* Linear/Stripe targer is for mapping LVs on top of single VDO volume. */ + /* Linear/Stripe target is for mapping LVs on top of single VDO volume. */ if (!target_present(cmd, TARGET_NAME_LINEAR, 0) || !target_present(cmd, TARGET_NAME_STRIPED, 0)) return 0; diff --git a/libdaemon/server/daemon-server.h b/libdaemon/server/daemon-server.h index 18fd3ad9f..aa2f1f39f 100644 --- a/libdaemon/server/daemon-server.h +++ b/libdaemon/server/daemon-server.h @@ -115,7 +115,7 @@ typedef struct daemon_state { log_state *log; struct thread_state *threads; - /* suport for shutdown on idle */ + /* support for shutdown on idle */ daemon_idle *idle; void *private; /* the global daemon state */ diff --git a/libdaemon/server/daemon-stray.h b/libdaemon/server/daemon-stray.h index cfce85622..409d95833 100644 --- a/libdaemon/server/daemon-stray.h +++ b/libdaemon/server/daemon-stray.h @@ -128,7 +128,7 @@ static int daemon_close_stray_fds(const char *command, int suppress_warning, _daemon_get_cmdline(ppid, parent_cmdline, sizeof(parent_cmdline)); if ((d = opendir(_fd_dir))) { - /* Discover openned descriptors from /proc/self/fd listing */ + /* Discover opened descriptors from /proc/self/fd listing */ while ((dirent = readdir(d))) { fd = atoi(dirent->d_name); if ((fd > from_fd) && diff --git a/libdm/datastruct/bitset.c b/libdm/datastruct/bitset.c index 25407f521..e971c6793 100644 --- a/libdm/datastruct/bitset.c +++ b/libdm/datastruct/bitset.c @@ -180,7 +180,7 @@ scan: /* * whitespaces between digits are not allowed, * but it's ok if whitespaces are on head or tail. - * when old_c is whilespace, + * when old_c is whitespace, * if totaldigits == ndigits, whitespace is on head. * if whitespace is on tail, it should not run here. * as c was ',' or '\0', diff --git a/libdm/datastruct/hash.c b/libdm/datastruct/hash.c index b0ccc3a60..b826bc536 100644 --- a/libdm/datastruct/hash.c +++ b/libdm/datastruct/hash.c @@ -262,7 +262,7 @@ int dm_hash_insert_allow_multiple(struct dm_hash_table *t, const char *key, /* * Look through multiple entries with the same key for one that has a - * matching val and return that. If none have maching val, return NULL. + * matching val and return that. If none have matching val, return NULL. */ void *dm_hash_lookup_with_val(struct dm_hash_table *t, const char *key, const void *val, uint32_t val_len) diff --git a/libdm/dm-tools/dmfilemapd.c b/libdm/dm-tools/dmfilemapd.c index 92efda954..dc07314a3 100644 --- a/libdm/dm-tools/dmfilemapd.c +++ b/libdm/dm-tools/dmfilemapd.c @@ -109,7 +109,7 @@ static void _dmfilemapd_log_with_errno(int level, } /* - * Only used for reporting errors before daemonise(). + * Only used for reporting errors before daemonize(). */ __attribute__((format(printf, 1, 2))) static void _early_log(const char *fmt, ...) @@ -668,7 +668,7 @@ static int _daemonize(struct filemap_monitor *fm) if (fd > STDERR_FILENO) (void) close(fd); } - /* TODO: Use libdaemon/server/daemon-server.c _daemonise() */ + /* TODO: Use libdaemon/server/daemon-server.c _daemonize() */ for (ffd = (int) sysconf(_SC_OPEN_MAX) - 1; ffd > STDERR_FILENO; --ffd) if (ffd != fm->fd) (void) close(ffd); @@ -772,7 +772,7 @@ static int _dmfilemapd(struct filemap_monitor *fm) wait: _filemap_monitor_wait(FILEMAPD_WAIT_USECS); - /* mode=inode termination condions */ + /* mode=inode termination conditions */ if (fm->mode == DM_FILEMAPD_FOLLOW_INODE) { if (!_filemap_monitor_check_file_unlinked(fm)) goto bad; diff --git a/libdm/dm-tools/dmsetup.c b/libdm/dm-tools/dmsetup.c index d5de8a0b9..e6f83cd92 100644 --- a/libdm/dm-tools/dmsetup.c +++ b/libdm/dm-tools/dmsetup.c @@ -108,7 +108,7 @@ struct option { #define DM_STATS_PROGRAM_ID "dmstats" /* - * Basic commands this code implments. + * Basic commands this code implements. */ typedef enum { DMSETUP_CMD = 0, @@ -787,7 +787,7 @@ static int _update_interval_times(void) } /* - * Take cycle timstamp as close as possible to ioctl return. + * Take cycle timestamp as close as possible to ioctl return. * * FIXME: use per-region timestamp deltas for interval estimate. */ @@ -2034,7 +2034,7 @@ static int _simple(int task, const char *name, uint32_t event_nr, int display) if (_switches[CHECKS_ARG] && !dm_task_enable_checks(dmt)) goto_out; - /* FIXME: needs to coperate with udev */ + /* FIXME: needs to cooperate with udev */ if (!_set_task_add_node(dmt)) goto_out; @@ -2858,7 +2858,7 @@ _tsym_vt100 = { /* * Tree drawing functions. */ -/* FIXME Get rid of these statics - use dynamic struct */ +/* FIXME Get rid of these statistics - use dynamic struct */ /* FIXME Explain what these vars are for */ static int _tree_width[MAX_DEPTH], _tree_more[MAX_DEPTH]; static int _termwidth = 80; /* Maximum output width */ diff --git a/libdm/ioctl/libdm-iface.c b/libdm/ioctl/libdm-iface.c index 2ddd10358..d10085881 100644 --- a/libdm/ioctl/libdm-iface.c +++ b/libdm/ioctl/libdm-iface.c @@ -666,7 +666,7 @@ void *dm_get_next_target(struct dm_task *dmt, void *next, return t->next; } -/* Unmarshall the target info returned from a status call */ +/* Unmarshal the target info returned from a status call */ static int _unmarshal_status(struct dm_task *dmt, struct dm_ioctl *dmi) { char *outbuf = (char *) dmi + dmi->data_start; diff --git a/libdm/libdevmapper.h b/libdm/libdevmapper.h index 53f1c601f..b37d53dae 100644 --- a/libdm/libdevmapper.h +++ b/libdm/libdevmapper.h @@ -283,15 +283,15 @@ int dm_task_add_target(struct dm_task *dmt, #define DM_FORMAT_DEV_BUFSIZE 13 /* Minimum bufsize to handle worst case. */ int dm_format_dev(char *buf, int bufsize, uint32_t dev_major, uint32_t dev_minor); -/* Use this to retrive target information returned from a STATUS call */ +/* Use this to retrieve target information returned from a STATUS call */ void *dm_get_next_target(struct dm_task *dmt, void *next, uint64_t *start, uint64_t *length, char **target_type, char **params); /* - * Following dm_get_status_* functions will allocate approriate status structure + * Following dm_get_status_* functions will allocate appropriate status structure * from passed mempool together with the necessary character arrays. - * Destroying the mempool will release all asociated allocation. + * Destroying the mempool will release all associated allocation. */ /* Parse params from STATUS call for mirror target */ @@ -451,7 +451,7 @@ int dm_get_status_thin(struct dm_pool *mem, const char *params, * * Operations on dm_stats objects include managing statistics regions * and obtaining and manipulating current counter values from the - * kernel. Methods are provided to return baisc count values and to + * kernel. Methods are provided to return basic count values and to * derive time-based metrics when a suitable interval estimate is * provided. * @@ -544,7 +544,7 @@ int dm_stats_bind_from_fd(struct dm_stats *dms, int fd); int dm_message_supports_precise_timestamps(void); /* - * Precise timetamps and histogram support. + * Precise timestamps and histogram support. * * Test for the presence of precise_timestamps and histogram support. */ @@ -554,7 +554,7 @@ int dm_stats_driver_supports_histogram(void); /* * Returns 1 if the specified region has the precise_timestamps feature * enabled (i.e. produces nanosecond-precision counter values) or 0 for - * a region using the default milisecond precision. + * a region using the default millisecond precision. */ int dm_stats_get_region_precise_timestamps(const struct dm_stats *dms, uint64_t region_id); @@ -563,7 +563,7 @@ int dm_stats_get_region_precise_timestamps(const struct dm_stats *dms, * Returns 1 if the region at the current cursor location has the * precise_timestamps feature enabled (i.e. produces * nanosecond-precision counter values) or 0 for a region using the - * default milisecond precision. + * default millisecond precision. */ int dm_stats_get_current_region_precise_timestamps(const struct dm_stats *dms); @@ -741,7 +741,7 @@ void dm_stats_buffer_destroy(struct dm_stats *dms, char *buffer); * following a dm_stats_list() or dm_stats_populate() call. * * The value returned is the number of registered regions visible with the - * progam_id value used for the list or populate operation and may not be + * program_id value used for the list or populate operation and may not be * equal to the highest present region_id (either due to program_id * filtering or gaps in the sequence of region_id values). * @@ -754,7 +754,7 @@ uint64_t dm_stats_get_nr_regions(const struct dm_stats *dms); * following a dm_stats_list() or dm_stats_populate() call. * * The value returned is the number of registered groups visible with the - * progam_id value used for the list or populate operation and may not be + * program_id value used for the list or populate operation and may not be * equal to the highest present group_id (either due to program_id * filtering or gaps in the sequence of group_id values). * @@ -813,7 +813,7 @@ int dm_stats_get_region_nr_histogram_bins(const struct dm_stats *dms, * complete. * * An optional unit suffix of 's', 'ms', 'us', or 'ns' may be used to - * specify units of seconds, miliseconds, microseconds, or nanoseconds: + * specify units of seconds, milliseconds, microseconds, or nanoseconds: * * bounds_str="1ns,1us,1ms,1s" * bounds_str="500us,1ms,1500us,2ms" @@ -821,12 +821,12 @@ int dm_stats_get_region_nr_histogram_bins(const struct dm_stats *dms, * * The smallest valid unit of time for a histogram specification depends * on whether the region uses precise timestamps: for a region with the - * default milisecond precision the smallest possible histogram boundary - * magnitude is one milisecond: attempting to use a histogram with a - * boundary less than one milisecond when creating a region will cause + * default millisecond precision the smallest possible histogram boundary + * magnitude is one millisecond: attempting to use a histogram with a + * boundary less than one millisecond when creating a region will cause * the region to be created with the precise_timestamps feature enabled. * - * On sucess a pointer to the struct dm_histogram representing the + * On success a pointer to the struct dm_histogram representing the * bounds values is returned, or NULL in the case of error. The returned * pointer should be freed using dm_free() when no longer required. */ @@ -842,9 +842,9 @@ struct dm_histogram *dm_histogram_bounds_from_string(const char *bounds_str); * * The smallest valid unit of time for a histogram specification depends * on whether the region uses precise timestamps: for a region with the - * default milisecond precision the smallest possible histogram boundary - * magnitude is one milisecond: attempting to use a histogram with a - * boundary less than one milisecond when creating a region will cause + * default millisecond precision the smallest possible histogram boundary + * magnitude is one millisecond: attempting to use a histogram with a + * boundary less than one millisecond when creating a region will cause * the region to be created with the precise_timestamps feature enabled. */ struct dm_histogram *dm_histogram_bounds_from_uint64(const uint64_t *bounds); @@ -1501,7 +1501,7 @@ const char *dm_sysfs_dir(void); /* * Configure default UUID prefix string. - * Conventionally this is a short capitalised prefix indicating the subsystem + * Conventionally this is a short capitalized prefix indicating the subsystem * that is managing the devices, e.g. "LVM-" or "MPATH-". * To support stacks of devices from different subsystems, recursive functions * stop recursing if they reach a device with a different prefix. @@ -1544,7 +1544,7 @@ int dm_device_has_mounted_fs(uint32_t major, uint32_t minor); /* - * Callback is invoked for individal mountinfo lines, + * Callback is invoked for individual mountinfo lines, * minor, major and mount target are parsed and unmangled. */ typedef int (*dm_mountinfo_line_callback_fn) (char *line, unsigned maj, unsigned min, @@ -1658,7 +1658,7 @@ void *dm_tree_node_get_context(const struct dm_tree_node *node); /* * Returns 0 when node size and its children is unchanged. * Returns 1 when node or any of its children has increased size. - * Rerurns -1 when node or any of its children has reduced size. + * Returns -1 when node or any of its children has reduced size. */ int dm_tree_node_size_changed(const struct dm_tree_node *dnode); @@ -1845,7 +1845,7 @@ struct dm_tree_node_raid_params { }; /* - * Version 2 of above node raid params struct to keeep API compatibility. + * Version 2 of above node raid params struct to keep API compatibility. * * Extended for more than 64 legs (max 253 in the MD kernel runtime!), * delta_disks for disk add/remove reshaping, @@ -1868,7 +1868,7 @@ struct dm_tree_node_raid_params_v2 { * 'rebuilds' and 'writemostly' are bitfields that signify * which devices in the array are to be rebuilt or marked * writemostly. The kernel supports up to 253 legs. - * We limit ourselvs by choosing a lower value + * We limit ourselves by choosing a lower value * for DEFAULT_RAID_MAX_IMAGES. */ uint64_t rebuilds[RAID_BITMAP_SIZE]; @@ -1905,7 +1905,7 @@ struct dm_config_node; * * policy_settings { * migration_threshold=2048 - * sequention_threashold=100 + * sequential_threshold=100 * ... * } * @@ -1962,7 +1962,7 @@ int dm_tree_node_add_replicator_dev_target(struct dm_tree_node *node, /* End of Replicator API */ /* - * FIXME: Defines bellow are based on kernel's dm-thin.c defines + * FIXME: Defines below are based on kernel's dm-thin.c defines * DATA_DEV_BLOCK_SIZE_MIN_SECTORS (64 * 1024 >> SECTOR_SHIFT) * DATA_DEV_BLOCK_SIZE_MAX_SECTORS (1024 * 1024 * 1024 >> SECTOR_SHIFT) */ @@ -2028,7 +2028,7 @@ int dm_tree_node_set_thin_pool_error_if_no_space(struct dm_tree_node *node, int dm_tree_node_set_thin_pool_read_only(struct dm_tree_node *node, unsigned read_only); /* - * FIXME: Defines bellow are based on kernel's dm-thin.c defines + * FIXME: Defines below are based on kernel's dm-thin.c defines * MAX_DEV_ID ((1 << 24) - 1) */ #define DM_THIN_MAX_DEVICE_ID (UINT32_C((1 << 24) - 1)) @@ -3561,7 +3561,7 @@ void dm_config_destroy(struct dm_config_tree *cft); /* Simple output line by line. */ typedef int (*dm_putline_fn)(const char *line, void *baton); -/* More advaced output with config node reference. */ +/* More advanced output with config node reference. */ typedef int (*dm_config_node_out_fn)(const struct dm_config_node *cn, const char *line, void *baton); /* @@ -3624,7 +3624,7 @@ struct dm_config_node *dm_config_clone_node(struct dm_config_tree *cft, const st * Common formatting flags applicable to all config node types (lower 16 bits). */ #define DM_CONFIG_VALUE_FMT_COMMON_ARRAY 0x00000001 /* value is array */ -#define DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES 0x00000002 /* add spaces in "key = value" pairs in constrast to "key=value" for better readability */ +#define DM_CONFIG_VALUE_FMT_COMMON_EXTRA_SPACES 0x00000002 /* add spaces in "key = value" pairs in contrast to "key=value" for better readability */ /* * Type-related config node formatting flags (higher 16 bits). diff --git a/libdm/libdm-common.c b/libdm/libdm-common.c index 4b1bccb11..15ce2aca7 100644 --- a/libdm/libdm-common.c +++ b/libdm/libdm-common.c @@ -1794,7 +1794,7 @@ static int _mountinfo_parse_line(const char *line, unsigned *maj, unsigned *min, } /* - * Function to operate on individal mountinfo line, + * Function to operate on individual mountinfo line, * minor, major and mount target are parsed and unmangled */ int dm_mountinfo_read(dm_mountinfo_line_callback_fn read_fn, void *cb_data) diff --git a/libdm/libdm-config.c b/libdm/libdm-config.c index 6a1e19acd..38060f0e9 100644 --- a/libdm/libdm-config.c +++ b/libdm/libdm-config.c @@ -755,7 +755,7 @@ static int _match_aux(struct parser *p, int t) } /* - * tokeniser + * tokenizer */ static void _get_token(struct parser *p, int tok_prev) { diff --git a/libdm/libdm-deptree.c b/libdm/libdm-deptree.c index b84942c2b..34c8fcf10 100644 --- a/libdm/libdm-deptree.c +++ b/libdm/libdm-deptree.c @@ -235,7 +235,7 @@ struct load_properties { /* * Preload tree normally only loads and not resume, but there is * automatic resume when target is extended, as it's believed - * there can be no i/o flying to this 'new' extedend space + * there can be no i/o flying to this 'new' extended space * from any device above. Reason is that preloaded target above * may actually need to see its bigger subdevice before it * gets suspended. As long as devices are simple linears @@ -248,8 +248,8 @@ struct load_properties { /* * Call node_send_messages(), set to 2 if there are messages * When != 0, it validates matching transaction id, thus thin-pools - * where transation_id is passed as 0 are never validated, this - * allows external managment of thin-pool TID. + * where transaction_id is passed as 0 are never validated, this + * allows external management of thin-pool TID. */ unsigned send_messages; /* Skip suspending node's children, used when sending messages to thin-pool */ @@ -2025,7 +2025,7 @@ int dm_tree_activate_children(struct dm_tree_node *dnode, /* * FIXME: Implement delayed error reporting * activation should be stopped only in the case, - * the submission of transation_id message fails, + * the submission of transaction_id message fails, * resume should continue further, just whole command * has to report failure. */ @@ -2115,7 +2115,7 @@ static int _build_dev_string(char *devbuf, size_t bufsize, struct dm_tree_node * return 1; } -/* simplify string emiting code */ +/* simplify string emitting code */ #define EMIT_PARAMS(p, str...)\ do {\ int w;\ @@ -2924,7 +2924,7 @@ int dm_tree_preload_children(struct dm_tree_node *dnode, if (!child->info.exists && !(node_created = _create_node(child, dnode))) return_0; - /* Propagate delayed resume from exteded child node */ + /* Propagate delayed resume from extended child node */ if (child->props.delay_resume_if_extended) dnode->props.delay_resume_if_extended = 1; @@ -3357,7 +3357,7 @@ int dm_tree_node_add_raid_target(struct dm_tree_node *node, * - maximum 253 legs in a raid set (MD kernel limitation) * - delta_disks for disk add/remove reshaping * - data_offset for out-of-place reshaping - * - data_copies to cope witth odd numbers of raid10 disks + * - data_copies to cope with odd numbers of raid10 disks */ int dm_tree_node_add_raid_target_with_params_v2(struct dm_tree_node *node, uint64_t size, diff --git a/libdm/libdm-report.c b/libdm/libdm-report.c index 20552a47e..78ba243a5 100644 --- a/libdm/libdm-report.c +++ b/libdm/libdm-report.c @@ -458,7 +458,7 @@ static int _report_field_string_list(struct dm_report *rh, * * The very first item in the array of 'struct pos_len' is always * a pair denoting '[list_size,strlen(field->report_string)]'. The - * rest of items denote start and lenght of each item in the list. + * rest of items denote start and length of each item in the list. * * * For example, if we have a list with "abc", "xy", "defgh" @@ -1395,7 +1395,7 @@ struct dm_report *dm_report_init(uint32_t *report_types, } /* - * Return updated types value for further compatility check by caller. + * Return updated types value for further compatibility check by caller. */ _dm_report_init_update_types(rh, report_types); @@ -4023,7 +4023,7 @@ error: return NULL; } -/* AND_EXPRESSION := EX (AND_OP AND_EXPRSSION) */ +/* AND_EXPRESSION := EX (AND_OP AND_EXPRESSION) */ static struct selection_node *_parse_and_ex(struct dm_report *rh, const char *s, const char **next, diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index a861d2998..fa6d6d241 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -3589,7 +3589,7 @@ static struct dm_histogram *_alloc_dm_histogram(int nr_bins) * 'us', 'ms', or 's' unit suffixes. * * The scale parameter indicates the timescale used for this region: one - * for nanoscale resolution and NSEC_PER_MSEC for miliseconds. + * for nanoscale resolution and NSEC_PER_MSEC for milliseconds. * * On return bounds contains a pointer to an array of uint64_t * histogram bounds values expressed in units of nanoseconds. diff --git a/libdm/libdm-targets.c b/libdm/libdm-targets.c index ea1ba1d12..74cab0434 100644 --- a/libdm/libdm-targets.c +++ b/libdm/libdm-targets.c @@ -485,8 +485,8 @@ static dm_status_mirror_health_t _get_health(char c) } /* - * dm core parms: 0 409600 mirror - * Mirror core parms: 2 253:4 253:5 400/400 + * dm core params: 0 409600 mirror + * Mirror core params: 2 253:4 253:5 400/400 * New-style failure params: 1 AA * New-style log params: 3 cluster 253:3 A * or 3 disk 253:3 A diff --git a/libdm/make.tmpl.in b/libdm/make.tmpl.in index ee923f83b..184694e0f 100644 --- a/libdm/make.tmpl.in +++ b/libdm/make.tmpl.in @@ -242,7 +242,7 @@ ifeq (,$(findstring -z$(comma)now,$(LDFLAGS))) LDFLAGS += -Wl,-z,now endif # TODO: think about configure option for this flag -# for now leave decision on distro maitainer +# for now leave decision on distro maintainer #ifeq (,$(findstring -z$(comma)pack-relative-relocs,$(LDFLAGS))) # LDFLAGS += -Wl,-z,pack-relative-relocs #endif diff --git a/libdm/misc/dm-log-userspace.h b/libdm/misc/dm-log-userspace.h index f28fa585e..f09dc4aee 100644 --- a/libdm/misc/dm-log-userspace.h +++ b/libdm/misc/dm-log-userspace.h @@ -62,7 +62,7 @@ * * The UUID contained in the dm_ulog_request structure is the reference that * will be used by all request types to a specific log. The constructor must - * record this assotiation with the instance created. + * record this association with the instance created. * * When the request has been processed, user-space must return the * dm_ulog_request to the kernel - setting the 'error' field, filling the diff --git a/libdm/mm/pool.c b/libdm/mm/pool.c index f3e1d1a34..9b3f2d2df 100644 --- a/libdm/mm/pool.c +++ b/libdm/mm/pool.c @@ -129,7 +129,7 @@ int dm_pool_locked(struct dm_pool *p) * Bool specifies whether to store the pool crc/hash checksum. * * \return - * 1 (success) when the pool was preperly locked, 0 otherwise. + * 1 (success) when the pool was properly locked, 0 otherwise. */ int dm_pool_lock(struct dm_pool *p, int crc) { diff --git a/libdm/regex/parse_rx.h b/libdm/regex/parse_rx.h index 08970605d..d3ef8a40a 100644 --- a/libdm/regex/parse_rx.h +++ b/libdm/regex/parse_rx.h @@ -40,7 +40,7 @@ struct rx_node { dm_bitset_t charset; struct rx_node *left, *right; - /* used to build the dfa for the toker */ + /* used to build the dfa for the token */ unsigned charset_index; int nullable, final; dm_bitset_t firstpos; diff --git a/make.tmpl.in b/make.tmpl.in index 3d3e8c553..c8a870a8e 100644 --- a/make.tmpl.in +++ b/make.tmpl.in @@ -279,7 +279,7 @@ ifeq (,$(findstring -z$(comma)now,$(LDFLAGS))) LDFLAGS += -Wl,-z,now endif # TODO: think about configure option for this flag -# for now leave decision on distro maitainer +# for now leave decision on distro maintainer #ifeq (,$(findstring -z$(comma)pack-relative-relocs,$(LDFLAGS))) # LDFLAGS += -Wl,-z,pack-relative-relocs #endif diff --git a/scripts/Makefile.in b/scripts/Makefile.in index f683b7ab1..adbf1b20b 100644 --- a/scripts/Makefile.in +++ b/scripts/Makefile.in @@ -66,7 +66,7 @@ install_libexec: lvresize_fs_helper.sh install: install_lvm2 install_ocf install_device-mapper -# FIXME Customise for other distributions +# FIXME Customize for other distributions install_initscripts: $(SHOW) " [INSTALL] initscripts" $(Q) $(INSTALL_DIR) $(initdir) diff --git a/scripts/fsadm.sh b/scripts/fsadm.sh index 860162f28..3d677e0b2 100755 --- a/scripts/fsadm.sh +++ b/scripts/fsadm.sh @@ -135,7 +135,7 @@ dry() { $@ } -# Accept as succss also return code 1 with fsck +# Accept as success also return code 1 with fsck accept_0_1() { $@ local ret="$?" @@ -388,7 +388,7 @@ detect_device_size() { } # round up $1 / $2 -# could be needed to gaurantee 'at least given size' +# could be needed to guarantee 'at least given size' # but it makes many troubles round_up_block_size() { echo $(( ($1 + $2 - 1) / $2 )) @@ -532,7 +532,7 @@ resize_xfs() { # Find active LUKS device on original volume # 1) look for LUKS device with well-known UUID format (CRYPT-LUKS[12]--) -# 2) the dm-crypt device has to be on top of original device (dont't support detached LUKS headers) +# 2) the dm-crypt device has to be on top of original device (don't support detached LUKS headers) detect_luks_device() { local _LUKS_VERSION local _LUKS_UUID @@ -693,7 +693,7 @@ resize() { } #################################### -# Calclulate diff between two dates +# Calculate diff between two dates # LC_ALL=C input is expected the # only one supported #################################### @@ -776,7 +776,7 @@ trap "cleanup 2" 2 # test if we are not invoked recursively test -n "${FSADM_RUNNING-}" && exit 0 -# test some prerequisities +# test some prerequisites for i in "$TUNE_EXT" "$RESIZE_EXT" "$TUNE_REISER" "$RESIZE_REISER" \ "$TUNE_XFS" "$RESIZE_XFS" "$MOUNT" "$UMOUNT" "$MKDIR" \ "$RMDIR" "$BLOCKDEV" "$BLKID" "$GREP" "$READLINK" \ diff --git a/scripts/gdbinit b/scripts/gdbinit index b99517845..dc7dd88e3 100644 --- a/scripts/gdbinit +++ b/scripts/gdbinit @@ -493,7 +493,7 @@ end # # __lv_status_r -# Decend tree, printing LV and seg status as we go. This +# Descend tree, printing LV and seg status as we go. This # performs a depth first approach (but can't come up) # # or diff --git a/spec/lvm2.spec b/spec/lvm2.spec index 1a109b615..ad915b938 100644 --- a/spec/lvm2.spec +++ b/spec/lvm2.spec @@ -19,7 +19,7 @@ %import source.inc %if %{lvm2_testsuite_build} == 0 -# Disable global optimization when building on machine with installed lvm2-testsuited +# Disable global optimization when building on machine with installed lvm2-testsuite %global _lto_cflags %nil %endif diff --git a/spec/source.inc b/spec/source.inc index b5a62c5f8..bde2703d2 100644 --- a/spec/source.inc +++ b/spec/source.inc @@ -214,7 +214,7 @@ BuildRequires: libblkid-devel %description LVM2 includes all of the support for handling read/write operations on physical volumes (hard disks, RAID-Systems, magneto optical, etc., -multiple devices (MD), see mdadd(8) or even loop devices, see +multiple devices (MD), see mdadm(8) or even loop devices, see losetup(8)), creating volume groups (kind of virtual disks) from one or more physical volumes and creating one or more logical volumes (kind of logical partitions) in volume groups. diff --git a/test/api/dbustest.sh b/test/api/dbustest.sh index d69c0e89c..1398a2582 100644 --- a/test/api/dbustest.sh +++ b/test/api/dbustest.sh @@ -17,7 +17,7 @@ SKIP_WITH_CLVMD=1 . lib/inittest -# Unsupported with valgrid testing +# Unsupported with valgrind testing test "${LVM_VALGRIND:-0}" -eq 0 || skip "Unsupported with valgrind" # NOTE: Some tests, namely anything with vdo, and diff --git a/test/lib/aux.sh b/test/lib/aux.sh index 8dc383c29..65e62c51e 100644 --- a/test/lib/aux.sh +++ b/test/lib/aux.sh @@ -413,7 +413,7 @@ teardown_devs_prefixed() { #local listdevs=( $(dm_info name,open --sort open,name | grep "$prefix.*:0") ) #dmsetup remove --deferred ${listdevs[@]%%:0} || touch REMOVE_FAILED - # 2nd. loop is trying --force removal which can possibly 'unstuck' some bloked operations + # 2nd. loop is trying --force removal which can possibly 'unstuck' some blocked operations for i in 0 1; do test "$i" = 1 && test "$stray" = 0 && break # no stray device removal local progress=1 @@ -437,7 +437,7 @@ teardown_devs_prefixed() { force="" fi - # Succesfull 'remove' signals progress + # Successfully 'remove' signals progress dmsetup remove $force "$DM_NAME" --mangle none && progress=1 done @@ -731,7 +731,7 @@ prepare_real_devs() { # A drop-in replacement for prepare_loop() that uses scsi_debug to create # a ramdisk-based SCSI device upon which all LVM devices will be created -# - scripts must take care not to use a DEV_SIZE that will enduce OOM-killer +# - scripts must take care not to use a DEV_SIZE that will induce OOM-killer prepare_scsi_debug_dev() { local DEV_SIZE=$1 shift # rest of params directly passed to modprobe @@ -792,7 +792,7 @@ mdadm_create() { mddev=/dev/md${devid} mdadm --create "$mddev" "$@" || { - # Some older 'mdadm' version managed to open and close devices internaly + # Some older 'mdadm' version managed to open and close devices internally # and reporting non-exclusive access on such device # let's just skip the test if this happens. # Note: It's pretty complex to get rid of consequences @@ -842,7 +842,7 @@ mdadm_assemble() { # use this 'trick' to slow down mdadm which otherwise # is racing with udev rule since mdadm internally # opens and closes raid leg devices in RW mode and then - # tries to get exlusive access to the leg device during + # tries to get exclusive access to the leg device during # insertion to kernel and fails during assembly # There can be some other affected version of mdadm. STRACE="strace -f -o /dev/null" @@ -949,7 +949,7 @@ cleanup_idm_context() { # TODO: add support for parametrized [OPTION] usage (Not usable ATM) # TODO: -bs blocksize (defaults 512K) # TODO: -count count/length (defaults to whole device, otherwise in BS units) -# TODO: -seek offset/seek (defaults 0, begining of zeroing area in BS unit) +# TODO: -seek offset/seek (defaults 0, beginning of zeroing area in BS unit) clear_devs() { local bs= local count= @@ -981,8 +981,8 @@ clear_devs() { # # corrupt device content # $1 file_path -# $2 string/pattern search for curruption -# $3 string/pattern replacing/corruptiong +# $2 string/pattern search for corruption +# $3 string/pattern replacing/corrupting corrupt_dev() { local a @@ -1193,10 +1193,10 @@ common_dev_() { } # Replace linear PV device with its 'delayed' version -# Could be used to more deterministicaly hit some problems. +# Could be used to more deterministically hit some problems. # Parameters: {device path} [read delay ms] [write delay ms] [offset[:[size]]]... # Original device is restored when both delay params are 0 (or missing). -# If the size is missing, the remaing portion of device is taken +# If the size is missing, the remaining portion of device is taken # i.e. delay_dev "$dev1" 0 200 256: delay_dev() { if test ! -f HAVE_DM_DELAY ; then @@ -1708,22 +1708,22 @@ raid456_replace_works() { # refcount is simply decremented. I don't even think the sysfs aliases are # ever removed... # 4) kmem_cache_create(name="foo-a") -# - This FAILS because kmem_cache_sanity_check colides with the existing +# - This FAILS because kmem_cache_sanity_check collides with the existing # name ("foo-a") associated with the non-removed cache. # # This is a problem for RAID (specifically dm-raid) because the name used # for the kmem_cache_create is ("raid%d-%p", level, mddev). If the cache # persists for long enough, the memory address of an old mddev will be # reused for a new mddev - causing an identical formulation of the cache -# name. Even though kmem_cache_destory had long ago been used to delete +# name. Even though kmem_cache_destroy had long ago been used to delete # the old cache, the merging of caches has cause the name and cache of that -# old instance to be preserved and causes a colision (and thus failure) in +# old instance to be preserved and causes a collision (and thus failure) in # kmem_cache_create(). I see this regularly in testing the following # kernels: # -# This seems to be finaly resolved with this patch: +# This seems to be finally resolved with this patch: # http://www.redhat.com/archives/dm-devel/2014-March/msg00008.html -# so we need to put here exlusion for kernes which do trace SLUB +# so we need to put here exclusion for kernels which do trace SLUB # case "$(uname -r)" in 3.6.*.fc18.i686*|3.6.*.fc18.x86_64) return 1 ;; @@ -1838,7 +1838,7 @@ version_at_least() { test "$revision" -ge "$3" 2>/dev/null || return 1 } # -# Check wheter kernel [dm module] target exist +# Check whether kernel [dm module] target exist # at least in expected version # # [dm-]target-name major minor revision @@ -1916,7 +1916,7 @@ have_vdo() { target_at_least dm-vdo "$@" vdoformat=$(lvm lvmconfig --typeconfig full --valuesonly global/vdo_format_executable || true) - # Remove surrouding "" around string + # Remove surrounding "" around string # TODO: lvmconfig should have an option to give this output directly vdoformat=${vdoformat//\"} test -x "$vdoformat" || { echo "No executable to format VDO \"$vdoformat\"..."; return 1; } @@ -2003,7 +2003,7 @@ have_tool_at_least() { version_at_least "$version" "$@" } -# check if lvm shell is build-in (needs readline) +# check if lvm shell is built-in (needs readline) have_readline() { echo version | lvm &>/dev/null } @@ -2078,7 +2078,7 @@ hold_device_open() { sleep "$sec" < "$DM_DEV_DIR/$vgname/$lvname" >/dev/null 2>&1 & SLEEP_PID=$! - # wait till device is openned + # wait till device is opened for i in $(seq 1 50) ; do if test "$(dmsetup info --noheadings -c -o open "$vgname"-"$lvname")" -ne 0 ; then echo "$SLEEP_PID" diff --git a/test/lib/brick-shelltest.h b/test/lib/brick-shelltest.h index fe84fb22c..4c70f543a 100644 --- a/test/lib/brick-shelltest.h +++ b/test/lib/brick-shelltest.h @@ -114,7 +114,7 @@ public: //IosFlagSaver& operator= (const IosFlagSaver& rhs) = delete; private: - IosFlagSaver(const IosFlagSaver &rhs); // disable copy contructore + IosFlagSaver(const IosFlagSaver &rhs); // disable copy constructor IosFlagSaver& operator= (const IosFlagSaver& rhs); // old way std::ostream& ios; @@ -172,7 +172,7 @@ public: os << std::right << std::setw( 2 ) << std::setfill( ' ' ) << t.ts.tv_sec / 60 << ":" << std::setw( 2 ) << std::setfill( '0' ) << t.ts.tv_sec % 60 << "." - << std::setw( 3 ) << t.ts.tv_nsec / 1000000; // use miliseconds ATM + << std::setw( 3 ) << t.ts.tv_nsec / 1000000; // use milliseconds ATM return os; } }; @@ -620,7 +620,7 @@ struct Source { * On RHEL5 box this code busy-loops here, while * parent process no longer writes anything. * - * Unclear why 'select()' is anouncing available + * Unclear why 'select()' is announcing available * data, while we read 0 bytes with errno == 0. * * Temporarily resolved with usleep() instead of loop. diff --git a/test/lib/check.sh b/test/lib/check.sh index 9230832aa..e441ee93b 100644 --- a/test/lib/check.sh +++ b/test/lib/check.sh @@ -438,7 +438,7 @@ raid_leg_status() { local st local val - # Ignore inconsisten raid status 0/xxxxx idle + # Ignore inconsistent raid status 0/xxxxx idle for i in {100..0} ; do st=( $(dmsetup status --noflush "$1-$2") ) || die "Unable to get status of $vg/$lv1" case "${st[7]}" in diff --git a/test/lib/inittest.sh b/test/lib/inittest.sh index 920cfae27..78b4e9d9c 100644 --- a/test/lib/inittest.sh +++ b/test/lib/inittest.sh @@ -82,7 +82,7 @@ TESTOLDPWD=$(pwd) COMMON_PREFIX="LVMTEST" PREFIX="${COMMON_PREFIX}$$" -# Check we are not conflickting with some exiting setup +# Check we are not conflicting with some exiting setup if test -z "$SKIP_ROOT_DM_CHECK" ; then d=$(dmsetup info -c -o name --noheadings --rows -S "suspended=Suspended||name=~${PREFIX}[^0-9]") case "$d" in diff --git a/test/shell/component-mirror.sh b/test/shell/component-mirror.sh index b565c9806..2dceedf21 100644 --- a/test/shell/component-mirror.sh +++ b/test/shell/component-mirror.sh @@ -57,7 +57,7 @@ lvcreate -aey -L10 -n $lv2 $vg not lvconvert -y -s $vg/$lv1 $lv2 |& tee err grep "Cannot use" err -# Cannot be splitted +# Cannot be split not lvconvert --splitmirrors 1 -n split $vg/$lv1 |& tee err grep "Cannot convert" err diff --git a/test/shell/component-thin.sh b/test/shell/component-thin.sh index ddadd0f8e..8433da684 100644 --- a/test/shell/component-thin.sh +++ b/test/shell/component-thin.sh @@ -36,7 +36,7 @@ done lvs -a -# When component LVs are active, thin-pool cannot be actived +# When component LVs are active, thin-pool cannot be activated not lvcreate -V20 $vg/pool # Rremoval of thin volumes should not need to activate thin-pool. diff --git a/test/unit/percent_t.c b/test/unit/percent_t.c index 3575e12b3..bb9a91544 100644 --- a/test/unit/percent_t.c +++ b/test/unit/percent_t.c @@ -38,7 +38,7 @@ static void test_percent_100(void *fixture) T_ASSERT_EQUAL(strcmp(buf, "100.00"), 0); (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_float(n_100)); - T_ASSERT_NOT_EQUAL(strcmp(buf, "99.99"), 0); /* Would like to gett */ + T_ASSERT_NOT_EQUAL(strcmp(buf, "99.99"), 0); /* Would like to get */ (void) dm_snprintf(buf, sizeof(buf), "%.2f", dm_percent_to_round_float(n_100, 2)); T_ASSERT_EQUAL(strcmp(buf, "99.99"), 0); diff --git a/tools/command-lines.in b/tools/command-lines.in index 880ba0079..eea1933aa 100644 --- a/tools/command-lines.in +++ b/tools/command-lines.in @@ -55,7 +55,7 @@ # LV_raid represents any raidN. LV_type1_type2_type3 when the LV is # limited to multiple specific types. # -# Note that two commands whose required paramters differ only by +# Note that two commands whose required parameters differ only by # the LV types they accept are ambiguous. That is, they cannot be # distinguished by just looking at the command, but require reading # the VG to find the LV type. So, command definitions that differ @@ -69,7 +69,7 @@ # If Select is included in pos_arg, it means that the pos_arg # may be empty if the --select option is used. # -# --size and --extents are interchangable, but only --size is used +# --size and --extents are interchangeable, but only --size is used # in these definitions to keep them simpler. --extents is # automatically included and recognized as an alternative to --size. # @@ -99,7 +99,7 @@ # # used in definitions below (equivalent but not used in definitions) # mirrorlog core (not corelog) -# resizeable (resizable or allocation) +# resizable (resizable or allocation) # allocatable (allocation) # activate (available) # rebuild (raidrebuild) @@ -119,7 +119,7 @@ # the same thing, but are alternate syntaxes can share the same ID, # in which case the implementation would have to sort out which # args to look at for the required parameters. Or, the two commands -# could use differnet IDs, in which case the implementation would +# could use different IDs, in which case the implementation would # know where to look for each parameter. # # DESC: A description of the command. The "DESC:" tags will be @@ -190,7 +190,7 @@ # To use this set of options, include it on the OO: line, e.g. # OO: --example, OO_NAME # -# which is expaneded to +# which is expanded to # OO: --example, --foo, --bar String # # Including OO_NAME after a command name on the required line @@ -272,7 +272,7 @@ RULE: --alloc --contiguous --metadataprofile --persistent --profile --readahead RULE: --alloc --discards --zero --cachemode --cachepolicy --cachesettings not lv_is_partial # It's unfortunate that activate needs to be optionally allowed here, -# like above, it was previouly allowed in combination. +# like above, it was previously allowed in combination. lvchange --resync VG|LV_raid_mirror|Tag|Select ... OO: --activate Active, OO_LVCHANGE @@ -750,7 +750,7 @@ FLAGS: SECONDARY_SYNTAX --- -# NB: an unsual use of position args here, the first pos arg +# NB: an unusual use of position args here, the first pos arg # (will become origin LV) is not passed to process_each, # the second pos arg (will become cow LV) is given to # process_each. Because the first pos LV is not handled @@ -779,7 +779,7 @@ AUTOTYPE: snapshot --- -# lvconvert repair/replace utilitiles +# lvconvert repair/replace utilities # Create a new command set for these and migrate them out of lvconvert? # FIXME: use specific option names to distinguish these two diff --git a/tools/command.h b/tools/command.h index 9c9a087d9..a254a6932 100644 --- a/tools/command.h +++ b/tools/command.h @@ -51,7 +51,7 @@ struct command_name_args { }; /* - * Command defintion + * Command definition * * A command is defined in terms of a command name, * required options (+args), optional options (+args), diff --git a/tools/lvchange.c b/tools/lvchange.c index 137f1a238..459e25696 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -226,7 +226,7 @@ static int _lvchange_activate(struct cmd_context *cmd, struct logical_volume *lv /* * FIXME: lvchange should defer background polling in a similar * way as vgchange does. First activate all relevant LVs - * initate background polling later (for all actually + * initiate background polling later (for all actually * activated LVs). So we can avoid duplicate background * polling for pvmove (2 or more locked LVs on single pvmove * LV) @@ -993,7 +993,7 @@ static int _lvchange_writemostly(struct logical_volume *lv, /* * Prohibit writebehind and writebehind during synchronization. * - * FIXME: we can do better once we can distingush between + * FIXME: we can do better once we can distinguish between * an initial sync after a linear -> raid1 upconversion * and any later additions of legs, requested resyncs * via lvchange or leg repairs/replacements. @@ -1321,7 +1321,7 @@ static int _option_requires_direct_commit(int opt_enum) } /* - * For each lvchange command definintion: + * For each lvchange command definition: * * lvchange_foo_cmd(cmd, argc, argv); * . set cmd fields that apply to "foo" @@ -1540,7 +1540,7 @@ static int _lvchange_properties_single(struct cmd_context *cmd, doit_total += doit; - /* Bail out if no options wwre found or any processing of an option in the second group failed */ + /* Bail out if no options were found or any processing of an option in the second group failed */ if (!docmds || docmds != doit_total) return_ECMD_FAILED; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index d2647be31..60b93e89f 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -485,7 +485,7 @@ static struct dm_list *_failed_pv_list(struct volume_group *vg) * But we only want remove these which are output of repair, * Do not count these which are already empty here. * FIXME: code should traverse PV in LV not in whole VG. - * FIXME: layer violation? should it depend on vgreduce --removemising? + * FIXME: layer violation? should it depend on vgreduce --removemissing? */ if (pvl->pv->pe_alloc_count == 0) continue; @@ -662,7 +662,7 @@ static int _lv_update_log_type(struct cmd_context *cmd, } /* - * Reomove missing and empty PVs from VG, if are also in provided list + * Remove missing and empty PVs from VG, if are also in provided list */ static void _remove_missing_empty_pv(struct volume_group *vg, struct dm_list *remove_pvs) { @@ -2214,7 +2214,7 @@ static int _lvconvert_merge_old_snapshot(struct cmd_context *cmd, * activation if either the origin or snapshot LV are currently * open. * - * FIXME testing open_count is racey; snapshot-merge target's + * FIXME testing open_count is racy; snapshot-merge target's * constructor and DM should prevent appropriate devices from * being open. */ @@ -2450,7 +2450,7 @@ static int _lvconvert_thin_pool_repair(struct cmd_context *cmd, log_warn("WARNING: Cannot read output from %s %s.", thin_dump, pms_path); else { /* - * Scan only the 1st. line for transation id. + * Scan only the 1st. line for transaction id. * Watch out, if the thin_dump format changes */ if (fgets(meta_path, sizeof(meta_path), f) && @@ -2950,7 +2950,7 @@ static int _lvconvert_swap_pool_metadata(struct cmd_context *cmd, * metadata_lv is currently an independent LV with its own lockd lock allocated. * A pool metadata LV does not have its own lockd lock (only the pool LV does.) * Since the LV name and uuid are exchanged between the old and new metadata LVs, - * the lvmlockd lock can just be moved between the two LVs, so the new indepdent + * the lvmlockd lock can just be moved between the two LVs, so the new independent * LV (former metadata LV) gets the lock that was used for old independent LV. */ if (vg_is_shared(vg) && metadata_lv->lock_args) { @@ -3382,7 +3382,7 @@ static int _lvconvert_to_pool(struct cmd_context *cmd, /* * Before starting a real conversion, prepare _pmspare volume. - * If there is already one presend in a VG, make sure the size is right + * If there is already one present in a VG, make sure the size is right */ if (!handle_pool_metadata_spare(vg, metadata_lv->le_count, use_pvh, pool_metadata_spare)) { log_error("Failed to set up spare metadata LV for pool."); @@ -4241,7 +4241,7 @@ int lvconvert_combine_split_snapshot_cmd(struct cmd_context *cmd, int argc, char int vglv_sz; /* - * Hack to accomodate an old parsing quirk that allowed the + * Hack to accommodate an old parsing quirk that allowed the * the VG name to be attached to only the LV in arg pos 1, * i.e. lvconvert -s vgname/lvname lvname * @@ -5673,7 +5673,7 @@ static int _lvconvert_detach_writecache(struct cmd_context *cmd, /* * --cachesettings cleaner=0 means to skip the use of the cleaner * and go directly to detach which will use a flush message. - * (This is currently the only cachesetting used during detach.) + * (This is currently the only cachesettings used during detach.) */ if (settings.cleaner_set && !settings.cleaner) { log_print_unless_silent("Detaching writecache skipping cleaner..."); @@ -5720,7 +5720,7 @@ static int _lvconvert_detach_writecache(struct cmd_context *cmd, /* * The cache may have been nearly clean and will be empty with - * a short dely. + * a short delay. */ usleep(10000); if (lv_writecache_is_clean(cmd, lv, NULL)) { diff --git a/tools/lvconvert_poll.c b/tools/lvconvert_poll.c index c004e29b4..276380c9a 100644 --- a/tools/lvconvert_poll.c +++ b/tools/lvconvert_poll.c @@ -89,7 +89,7 @@ int swap_lv_identifiers(struct cmd_context *cmd, return 1; } -/* Finalise merging of lv into merge_lv */ +/* Finalize merging of lv into merge_lv */ int thin_merge_finish(struct cmd_context *cmd, struct logical_volume *merge_lv, struct logical_volume *lv) @@ -204,5 +204,5 @@ progress_t poll_thin_merge_progress(struct cmd_context *cmd, return PROGRESS_CHECK_FAILED; } - return PROGRESS_FINISHED_ALL; /* Merging happend */ + return PROGRESS_FINISHED_ALL; /* Merging happened */ } diff --git a/tools/lvcreate.c b/tools/lvcreate.c index 606164bac..110867c4a 100644 --- a/tools/lvcreate.c +++ b/tools/lvcreate.c @@ -107,7 +107,7 @@ static int _lvcreate_name_params(struct cmd_context *cmd, } else { /* * Gambling here, could be cache pool or cache origin, - * detection is possible after openning vg, + * detection is possible after opening vg, * yet we need to parse pool args */ lp->pool_name = lp->origin_name; @@ -539,7 +539,7 @@ static int _read_raid_params(struct cmd_context *cmd, } /* - * FIXME: _check_raid_parameters devides by 2, which + * FIXME: _check_raid_parameters divides by 2, which * needs to change if we start supporting * odd numbers of stripes with raid10 */ @@ -674,7 +674,7 @@ static int _read_mirror_and_raid_params(struct cmd_context *cmd, /* Default to 2 mirrored areas if '--type mirror|raid1|raid10' */ lp->mirrors = seg_is_mirrored(lp) ? 2 : 1; - /* FIMXE: raid10 check has to change once we support data copies and odd numbers of stripes */ + /* FIXME: raid10 check has to change once we support data copies and odd numbers of stripes */ if (seg_is_raid10(lp) && lp->mirrors * lp->stripes > max_images) { log_error("Only up to %u stripes in %s supported currently.", max_images / lp->mirrors, lp->segtype->name); @@ -738,7 +738,7 @@ static int _read_vdo_params(struct cmd_context *cmd, !lp->pool_data_vdo) return 1; - // prefiling settings here + // prefilling settings here if (!fill_vdo_target_params(cmd, &lp->vcp.vdo_params, &lp->vdo_pool_header_size, NULL)) return_0; @@ -1578,7 +1578,7 @@ static int _check_pool_parameters(struct cmd_context *cmd, if (lp->pool_name) { if (!seg_is_cache(lp) && !apply_lvname_restrictions(lp->pool_name)) return_0; - /* We could check existance only when we have vg */ + /* We could check existence only when we have vg */ if (vg && find_lv(vg, lp->pool_name)) { log_error("Logical volume %s already exists in Volume group %s.", lp->pool_name, vg->name); diff --git a/tools/lvm.c b/tools/lvm.c index 3a7e6dc6c..b0bbdd8f2 100644 --- a/tools/lvm.c +++ b/tools/lvm.c @@ -239,7 +239,7 @@ int lvm_shell(struct cmd_context *cmd, struct cmdline_context *cmdline) /* * Note: If we need to output the log report before we get to the dm_report_group_output_and_pop_all * at the end of this loop, like hitting a failure situation before we execute the command itself, - * don't forget to directly call dm_report_group_output_and_pop_all, otherwise no log meesage will + * don't forget to directly call dm_report_group_output_and_pop_all, otherwise no log message will * appear on output (for output formats other than 'basic'). * * Obviously, you can't output the 'log report' if the error is in initializing or setting diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index 1b2f7f47c..7209ebd9b 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -1440,7 +1440,7 @@ static int _command_required_opt_matches(struct cmd_context *cmd, int ci, int ro goto check_val; /* - * For some commands, --size and --extents are interchangable, + * For some commands, --size and --extents are interchangeable, * but command[] definitions use only --size. */ if ((opt_enum == size_ARG) && arg_is_set(cmd, extents_ARG) && @@ -1887,7 +1887,7 @@ static struct command *_find_command(struct cmd_context *cmd, const char *path, /* * If the user provided a positional arg that is not accepted by - * the mached command, then fail. + * the matched command, then fail. * * If the last required_pos_arg or the last optional_pos_arg may repeat, * then there won't be unused positional args. @@ -3039,7 +3039,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) command_fn fn; /* Avoid excessive access to /etc/localtime and set TZ variable for glibc - * so it does not need to check /etc/localtime everytime that needs that info */ + * so it does not need to check /etc/localtime every time that needs that info */ if (!getenv("TZ")) setenv("TZ", ":/etc/localtime", 0); @@ -3149,7 +3149,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) } if (arg_is_set(cmd, config_ARG) || !cmd->initialized.config || config_files_changed(cmd)) { - /* Reinitialise various settings inc. logging, filters */ + /* Reinitialize various settings inc. logging, filters */ if (!refresh_toolcontext(cmd)) { if ((config_string_cft = remove_config_tree_by_source(cmd, CONFIG_STRING))) dm_config_destroy(config_string_cft); @@ -3609,7 +3609,7 @@ int lvm2_main(int argc, char **argv) if (!(cmd = init_lvm(0, 0, 0))) return EINIT_FAILED; - /* Store original argv location so we may customise it if we become a daemon */ + /* Store original argv location so we may customize it if we become a daemon */ cmd->argv = argv; /* diff --git a/tools/lvmdevices.c b/tools/lvmdevices.c index 475bd37a9..ebd978a56 100644 --- a/tools/lvmdevices.c +++ b/tools/lvmdevices.c @@ -522,7 +522,7 @@ restart4: * Entries remaining on old/new lists can't be directly * correlated by loops above. * Just print remaining old entries as being removed and - * remaing new entries as being added. + * remaining new entries as being added. * If we find specific cases that reach here, we may * want to add loops above to detect and print them * more specifically. @@ -789,7 +789,7 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv) goto_bad; /* - * addev will add a device to devices_file even if that device + * adddev will add a device to devices_file even if that device * is excluded by filters. */ diff --git a/tools/lvresize.c b/tools/lvresize.c index 4431a886f..7c87d8ffb 100644 --- a/tools/lvresize.c +++ b/tools/lvresize.c @@ -99,7 +99,7 @@ static int _lvresize_params(struct cmd_context *cmd, struct lvresize_params *lp) #ifdef HAVE_BLKID_SUBLKS_FSINFO /* * When the libblkid fs info feature is available, use the - * the newer fs resizing capabability unless the older + * the newer fs resizing capability unless the older * fsadm-based resizing is requested with --fs resize_fsadm. */ if ((str = arg_str_value(cmd, fs_ARG, NULL))) { diff --git a/tools/man-generator.c b/tools/man-generator.c index 9202215a6..286dbf719 100644 --- a/tools/man-generator.c +++ b/tools/man-generator.c @@ -110,7 +110,7 @@ static inline int headings_arg(struct cmd_context *cmd __attribute__((unused)), #include "command_enums.h" #include "command.c" -static const size_t _LONG_LINE = 42; /* length of line that neededs .nh .. .hy */ +static const size_t _LONG_LINE = 42; /* length of line that needed .nh .. .hy */ static const char *_lvt_enum_to_name(int lvt_enum) { @@ -124,7 +124,7 @@ static int _get_val_enum(const struct command_name *cname, int opt_enum) /* * FIXME: this just replicates the val usage strings * that officially lives in vals.h. Should there - * be some programatic way to add man markup to + * be some programmatic way to add man markup to * the strings in vals.h without replicating it? * Otherwise, this function has to be updated in * sync with any string changes in vals.h @@ -1067,7 +1067,7 @@ static void _print_man_all_options_desc(const struct command_name *cname) /* printf(".\n.TP\n"); * ATM HTML rendering can't handle HP and TP mixing properly * so still keeping .HP usage for this case - * untill some better workaround is found + * until some better workaround is found * .TP does not need .br */ printf(".\n.HP\n"); adl = 0; @@ -1421,7 +1421,7 @@ static int _print_man(char *name, char *des_file, int secondary) printf(".br\n"); } - /* listing them all when there's only 1 or 2 is just repetative */ + /* listing them all when there's only 1 or 2 is just repetitive */ if (cna->variants > 2) { printf(".P\n"); _print_man_all_options_list(cname); diff --git a/tools/polldaemon.c b/tools/polldaemon.c index 3a9211768..d6fc43671 100644 --- a/tools/polldaemon.c +++ b/tools/polldaemon.c @@ -701,7 +701,7 @@ int poll_daemon(struct cmd_context *cmd, unsigned background, if (lvmpolld_use()) return _lvmpoll_daemon(cmd, id, &parms); - /* classical polling allows only PMVOVE or 0 values */ + /* classical polling allows only PVMOVE or 0 values */ parms.lv_type &= PVMOVE; return _poll_daemon(cmd, id, &parms); } diff --git a/tools/pvcreate.c b/tools/pvcreate.c index a1ef0e9e1..2f6b25d15 100644 --- a/tools/pvcreate.c +++ b/tools/pvcreate.c @@ -16,7 +16,7 @@ #include "tools.h" /* - * Intial sanity checking of recovery-related command-line arguments. + * Initial sanity checking of recovery-related command-line arguments. * These args are: --restorefile, --uuid, and --physicalvolumesize * * Output arguments: diff --git a/tools/pvmove.c b/tools/pvmove.c index a43ad006e..b4ff0c85c 100644 --- a/tools/pvmove.c +++ b/tools/pvmove.c @@ -490,7 +490,7 @@ static struct logical_volume *_set_up_pvmove_lv(struct cmd_context *cmd, lv_skipped = 1; log_print_unless_silent("Skipping LV %s which is not locally exclusive%s.", display_lvname(lv), - /* Report missing cmirrord cases that matterd. + /* Report missing cmirrord cases that mattered. * With exclusive LV types cmirrord would not help. */ (*exclusive && !lv_is_origin(holder) && diff --git a/tools/pvscan.c b/tools/pvscan.c index a093fbcf0..238b3789c 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -1272,7 +1272,7 @@ static int _online_devs(struct cmd_context *cmd, int do_all, struct dm_list *pvs * device and using that to get the struct dev and dev_name. * The user could pass this list of devices to --devices * to optimize a subsequent command (activation) on the VG. - * Just call set_pv_devices_online (if not done othewise) + * Just call set_pv_devices_online (if not done otherwise) * since that finds the devs. */ } @@ -1621,7 +1621,7 @@ static int _pvscan_cache_args(struct cmd_context *cmd, int argc, char **argv, /* * Scan devs to populate lvmcache info, which includes the mda info that's * needed to read vg metadata in the next step. The _cached variant of - * label_scan is used so the exsting bcache data from label_read_pvid above + * label_scan is used so the existing bcache data from label_read_pvid above * can be reused (although more data may need to be read depending on how * much of the metadata was covered by reading the pvid.) */ diff --git a/tools/reporter.c b/tools/reporter.c index bee1c271c..6154f4b5e 100644 --- a/tools/reporter.c +++ b/tools/reporter.c @@ -690,7 +690,7 @@ int report_for_selection(struct cmd_context *cmd, * * The selection_handle is still reused so we can track * whether any of the items the top-level one is composed - * of are still selected or not unerneath. Do not destroy + * of are still selected or not underneath. Do not destroy * this selection handle - it needs to be passed to upper * layers to check the overall selection status. */ diff --git a/tools/toollib.c b/tools/toollib.c index e34f1e21d..fad3a61fc 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -295,7 +295,7 @@ static int _ignore_vg(struct cmd_context *cmd, } /* - * This functiona updates the "selected" arg only if last item processed + * This function updates the "selected" arg only if last item processed * is selected so this implements the "whole structure is selected if * at least one of its items is selected". */ @@ -826,7 +826,7 @@ int lv_change_activate(struct cmd_context *cmd, struct logical_volume *lv, * autoactivation will happen to a VG on a running system and may be * mixing with user commands, so the end result is unpredictable. * - * It's possible that we might want a config setting for usersto + * It's possible that we might want a config setting for users to * disable secondary autoactivations. Once a system is up, the * user may want to take charge of activation changes to the VG * and not have the system autoactivation interfere. @@ -1331,7 +1331,7 @@ int get_vdo_settings(struct cmd_context *cmd, DO_ONLINE(use_compression); DO_ONLINE(use_deduplication); - // Settings bellow cannot be changed with lvchange command + // Settings below cannot be changed with lvchange command is_lvchange = checked_lvchange; DO_OFFLINE(index_memory_size_mb); @@ -4361,7 +4361,7 @@ static int _process_other_devices(struct cmd_context *cmd, /* * Pretend that each device is a PV with dummy values. - * FIXME Formalise this extension or find an alternative. + * FIXME Formalize this extension or find an alternative. */ memset(&pv_dummy, 0, sizeof(pv_dummy)); @@ -4771,7 +4771,7 @@ int process_each_pv(struct cmd_context *cmd, /* * When processing a specific VG name, warn if it's inconsistent and * print an error if it's not found. Otherwise we're processing all - * VGs, in which case the command doesn't care if the VG is inconsisent + * VGs, in which case the command doesn't care if the VG is inconsistent * or not found; it just wants to skip that VG. (It may be not found * if it was removed between creating the list of all VGs and then * processing each VG. diff --git a/tools/tools.h b/tools/tools.h index fbf5af93b..57a42f411 100644 --- a/tools/tools.h +++ b/tools/tools.h @@ -82,7 +82,7 @@ struct arg_value_group_list { void usage(const char *name); -/* the argument verify/normalise functions */ +/* the argument verify/normalize functions */ int yes_no_arg(struct cmd_context *cmd, struct arg_values *av); int activation_arg(struct cmd_context *cmd, struct arg_values *av); int cachemetadataformat_arg(struct cmd_context *cmd, struct arg_values *av); diff --git a/tools/vals.h b/tools/vals.h index d8a418c01..9168a327f 100644 --- a/tools/vals.h +++ b/tools/vals.h @@ -45,7 +45,7 @@ * c: the name used to reference this value in command defs * d: what to display in usage output for this value * - * command defintions will use --option NAME, where NAME + * command definitions will use --option NAME, where NAME * is shown in val() field c. NAME will be translated to * foo_VAL enum in field a, which is used in commands[] * structs. diff --git a/tools/vgchange.c b/tools/vgchange.c index 0230737b7..39a8b736f 100644 --- a/tools/vgchange.c +++ b/tools/vgchange.c @@ -144,7 +144,7 @@ static int _activate_lvs_in_vg(struct cmd_context *cmd, struct volume_group *vg, count, vg->name); /* - * After sucessfull activation we need to initialise polling + * After successful activation we need to initialise polling * for all activated LVs in a VG. Possible enhancement would * be adding --poll y|n cmdline option for pvscan and call * init_background_polling routine in autoactivation handler. @@ -762,7 +762,7 @@ static int _vgchange_single(struct cmd_context *cmd, const char *vg_name, !_vgchange_monitoring(cmd, vg)) return_ECMD_FAILED; - /* When explicitelly specified --poll */ + /* When explicitly specified --poll */ if (arg_is_set(cmd, poll_ARG) && !vgchange_background_polling(cmd, vg)) return_ECMD_FAILED; @@ -1454,7 +1454,7 @@ int vgchange_lock_start_stop_cmd(struct cmd_context *cmd, int argc, char **argv) * to do, so disable VG locks. Try to acquire the global lock sh to * validate the cache (if no gl is available, lockd_gl will force a * cache validation). If the global lock is available, it can be - * benficial to hold sh to serialize lock-start with vgremove of the + * beneficial to hold sh to serialize lock-start with vgremove of the * same VG from another host. */ if (arg_is_set(cmd, lockstart_ARG)) { diff --git a/tools/vgck.c b/tools/vgck.c index 4e797e717..d69582272 100644 --- a/tools/vgck.c +++ b/tools/vgck.c @@ -29,7 +29,7 @@ static int _update_metadata_single(struct cmd_context *cmd __attribute__((unused /* * Simply calling vg_write can correct or clean up various things: - * . some mda's have old versions of metdadata + * . some mda's have old versions of metadata * . wipe outdated PVs * . fix pv_header used flag and version * . strip historical lvs diff --git a/tools/vgimportdevices.c b/tools/vgimportdevices.c index 061f03970..badb51e02 100644 --- a/tools/vgimportdevices.c +++ b/tools/vgimportdevices.c @@ -86,7 +86,7 @@ static int _vgimportdevices_single(struct cmd_context *cmd, /* * Writes the device_id of each PV into the vg metadata. - * This is not a critial step and should not influence + * This is not a critical step and should not influence * the result of the command. */ if (updated_pvs) { @@ -175,7 +175,7 @@ static void _clear_rootvg_auto(struct cmd_context *cmd) * If there are duplicate PVIDs related to VG it will do nothing, * the user would need to add the PVs they want with lvmdevices --add. * - * vgimportdevices -a (no vg arg) will import all accesible VGs. + * vgimportdevices -a (no vg arg) will import all accessible VGs. */ int vgimportdevices(struct cmd_context *cmd, int argc, char **argv) @@ -254,7 +254,7 @@ int vgimportdevices(struct cmd_context *cmd, int argc, char **argv) * new devs to add to it, but we do want devices file entries on * use_devices so we can update and write out that list. * - * Ususally when devices file is enabled, we use filter-deviceid and + * Usually when devices file is enabled, we use filter-deviceid and * skip filter-regex. In this import case it's reversed, and we skip * filter-deviceid and use filter-regex. */ diff --git a/tools/vgremove.c b/tools/vgremove.c index 3ccb63d53..1026a61c8 100644 --- a/tools/vgremove.c +++ b/tools/vgremove.c @@ -34,7 +34,7 @@ static int _vgremove_single(struct cmd_context *cmd, const char *vg_name, struct processing_handle void_handle = {0}; /* - * Single force is equivalent to sinle --yes + * Single force is equivalent to single --yes * Even multiple --yes are equivalent to single --force * When we require -ff it cannot be replaces with -f -y */ diff --git a/tools/vgsplit.c b/tools/vgsplit.c index c7f4b8af4..2f2b89b06 100644 --- a/tools/vgsplit.c +++ b/tools/vgsplit.c @@ -44,7 +44,7 @@ static int _lv_tree_move(struct dm_list *lvh, struct lv_segment *seg = first_seg(lv); struct dm_list *lvh1; - /* Update the list pointer refering to the item moving to @vg_to. */ + /* Update the list pointer referring to the item moving to @vg_to. */ if (lvh == *lvht) *lvht = dm_list_next(lvh, lvh); diff --git a/udev/13-dm-disk.rules.in b/udev/13-dm-disk.rules.in index b53bb62de..03ea203ee 100644 --- a/udev/13-dm-disk.rules.in +++ b/udev/13-dm-disk.rules.in @@ -46,7 +46,7 @@ ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_GPT_AUTO_ROOT}=="1", SYMLINK+="gpt # Add inotify watch to track changes on this device. # Using the watch rule is not optimal - it generates a lot of spurious # and useless events whenever the device opened for read-write is closed. -# The best would be to generete the event directly in the tool changing +# The best would be to generate the event directly in the tool changing # relevant information so only relevant events will be processed # (like creating a filesystem, changing filesystem label etc.). #