1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: typos in logging

Fixes various typos in printed/logged messages.
This commit is contained in:
Zdenek Kabelac 2024-08-29 23:06:04 +02:00
parent 643bc26595
commit 7da47cea35
36 changed files with 54 additions and 54 deletions

View File

@ -87,7 +87,7 @@ int dmeventd_lvm2_init(void)
lvm2_disable_dmeventd_monitoring(_lvm_handle);
/* FIXME Temporary: move to dmeventd core */
lvm2_run(_lvm_handle, "_memlock_inc");
log_debug("lvm plugin initilized.");
log_debug("lvm plugin initialized.");
}
_register_count++;
@ -103,7 +103,7 @@ void dmeventd_lvm2_exit(void)
pthread_mutex_lock(&_register_mutex);
if (!--_register_count) {
log_debug("lvm plugin shuting down.");
log_debug("lvm plugin shutting down.");
lvm2_run(_lvm_handle, "_memlock_dec");
dm_pool_destroy(_mem_pool);
_mem_pool = NULL;

View File

@ -75,7 +75,7 @@ static void _usage(const char *prog, FILE *file)
" -p|--pidfile Set path to the pidfile\n"
" -s|--socket Set path to the communication socket\n"
" -B|--binary Path to lvm2 binary\n"
" -t|--timeout Time to wait in seconds before shutdown on idle (missing or 0 = inifinite)\n\n", prog, prog);
" -t|--timeout Time to wait in seconds before shutdown on idle (missing or 0 = infinite)\n\n", prog, prog);
}
static int _init(struct daemon_state *s)

View File

@ -273,7 +273,7 @@ static void _pdlv_locked_dump(struct buffer *buff, const struct lvmpolld_lv *pdl
buffer_append(buff, tmp);
if (dm_snprintf(tmp, sizeof(tmp), "\t\tpolling_finished=%d\n", pdlv->polling_finished) > 0)
buffer_append(buff, tmp);
if (dm_snprintf(tmp, sizeof(tmp), "\t\terror_occured=%d\n", pdlv->error) > 0)
if (dm_snprintf(tmp, sizeof(tmp), "\t\terror_occurred=%d\n", pdlv->error) > 0)
buffer_append(buff, tmp);
if (dm_snprintf(tmp, sizeof(tmp), "\t\tinit_requests_count=%d\n", pdlv->init_rq_count) > 0)
buffer_append(buff, tmp);

View File

@ -2416,7 +2416,7 @@ static int _get_cookie_sem(uint32_t cookie, int *semid)
break;
case EACCES:
log_error("No permission to access "
"notificaton semaphore identified "
"notification semaphore identified "
"by cookie value %" PRIu32 " (0x%x)",
cookie, cookie);
break;

View File

@ -968,7 +968,7 @@ static int _check_device_not_in_use(const char *name, struct dm_info *info)
} else if (dm_device_has_holders(info->major, info->minor))
reason = "is used by another device";
else if (dm_device_has_mounted_fs(info->major, info->minor))
reason = "constains a filesystem in use";
reason = "contains a filesystem in use";
else
return 1;
@ -4082,7 +4082,7 @@ int dm_tree_node_add_replicator_dev_target(struct dm_tree_node *node,
uint32_t slog_flags,
uint32_t slog_region_size)
{
log_error("Replicator targer is unsupported.");
log_error("Replicator target is unsupported.");
return 0;
}

View File

@ -2430,7 +2430,7 @@ static const char *_reserved_name(struct dm_report *rh,
(reserved->type & DM_REPORT_FIELD_TYPE_MASK) ? "type-specific" : "field-specific",
rh->fields[field_num].id);
else
log_error("Error occured while processing %s reserved value handler for field %s",
log_error("Error occurred while processing %s reserved value handler for field %s",
(reserved->type & DM_REPORT_FIELD_TYPE_MASK) ? "type-specific" : "field-specific",
rh->fields[field_num].id);
}
@ -3496,7 +3496,7 @@ static int _get_reserved_value(struct dm_report *rh, uint32_t field_num,
(rvw->reserved->type) & DM_REPORT_FIELD_TYPE_MASK ? "type-specific" : "field-specific",
rh->fields[field_num].id);
else
log_error("Error occured while processing %s reserved value handler for field %s",
log_error("Error occurred while processing %s reserved value handler for field %s",
(rvw->reserved->type) & DM_REPORT_FIELD_TYPE_MASK ? "type-specific" : "field-specific",
rh->fields[field_num].id);
return 0;
@ -3727,7 +3727,7 @@ error_field_id:
field_id);
goto error;
bad:
log_error(INTERNAL_ERROR "Forbiden NULL custom detected.");
log_error(INTERNAL_ERROR "Forbidden NULL custom detected.");
error:
dm_pool_free(rh->selection->mem, fs);
@ -5105,7 +5105,7 @@ struct dm_report_group *dm_report_group_create(dm_report_group_type_t type, void
dm_list_init(&group->items);
if (!(item = dm_pool_zalloc(mem, sizeof(*item)))) {
log_error("dm_report: faile to allocate root report group item");
log_error("dm_report: failed to allocate root report group item");
goto bad;
}

View File

@ -277,7 +277,7 @@ static int _cache_pool_text_export(const struct lv_segment *seg,
outf(f, "metadata_format = " FMTu32, seg->cache_metadata_format);
break;
default:
log_error(INTERNAL_ERROR "LV %s is using unknown cache metadada format %u.",
log_error(INTERNAL_ERROR "LV %s is using unknown cache metadata format %u.",
display_lvname(seg->lv), seg->cache_metadata_format);
return 0;
}
@ -634,7 +634,7 @@ static int _cache_add_target_line(struct dev_manager *dm,
return_0;
if (!(attr & CACHE_FEATURE_METADATA2)) {
log_error("LV %s has metadata format %u unsuported by kernel.",
log_error("LV %s has metadata format %u unsupported by kernel.",
display_lvname(seg->lv), setting_seg->cache_metadata_format);
return 0;
}

View File

@ -1237,7 +1237,7 @@ static struct dev_filter *_init_filter_chain(struct cmd_context *cmd)
/* usable device filter. Required. */
if (!(filters[nr_filt] = usable_filter_create(cmd, cmd->dev_types))) {
log_error("Failed to create usabled device filter");
log_error("Failed to create usable device filter");
goto bad;
}
nr_filt++;

View File

@ -305,7 +305,7 @@ static int _add_alias(struct device *dev, const char *path, enum add_hash hash)
if (!(path = _strdup(path)) ||
!(sl = _zalloc(sizeof(*sl)))) {
log_error("Failed to add allias to dev cache.");
log_error("Failed to add alias to dev cache.");
return 0;
}
@ -2451,7 +2451,7 @@ int setup_devname_in_dev_cache(struct cmd_context *cmd, const char *devname)
}
if (!S_ISBLK(buf.st_mode)) {
log_error("Invaild device type %s.", devname);
log_error("Invalid device type %s.", devname);
return 0;
}

View File

@ -2483,7 +2483,7 @@ static int _remove_metadata_area_from_pv(struct physical_volume *pv,
if (mda_index >= FMT_TEXT_MAX_MDAS_PER_PV) {
log_error(INTERNAL_ERROR "can't remove metadata area with "
"index %u from PV %s. Metadata "
"layou not supported by %s format.",
"layout not supported by %s format.",
mda_index, dev_name(pv->dev),
pv->fmt->name);
return 0;

View File

@ -240,7 +240,7 @@ struct label *label_create(struct labeller *labeller)
struct label *label;
if (!(label = zalloc(sizeof(*label)))) {
log_error("label allocaction failed");
log_error("label allocation failed");
return NULL;
}

View File

@ -62,7 +62,7 @@ static void _lvmpolld_connect_or_warn(void)
if (!_lvmpolld_connected && !_lvmpolld.error) {
_lvmpolld = _lvmpolld_open(_lvmpolld_socket);
if ( _lvmpolld.socket_fd >= 0 && !_lvmpolld.error) {
log_debug_lvmpolld("Sucessfully connected to lvmpolld on fd %d.", _lvmpolld.socket_fd);
log_debug_lvmpolld("Successfully connected to lvmpolld on fd %d.", _lvmpolld.socket_fd);
_lvmpolld_connected = 1;
} else {
log_warn("WARNING: Failed to connect to lvmpolld. Proceeding with polling without using lvmpolld.");

View File

@ -479,7 +479,7 @@ int lv_cache_wait_for_clean(struct logical_volume *cache_lv, int *is_clean)
if (status->cache->fail) {
dm_pool_destroy(status->mem);
log_warn("WARNING: Skippping flush for failed cache %s.",
log_warn("WARNING: Skipping flush for failed cache %s.",
display_lvname(cache_lv));
return 1;
}

View File

@ -117,7 +117,7 @@ static struct dm_list *_format_pvsegs(struct dm_pool *mem, const struct lv_segme
name,
(!visible && mark_hidden) ? "]" : "",
extent_str) < 0) {
log_error("_format_pvsegs: list item dmsnprintf failed");
log_error("_format_pvsegs: list item dm_snprintf failed");
goto bad;
}

View File

@ -5115,7 +5115,7 @@ int lv_extend_policy_calculate_percent(struct logical_volume *lv,
policy_amount =
find_config_tree_int(cmd, activation_snapshot_autoextend_percent_CFG, NULL);
if (policy_threshold < 50) {
log_warn("WARNING: Snapshot autoextend threshold %d%% is set bellow "
log_warn("WARNING: Snapshot autoextend threshold %d%% is set below "
"minimal supported value 50%%.", policy_threshold);
policy_threshold = 50;
}
@ -5535,7 +5535,7 @@ static int _lvresize_adjust_extents(struct logical_volume *lv,
if (new_extents > seg_size) {
/* Notify user about extra increase of extension */
log_print_unless_silent("Increasing incremention size from %s to %s to fit new VDO slab.",
log_print_unless_silent("Increasing incremental size from %s to %s to fit new VDO slab.",
display_size(cmd, (uint64_t)seg_size * vg->extent_size),
display_size(cmd, (uint64_t)new_extents * vg->extent_size));
seg_size = new_extents;
@ -8883,7 +8883,7 @@ int activate_and_wipe_lvlist(struct dm_list *lv_list, int commit)
if (!(was_active[i++] = lv_is_active(lvl->lv))) {
lvl->lv->status |= LV_TEMPORARY;
if (!activate_lv(vg->cmd, lvl->lv)) {
log_error("Failed to activate localy %s for wiping.",
log_error("Failed to activate locally %s for wiping.",
display_lvname(lvl->lv));
r = 0;
goto out;
@ -9145,7 +9145,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
}
/* Does LV need to be zeroed? */
if (lp->zero) {
log_warn("WARNING: Skipping zeroing and wipping, compiled without activation support.");
log_warn("WARNING: Skipping zeroing and wiping, compiled without activation support.");
lp->zero = 0;
lp->wipe_signatures = 0;
}
@ -9812,7 +9812,7 @@ static struct logical_volume *_lv_create_an_lv(struct volume_group *vg,
/* Activate spare snapshot once it is a complete LV */
if (!lv_active_change(cmd, origin_lv, lp->activate)) {
log_error("Failed to activate sparce volume %s.",
log_error("Failed to activate sparse volume %s.",
display_lvname(origin_lv));
return NULL;
}

View File

@ -867,7 +867,7 @@ int check_lv_segments(struct logical_volume *lv, int complete_vg)
inc_error_count;
}
if (lv->status & LVM_WRITE) {
log_error("LV %s: external origin cant't be writable.",
log_error("LV %s: external origin can't be writable.",
lv->name);
inc_error_count;
}

View File

@ -216,7 +216,7 @@ void set_pe_align(struct physical_volume *pv, uint64_t data_alignment_sectors)
temp_pe_align_sectors = dev_minimum_io_size(pv->fmt->cmd->dev_types, pv->dev);
if (temp_pe_align_sectors && (pe_align_sectors % temp_pe_align_sectors)) {
log_debug("Adjusting PE alignment from %llu sectors to mininum io size %llu sectors for %s",
log_debug("Adjusting PE alignment from %llu sectors to minimum io size %llu sectors for %s",
(unsigned long long)pe_align_sectors,
(unsigned long long)temp_pe_align_sectors,
dev_name(pv->dev));

View File

@ -782,7 +782,7 @@ static int _reorder_raid10_near_seg_areas(struct lv_segment *seg, enum raid0_rai
/* FIXME: once more data copies supported with raid10 */
if (seg_is_raid10_near(seg) && (stripes % data_copies)) {
log_error("Can't convert %s LV %s with number of stripes not divisable by number of data copies.",
log_error("Can't convert %s LV %s with number of stripes not divisible by number of data copies.",
lvseg_name(seg), display_lvname(seg->lv));
return 0;
}

View File

@ -121,7 +121,7 @@ void lvmnotify_send(struct cmd_context *cmd)
return;
}
log_debug_dbus("Nofify dbus at %s.", LVM_DBUS_DESTINATION);
log_debug_dbus("Notify dbus at %s.", LVM_DBUS_DESTINATION);
ret = sd_bus_call_method(bus,
LVM_DBUS_DESTINATION,

View File

@ -682,7 +682,7 @@ void daemon_start(daemon_state s)
/* s.idle == NULL equals no shutdown on timeout */
if (_is_idle(s)) {
DEBUGLOG(&s, "timeout occured");
DEBUGLOG(&s, "timeout occurred");
if (++timeout_count >= _get_max_timeouts(s)) {
INFO(&s, "Inactive for %d seconds. Exiting.", timeout_count);
break;

View File

@ -5410,7 +5410,7 @@ static int _stats_create_file(CMD_ARGS)
dm_filemapd_mode_t mode;
if (names) {
log_error("Device names are not compatibile with --filemap.");
log_error("Device names are not compatible with --filemap.");
return 0;
}
@ -6041,7 +6041,7 @@ static int _stats_update_file(CMD_ARGS)
if (names) {
log_error("Device names are not compatibile with update_filemap.");
log_error("Device names are not compatible with update_filemap.");
return 0;
}

View File

@ -2415,7 +2415,7 @@ static int _get_cookie_sem(uint32_t cookie, int *semid)
break;
case EACCES:
log_error("No permission to access "
"notificaton semaphore identified "
"notification semaphore identified "
"by cookie value %" PRIu32 " (0x%x)",
cookie, cookie);
break;

View File

@ -928,7 +928,7 @@ static int _check_device_not_in_use(const char *name, struct dm_info *info)
} else if (dm_device_has_holders(info->major, info->minor))
reason = "is used by another device";
else if (dm_device_has_mounted_fs(info->major, info->minor))
reason = "constains a filesystem in use";
reason = "contains a filesystem in use";
else
return 1;
@ -3532,7 +3532,7 @@ int dm_tree_node_add_replicator_dev_target(struct dm_tree_node *node,
uint32_t slog_flags,
uint32_t slog_region_size)
{
log_error("Replicator targer is unsupported.");
log_error("Replicator target is unsupported.");
return 0;
}

View File

@ -2428,7 +2428,7 @@ static const char *_reserved_name(struct dm_report *rh,
(reserved->type & DM_REPORT_FIELD_TYPE_MASK) ? "type-specific" : "field-specific",
rh->fields[field_num].id);
else
log_error("Error occured while processing %s reserved value handler for field %s",
log_error("Error occurred while processing %s reserved value handler for field %s",
(reserved->type & DM_REPORT_FIELD_TYPE_MASK) ? "type-specific" : "field-specific",
rh->fields[field_num].id);
}
@ -3494,7 +3494,7 @@ static int _get_reserved_value(struct dm_report *rh, uint32_t field_num,
(rvw->reserved->type) & DM_REPORT_FIELD_TYPE_MASK ? "type-specific" : "field-specific",
rh->fields[field_num].id);
else
log_error("Error occured while processing %s reserved value handler for field %s",
log_error("Error occurred while processing %s reserved value handler for field %s",
(rvw->reserved->type) & DM_REPORT_FIELD_TYPE_MASK ? "type-specific" : "field-specific",
rh->fields[field_num].id);
return 0;
@ -3725,7 +3725,7 @@ error_field_id:
field_id);
goto error;
bad:
log_error(INTERNAL_ERROR "Forbiden NULL custom detected.");
log_error(INTERNAL_ERROR "Forbidden NULL custom detected.");
error:
dm_pool_free(rh->selection->mem, fs);
@ -5103,7 +5103,7 @@ struct dm_report_group *dm_report_group_create(dm_report_group_type_t type, void
dm_list_init(&group->items);
if (!(item = dm_pool_zalloc(mem, sizeof(*item)))) {
log_error("dm_report: faile to allocate root report group item");
log_error("dm_report: failed to allocate root report group item");
goto bad;
}

View File

@ -586,7 +586,7 @@ resize_luks() {
decode_size "$1" 512
if [ $((NEWSIZE % 512)) -gt 0 ]; then
error "New size is not sector alligned"
error "New size is not sector aligned."
fi
if [ $((NEWBLOCKCOUNT - CRYPT_DATA_OFFSET)) -lt 1 ]; then
@ -642,7 +642,7 @@ detect_crypt_device() {
NEWSIZE=$TMP
if [ $((L_NEWSIZE % 512)) -ne 0 ]; then
error "New size is not sector alligned"
error "New size is not sector aligned."
fi
CRYPT_RESIZE_BLOCKS=$NEWBLOCKCOUNT

View File

@ -110,7 +110,7 @@ help:
@echo " LVM_TEST_LOCKING Normal (1), Cluster (3)."
@echo " LVM_TEST_LVMPOLLD Start lvmpolld"
@echo " LVM_TEST_NODEBUG Do not debug lvm commands."
@echo " LVM_TEST_PARALLEL May skip agressive wipe of LVMTEST resources."
@echo " LVM_TEST_PARALLEL May skip aggressive wipe of LVMTEST resources."
@echo " LVM_TEST_RESULTS Where to create result files [results]."
@echo " LVM_TEST_THIN_CHECK_CMD Command for thin_check [$(LVM_TEST_THIN_CHECK_CMD)]."
@echo " LVM_TEST_THIN_DUMP_CMD Command for thin_dump [$(LVM_TEST_THIN_DUMP_CMD)]."

View File

@ -2398,7 +2398,7 @@ class TestDbusService(unittest.TestCase):
di = DaemonInfo.get()
self.assertTrue(di is not None)
if di.systemd:
raise unittest.SkipTest('existing dameon running via systemd')
raise unittest.SkipTest('existing daemon running via systemd')
if di:
ec = di.start(True)
self.assertEqual(ec, 114)

View File

@ -2087,7 +2087,7 @@ hold_device_open() {
sleep .1
done
die "$vgname-$lvname expected to be openned, but it's not!"
die "$vgname-$lvname expected to be opened, but it's not!"
}
# return total memory size in kB units

View File

@ -1443,7 +1443,7 @@ static int run( int argc, const char **argv, std::string fl_envvar = "TEST_FLAVO
"Other:\n"
" --fatal-timeouts\n\t\t- exit after encountering 2 timeouts in a row.\n"
" --continue\t- If set append to journal. Otherwise it will be overwritten.\n"
" --heartbeat HEARTBEAT\n\t\t- Name of file to update periodicaly while running.\n"
" --heartbeat HEARTBEAT\n\t\t- Name of file to update periodically while running.\n"
" --watch WATCH\t- Comma separated list of files to watch and print.\n"
" --timeout TIMEOUT\n\t\t- Period of silence in seconds considered a timeout. Default: 180.\n"
" --nokmsg\t- Do not try to read kernel messages.\n"

View File

@ -17,7 +17,7 @@ SKIP_WITH_LVMPOLLD=1
. lib/inittest
case "$(uname -r)" in
6.[0123]*|5.19*) skip "Skippen test that kills this kernel" ;;
6.[0123]*|5.19*) skip "Skipped test that kills this kernel" ;;
esac
mkfs_mount_umount()

View File

@ -993,7 +993,7 @@ static struct test_suite *_small_tests(void)
T("zero-flag-dirties", "zeroed data counts as dirty", test_zeroed_data_counts_as_dirty);
T("read-multiple-files", "read from multiple files", test_multiple_files);
T("read-bad-issue", "read fails if io engine unable to issue", test_read_bad_issue);
T("read-bad-issue-intermittent", "failed issue, followed by succes", test_read_bad_issue_intermittent);
T("read-bad-issue-intermittent", "failed issue, followed by success", test_read_bad_issue_intermittent);
T("read-bad-io", "read issued ok, but io fails", test_read_bad_wait);
T("read-bad-io-intermittent", "failed io, followed by success", test_read_bad_wait_intermittent);
T("write-bad-issue-stops-flush", "flush fails temporarily if any block fails to write", test_write_bad_issue_stops_flush);

View File

@ -1104,7 +1104,7 @@ static void _add_rule(struct cmd_context *cmdtool, struct command *cmd,
int check = 0;
if (cmd->rule_count == CMD_MAX_RULES) {
log_error("Parsing command defs: too many rules for cmd, increate CMD_MAX_RULES.");
log_error("Parsing command defs: too many rules for cmd, increase CMD_MAX_RULES.");
cmd->cmd_flags |= CMD_FLAG_PARSE_ERROR;
return;
}

View File

@ -5710,7 +5710,7 @@ static int _lvconvert_detach_writecache(struct cmd_context *cmd,
log_print_unless_silent("Detaching writecache setting cleaner.");
if (!lv_writecache_set_cleaner(lv)) {
log_error("Failed to set cleaner cachesetting to flush cache.");
log_error("Failed to set cleaner cachesettings to flush cache.");
log_error("See lvchange --cachesettings cleaner=1");
if (!active_begin && active_clean && !deactivate_lv(cmd, lv))

View File

@ -1596,7 +1596,7 @@ static int _check_pool_parameters(struct cmd_context *cmd,
} else if (vg) {
/* FIXME: what better to do with --readahead and pools? */
if (arg_is_set(cmd, readahead_ARG)) {
log_error("Ambigous --readahead parameter specified. Please use either with pool or volume.");
log_error("Ambiguous --readahead parameter specified. Please use either with pool or volume.");
return 0;
}
}

View File

@ -957,7 +957,7 @@ static int _vgchange_autoactivation_setup(struct cmd_context *cmd,
* look for all PVs in the VG. (No optimization used.)
*/
if (found_incomplete) {
log_print("PVs online incomplete for VG %s, using all devicess.", vgname);
log_print("PVs online incomplete for VG %s, using all devices.", vgname);
goto bad;
}
@ -1329,7 +1329,7 @@ static int _vgchange_locktype_single(struct cmd_context *cmd, const char *vg_nam
if (vg->lock_type && !strcmp(vg->lock_type, "sanlock") &&
(cmd->command->command_enum == vgchange_locktype_CMD)) {
if (!deactivate_lv(cmd, vg->sanlock_lv)) {
log_error("Failed to deativate %s.",
log_error("Failed to deactivate %s.",
display_lvname(vg->sanlock_lv));
return ECMD_FAILED;
}