From bdfdc52093c08b92bd72602a43d1794e1c665d7f Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Fri, 11 Jul 2025 19:41:15 +0200 Subject: [PATCH] debug: log_warn sentence begins with capital Improve the consistency and readability of warning messages. Capitalize the first word of all warning messages. Add periods at the end of warning messages. The changes are purely cosmetic and do not affect functionality. --- daemons/dmeventd/plugins/raid/dmeventd_raid.c | 2 +- daemons/lvmlockd/lvmlockd-sanlock.c | 10 ++--- lib/cache/lvmcache.c | 10 ++--- lib/commands/toolcontext.c | 12 ++--- lib/device/bcache.c | 2 +- lib/device/dev-cache.c | 4 +- lib/device/device_id.c | 44 +++++++++---------- lib/device/persist.c | 38 ++++++++-------- lib/filters/filter-mpath.c | 2 +- lib/format_text/format-text.c | 24 +++++----- lib/format_text/import.c | 8 ++-- lib/format_text/text_label.c | 12 ++--- lib/label/label.c | 10 ++--- lib/locking/lvmlockd.c | 12 ++--- lib/metadata/cache_manip.c | 4 +- lib/metadata/integrity_manip.c | 2 +- lib/metadata/metadata.c | 32 +++++++------- lib/metadata/pool_manip.c | 2 +- lib/metadata/raid_manip.c | 8 ++-- lib/writecache/writecache.c | 4 +- libdm/libdm-stats.c | 2 +- tools/lvchange.c | 4 +- tools/lvconvert.c | 18 ++++---- tools/lvmcmdline.c | 2 +- tools/lvmdevices.c | 6 +-- tools/lvmdiskscan.c | 2 +- tools/pvck.c | 14 +++--- tools/pvremove.c | 2 +- tools/pvscan.c | 2 +- tools/toollib.c | 2 +- 30 files changed, 148 insertions(+), 148 deletions(-) diff --git a/daemons/dmeventd/plugins/raid/dmeventd_raid.c b/daemons/dmeventd/plugins/raid/dmeventd_raid.c index db76f6404..56a0a8a9b 100644 --- a/daemons/dmeventd/plugins/raid/dmeventd_raid.c +++ b/daemons/dmeventd/plugins/raid/dmeventd_raid.c @@ -84,7 +84,7 @@ static int _process_raid_event(struct dso_state *state, char *params, const char */ if (!state->warned && status->insync_regions < status->total_regions) { state->warned = 1; - log_warn("WARNING: waiting for resynchronization to finish " + log_warn("WARNING: Waiting for resynchronization to finish " "before initiating repair on RAID device %s.", device); /* Fall through to allow lvconvert to run. */ } diff --git a/daemons/lvmlockd/lvmlockd-sanlock.c b/daemons/lvmlockd/lvmlockd-sanlock.c index cdb68d863..732c84187 100644 --- a/daemons/lvmlockd/lvmlockd-sanlock.c +++ b/daemons/lvmlockd/lvmlockd-sanlock.c @@ -513,13 +513,13 @@ static int get_sizes_device(char *path, uint64_t *dev_size, int *sector_size, in } if (physical_block_size && (physical_block_size != 512) && (physical_block_size != 4096)) { - log_warn("WARNING: invalid block sizes physical %u logical %u for %s", + log_warn("WARNING: Invalid block sizes physical %u logical %u for %s", physical_block_size, logical_block_size, path); physical_block_size = 0; } if (logical_block_size && (logical_block_size != 512) && (logical_block_size != 4096)) { - log_warn("WARNING: invalid block sizes physical %u logical %u for %s", + log_warn("WARNING: Invalid block sizes physical %u logical %u for %s", physical_block_size, logical_block_size, path); logical_block_size = 0; } @@ -530,7 +530,7 @@ static int get_sizes_device(char *path, uint64_t *dev_size, int *sector_size, in } if (!physical_block_size || !logical_block_size) { - log_warn("WARNING: incomplete block size information physical %u logical %u for %s", + log_warn("WARNING: Incomplete block size information physical %u logical %u for %s", physical_block_size, logical_block_size, path); if (!physical_block_size) physical_block_size = logical_block_size; @@ -539,7 +539,7 @@ static int get_sizes_device(char *path, uint64_t *dev_size, int *sector_size, in } if ((logical_block_size == 4096) && (physical_block_size == 512)) { - log_warn("WARNING: mixed block sizes physical %u logical %u (using 4096) for %s", + log_warn("WARNING: Mixed block sizes physical %u logical %u (using 4096) for %s", physical_block_size, logical_block_size, path); *sector_size = 4096; *align_size = 8 * ONE_MB; @@ -548,7 +548,7 @@ static int get_sizes_device(char *path, uint64_t *dev_size, int *sector_size, in } if ((physical_block_size == 4096) && (logical_block_size == 512)) { - log_warn("WARNING: mixed block sizes physical %u logical %u (using 4096) for %s", + log_warn("WARNING: Mixed block sizes physical %u logical %u (using 4096) for %s", physical_block_size, logical_block_size, path); *sector_size = 4096; *align_size = 8 * ONE_MB; diff --git a/lib/cache/lvmcache.c b/lib/cache/lvmcache.c index b8c915f63..582f7e8b3 100644 --- a/lib/cache/lvmcache.c +++ b/lib/cache/lvmcache.c @@ -314,7 +314,7 @@ static struct lvmcache_vginfo *_vginfo_lookup(const char *vgname, const char *vg if (vgid_arg) { if ((vginfo = dm_hash_lookup(_vgid_hash, vgid))) { if (vgname && strcmp(vginfo->vgname, vgname)) { - log_warn("WARNING: lookup found duplicate VGID %s for VGs %s and %s.", vgid, vginfo->vgname, vgname); + log_warn("WARNING: Lookup found duplicate VGID %s for VGs %s and %s.", vgid, vginfo->vgname, vgname); if ((vginfo = dm_hash_lookup(_vgname_hash, vgname))) { if (!memcmp(vginfo->vgid, vgid, ID_LEN)) return vginfo; @@ -1890,7 +1890,7 @@ static int _lvmcache_update_vgname(struct cmd_context *cmd, vginfo = lvmcache_vginfo_from_vgid(vgid); if (vginfo && strcmp(vginfo->vgname, vgname)) { - log_warn("WARNING: fix duplicate VGID %s for VGs %s and %s (see vgchange -u).", vgid_dashed, vgname, vginfo->vgname); + log_warn("WARNING: Fix duplicate VGID %s for VGs %s and %s (see vgchange -u).", vgid_dashed, vgname, vginfo->vgname); vginfo = lvmcache_vginfo_from_vgname(vgname, NULL); if (vginfo && memcmp(vginfo->vgid, vgid, ID_LEN)) { log_error("Ignoring %s with conflicting VG info %s %s.", dev_name(info->dev), vgid_dashed, vgname); @@ -1953,7 +1953,7 @@ static int _lvmcache_update_vgname(struct cmd_context *cmd, log_warn("WARNING: VG name %s is used by VGs %s and %s.", vgname, vgid_dashed, other_dashed); - log_warn("WARNING: fix duplicate VG names with vgrename uuid, or vgrename --devices"); + log_warn("WARNING: Fix duplicate VG names with vgrename uuid, or vgrename --devices."); } if (!vginfo_is_allowed && !other_is_allowed) { @@ -2227,7 +2227,7 @@ int lvmcache_update_vgname_and_id(struct cmd_context *cmd, struct lvmcache_info */ if ((vginfo->mda_size != vgsummary->mda_size) || (vginfo->mda_checksum != vgsummary->mda_checksum)) { - log_warn("WARNING: scan of VG %s from %s mda%d found mda_checksum %x mda_size %zu vs %x %zu", + log_warn("WARNING: Scan of VG %s from %s mda%d found mda_checksum %x mda_size %zu vs %x %zu.", vgname, dev_name(info->dev), vgsummary->mda_num, vgsummary->mda_checksum, vgsummary->mda_size, vginfo->mda_checksum, vginfo->mda_size); @@ -2312,7 +2312,7 @@ void lvmcache_update_vg_from_read(struct volume_group *vg, int *incorrect_pv_cla if (found) continue; - log_warn("WARNING: outdated PV %s seqno %u has been removed in current VG %s seqno %u.", + log_warn("WARNING: Outdated PV %s seqno %u has been removed in current VG %s seqno %u.", dev_name(info->dev), info->summary_seqno, vg->name, vginfo->seqno); if (!_outdated_warning++) diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c index 30fc5d4f2..1be761082 100644 --- a/lib/commands/toolcontext.c +++ b/lib/commands/toolcontext.c @@ -82,7 +82,7 @@ const char *system_id_from_string(struct cmd_context *cmd, const char *str) } if (!strncmp(system_id, "localhost", 9)) { - log_warn("WARNING: system ID may not begin with the string \"localhost\"."); + log_warn("WARNING: System ID may not begin with the string \"localhost\"."); return NULL; } @@ -696,7 +696,7 @@ static int _process_config(struct cmd_context *cmd) if (dev_ext_info_src && strcmp(dev_ext_info_src, "none") && strcmp(dev_ext_info_src, "udev")) { - log_warn("WARNING: unknown external device info source, using none."); + log_warn("WARNING: Unknown external device info source, using none."); dev_ext_info_src = NULL; } @@ -704,7 +704,7 @@ static int _process_config(struct cmd_context *cmd) if (udev_init_library_context()) { init_external_device_info_source(DEV_EXT_UDEV); } else { - log_warn("WARNING: failed to init udev for external device info, using none."); + log_warn("WARNING: Failed to init udev for external device info, using none."); dev_ext_info_src = NULL; } } @@ -720,7 +720,7 @@ static int _process_config(struct cmd_context *cmd) } if (*cmd->proc_dir && !dir_exists(cmd->proc_dir)) { - log_warn("WARNING: proc dir %s not found - some checks will be bypassed", + log_warn("WARNING: proc dir %s not found - some checks will be bypassed.", cmd->proc_dir); cmd->proc_dir[0] = '\0'; } @@ -793,13 +793,13 @@ static int _process_config(struct cmd_context *cmd) else if (strcmp(cmd->stripe_filler, "error") && strcmp(cmd->stripe_filler, "zero")) { if (stat(cmd->stripe_filler, &st)) { - log_warn("WARNING: activation/missing_stripe_filler = \"%s\" " + log_warn("WARNING: activation/missing_stripe_filler = \"%s\"." "is invalid,", cmd->stripe_filler); log_warn(" stat failed: %s", strerror(errno)); log_warn("Falling back to \"error\" missing_stripe_filler."); cmd->stripe_filler = "error"; } else if (!S_ISBLK(st.st_mode)) { - log_warn("WARNING: activation/missing_stripe_filler = \"%s\" " + log_warn("WARNING: activation/missing_stripe_filler = \"%s\"." "is not a block device.", cmd->stripe_filler); log_warn("Falling back to \"error\" missing_stripe_filler."); cmd->stripe_filler = "error"; diff --git a/lib/device/bcache.c b/lib/device/bcache.c index c61f7a5d5..a0b8f2e19 100644 --- a/lib/device/bcache.c +++ b/lib/device/bcache.c @@ -92,7 +92,7 @@ static void _cb_set_destroy(struct cb_set *cbs) // never be in flight IO. if (!dm_list_empty(&cbs->allocated)) { // bail out - log_warn("WARNING: async io still in flight."); + log_warn("WARNING: Async io still in flight."); return; } diff --git a/lib/device/dev-cache.c b/lib/device/dev-cache.c index 044fa15d0..d5be9fe83 100644 --- a/lib/device/dev-cache.c +++ b/lib/device/dev-cache.c @@ -1715,7 +1715,7 @@ static struct device *_dev_cache_get(struct cmd_context *cmd, const char *name, * a warning to look for any other unknown cases. */ if (MAJOR(st.st_rdev) != cmd->dev_types->device_mapper_major) { - log_warn("WARNING: new device appeared %u:%u %s", + log_warn("WARNING: New device appeared %u:%u %s.", MAJOR(st.st_rdev), (MINOR(st.st_rdev)), name); } #endif @@ -1785,7 +1785,7 @@ static struct device *_dev_cache_get(struct cmd_context *cmd, const char *name, * a warning to look for any other unknown cases. */ if (MAJOR(st.st_rdev) != cmd->dev_types->device_mapper_major) { - log_warn("WARNING: new device appeared %u:%u %s.", + log_warn("WARNING: New device appeared %u:%u %s.", MAJOR(st.st_rdev), MINOR(st.st_rdev), name); } #endif diff --git a/lib/device/device_id.c b/lib/device/device_id.c index 6ffdcab1d..fddd388a1 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -1335,7 +1335,7 @@ int device_ids_read(struct cmd_context *cmd) continue; if (!(du = zalloc(sizeof(struct dev_use)))) { - log_warn("WARNING: failed to process devices file entry."); + log_warn("WARNING: Failed to process devices file entry."); continue; } @@ -1380,7 +1380,7 @@ int device_ids_read(struct cmd_context *cmd) } if (line_error) { - log_warn("WARNING: failed to process devices file entry."); + log_warn("WARNING: Failed to process devices file entry."); free_du(du); continue; } @@ -1691,12 +1691,12 @@ int device_ids_write(struct cmd_context *cmd) if (_devices_file_version[0]) { if (sscanf(_devices_file_version, "%u.%u.%u", &df_major, &df_minor, &df_counter) != 3) { /* don't update a file we can't parse */ - log_warn("WARNING: not updating devices file with unparsed version."); + log_warn("WARNING: Not updating devices file with unparsed version."); return 0; } if (df_major > DEVICES_FILE_MAJOR) { /* don't update a file with a newer major version */ - log_warn("WARNING: not updating devices file with larger major version."); + log_warn("WARNING: Not updating devices file with larger major version."); return 0; } } @@ -1895,7 +1895,7 @@ int device_ids_version_unchanged(struct cmd_context *cmd) FILE *fp; if (!(fp = fopen(cmd->devices_file_path, "r"))) { - log_warn("WARNING: cannot open devices file to read."); + log_warn("WARNING: Cannot open devices file to read."); return 0; } @@ -2068,12 +2068,12 @@ int device_id_add(struct cmd_context *cmd, struct device *dev, const char *pvid_ log_error("The specified --deviceidtype %s is unknown.", idtype_arg); return 0; } - log_warn("WARNING: ignoring unknown device_id type %s.", idtype_arg); + log_warn("WARNING: Ignoring unknown device_id type %s.", idtype_arg); } else { if (id_arg) { if ((idname = strdup(id_arg))) goto id_done; - log_warn("WARNING: ignoring device_id name %s.", id_arg); + log_warn("WARNING: Ignoring device_id name %s.", id_arg); } if ((idname = device_id_system_read(cmd, dev, idtype))) @@ -2084,7 +2084,7 @@ int device_id_add(struct cmd_context *cmd, struct device *dev, const char *pvid_ return 0; } - log_warn("WARNING: ignoring deviceidtype %s which is not available for device.", idtype_arg); + log_warn("WARNING: Ignoring deviceidtype %s which is not available for device.", idtype_arg); idtype = 0; } } @@ -2173,13 +2173,13 @@ id_done: du_devname->devname); if (du_pvid && (du_pvid->dev != dev)) - log_warn("WARNING: adding device %s with PVID %s which is already used for %s device_id %s.", + log_warn("WARNING: Adding device %s with PVID %s which is already used for %s device_id %s.", dev_name(dev), pvid, du_pvid->dev ? dev_name(du_pvid->dev) : "missing device", du_pvid->idname ?: "none"); if (du_devid && (du_devid->dev != dev)) { if (!du_devid->dev) { - log_warn("WARNING: adding device %s with idname %s which is already used for missing device.", + log_warn("WARNING: Adding device %s with idname %s which is already used for missing device.", dev_name(dev), id->idname); } else { int ret1, ret2; @@ -2191,7 +2191,7 @@ id_done: log_debug("Using separate entries for partitions of same device %s part %d %s part %d.", dev_name(dev), part, dev_name(du_devid->dev), du_devid->part); } else { - log_warn("WARNING: adding device %s with idname %s which is already used for %s.", + log_warn("WARNING: Adding device %s with idname %s which is already used for %s.", dev_name(dev), id->idname, dev_name(du_devid->dev)); } } @@ -2305,7 +2305,7 @@ void device_id_pvremove(struct cmd_context *cmd, struct device *dev) return; if (!(du = get_du_for_dev(cmd, dev))) { - log_warn("WARNING: devices to use does not include %s", dev_name(dev)); + log_warn("WARNING: Devices to use does not include %s.", dev_name(dev)); return; } @@ -3241,7 +3241,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs, /* This shouldn't happen since idname was used to match du and dev */ if (!du->idname || strcmp(devname, du->idname)) { - log_warn("WARNING: fixing devices file IDNAME %s for PVID %s device %s", + log_warn("WARNING: Fixing devices file IDNAME %s for PVID %s device %s.", du->idname ?: ".", du->pvid, dev_name(dev)); if (!(tmpdup = strdup(devname))) continue; @@ -4065,10 +4065,10 @@ void device_ids_search(struct cmd_context *cmd, struct dm_list *new_devs, dm_list_iterate_items_safe(dil, dil2, &search_pvids) { if (!memcmp(dil->pvid, dev->pvid, ID_LEN)) { if (dil->dev) { - log_warn("WARNING: found PVID %s on multiple devices %s %s.", + log_warn("WARNING: Found PVID %s on multiple devices %s %s.", dil->pvid, dev_name(dil->dev), dev_name(dev)); - log_warn("WARNING: duplicate PVIDs should be changed to be unique."); - log_warn("WARNING: use lvmdevices to select a device for PVID %s.", dil->pvid); + log_warn("WARNING: Duplicate PVIDs should be changed to be unique."); + log_warn("WARNING: Use lvmdevices to select a device for PVID %s.", dil->pvid); dm_list_del(&dil->list); } else { log_debug("Search for PVID %s found on %s.", dil->pvid, dev_name(dev)); @@ -4166,7 +4166,7 @@ void device_ids_search(struct cmd_context *cmd, struct dm_list *new_devs, if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, NULL)) { /* I don't think this would happen */ - log_warn("WARNING: new device %s for PVID %s is excluded: %s.", + log_warn("WARNING: New device %s for PVID %s is excluded: %s.", dev_name(dev), dil->pvid, dev_filtered_reason(dev)); if (du) /* Should not happen 'du' is NULL */ du->dev = NULL; @@ -4335,7 +4335,7 @@ static int _lock_devices_file(struct cmd_context *cmd, int mode, int nonblock, i if (_devices_file_locked) { /* shouldn't happen */ - log_warn("WARNING: devices file already locked %d", mode); + log_warn("WARNING: Devices file already locked %d.", mode); return 0; } @@ -4351,7 +4351,7 @@ static int _lock_devices_file(struct cmd_context *cmd, int mode, int nonblock, i if (_devices_fd != -1) { /* shouldn't happen */ - log_warn("WARNING: devices file lock file already open %d", _devices_fd); + log_warn("WARNING: Devices file lock file already open %d.", _devices_fd); return 0; } @@ -4401,16 +4401,16 @@ void unlock_devices_file(struct cmd_context *cmd) if (_devices_fd == -1) { /* shouldn't happen */ - log_warn("WARNING: devices file unlock no fd"); + log_warn("WARNING: Devices file unlock no fd."); return; } if (!_devices_file_locked) - log_warn("WARNING: devices file unlock not locked"); + log_warn("WARNING: Devices file unlock not locked."); ret = flock(_devices_fd, LOCK_UN); if (ret) - log_warn("WARNING: devices file unlock errno %d", errno); + log_warn("WARNING: Devices file unlock errno %d.", errno); _devices_file_locked = 0; diff --git a/lib/device/persist.c b/lib/device/persist.c index 13314d218..2e76bb75e 100644 --- a/lib/device/persist.c +++ b/lib/device/persist.c @@ -648,7 +648,7 @@ static int vg_is_registered_by_host_id(struct cmd_context *cmd, struct volume_gr if (first_key == found_key) continue; - log_warn("WARNING: inconsistent reservation keys for host_id %d: 0x%llx 0x%llx (generation %u %u)", + log_warn("WARNING: Inconsistent reservation keys for host_id %d: 0x%llx 0x%llx (generation %u %u).", host_id, (unsigned long long)first_key, (unsigned long long)found_key, first_gen, found_gen); errors++; @@ -1219,12 +1219,12 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, if (!our_key_val) our_key_val = found_key_val; else if (our_key_val != found_key_val) - log_warn("WARNING: unexpected local key 0x%llx (previous 0x%llx) on %s.", + log_warn("WARNING: Unexpected local key 0x%llx (previous 0x%llx) on %s.", (unsigned long long)found_key_val, (unsigned long long)our_key_val, dev_name(dev)); found_key_gen = (found_key_val & 0xFFFFFF0000) >> 16; if (current_sanlock_gen && (found_key_gen != current_sanlock_gen)) - log_warn("WARNING: local key 0x%llx generation %u (expect %u) on %s.", + log_warn("WARNING: Local key 0x%llx generation %u (expect %u) on %s.", (unsigned long long)found_key_val, found_key_gen, current_sanlock_gen, dev_name(dev)); if (current_sanlock_gen && (found_key_gen == current_sanlock_gen)) @@ -1237,18 +1237,18 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, other_key_count = found_key_count; if (!vg_is_shared(vg) && (found_key_count > 1)) - log_warn("WARNING: unexpected number of registered keys %d (expect 1) on %s.", + log_warn("WARNING: Unexpected number of registered keys %d (expect 1) on %s.", found_key_count, dev_name(dev)); if (vg_is_shared(vg) && other_key_count && (found_key_count != other_key_count)) - log_warn("WARNING: unexpected number of registered keys %d (vs %d) on %s.", + log_warn("WARNING: Unexpected number of registered keys %d (vs %d) on %s.", found_key_count, other_key_count, dev_name(dev)); if (!vg_is_shared(vg) && (found_key_count == 1) && found_keys) { if (!one_key_val) one_key_val = found_keys[0]; else if (one_key_val != found_keys[0]) - log_warn("WARNING: unexpected registered key 0x%llx (other 0x%llx) on %s.", + log_warn("WARNING: Unexpected registered key 0x%llx (other 0x%llx) on %s.", (unsigned long long)found_keys[0], (unsigned long long)one_key_val, dev_name(dev)); } @@ -1273,7 +1273,7 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, } if (!prtype && found_key_count) - log_warn("WARNING: registered keys without a reservation on %s.", dev_name(dev)); + log_warn("WARNING: Registered keys without a reservation on %s.", dev_name(dev)); if (!prtype) { pv_no_res++; @@ -1296,21 +1296,21 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, if (!other_holder) other_holder = holder; else if (other_holder != holder) - log_warn("WARNING: unexpected reservation holder 0x%llx (other 0x%llx) on %s.", + log_warn("WARNING: Unexpected reservation holder 0x%llx (other 0x%llx) on %s.", (unsigned long long)holder, (unsigned long long)other_holder, dev_name(dev)); } else { pv_res_other_type++; - log_warn("WARNING: unexpected reservation type %s on %s.", + log_warn("WARNING: Unexpected reservation type %s on %s.", prtype_to_str(prtype), dev_name(dev)); } if (vg_is_shared(vg)) { if (prtype != PR_TYPE_WEAR) - log_warn("WARNING: expected reservation type WEAR (found %s) for shared VG on %s.", + log_warn("WARNING: Expected reservation type WEAR (found %s) for shared VG on %s.", prtype_to_str(prtype), dev_name(dev)); } else { if ((prtype != PR_TYPE_WEAR) && dev_is_mpath(cmd, dev)) - log_warn("WARNING: expected reservation type WEAR (found %s) for multipath on %s.", + log_warn("WARNING: Expected reservation type WEAR (found %s) for multipath on %s.", prtype_to_str(prtype), dev_name(dev)); } } @@ -1318,7 +1318,7 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, if (our_key_val && !local_key && local_host_id && vg->lock_type && !strcmp(vg->lock_type, "sanlock") && !lockd_vg_is_started(cmd, vg, ¤t_sanlock_gen)) - log_warn("WARNING: skipped key generation check (VG not started.)"); + log_warn("WARNING: Skipped key generation check (VG not started.)"); /* Summarize results for all devices */ @@ -1340,15 +1340,15 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, log_print_unless_silent("key for local host is registered on %d of %d devices: 0x%llx", pv_reg, pv_count, (unsigned long long)our_key_val); if (pv_no_reg) - log_warn("WARNING: key for local host is missing on %d of %d devices.", pv_no_reg, pv_count); + log_warn("WARNING: Key for local host is missing on %d of %d devices.", pv_no_reg, pv_count); } if (!vg_is_shared(vg) && one_key_val) { if (pv_res_local && (one_key_val != our_key_val)) - log_warn("WARNING: unexpected mismatch between local key 0x%llx and one registered key 0x%llx.", + log_warn("WARNING: Unexpected mismatch between local key 0x%llx and one registered key 0x%llx.", (unsigned long long)our_key_val, (unsigned long long)one_key_val); if (pv_res_other && other_holder && (one_key_val != other_holder)) - log_warn("WARNING: unexpected mismatch between holder key 0x%llx and one registered key 0x%llx.", + log_warn("WARNING: Unexpected mismatch between holder key 0x%llx and one registered key 0x%llx.", (unsigned long long)other_holder, (unsigned long long)one_key_val); else if (one_key_val != our_key_val) log_print_unless_silent("key for other host is registered: 0x%llx", (unsigned long long)one_key_val); @@ -1380,7 +1380,7 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, log_print_unless_silent("reservation WEAR for other host"); if (pv_res_wear_local && pv_res_wear_other) - log_warn("WARNING: unexpected WEAR reservation for other host."); + log_warn("WARNING: Unexpected WEAR reservation for other host."); } else { if (pv_res_wear_local || pv_res_wear_other) log_print_unless_silent("reservation WEAR for registered hosts"); @@ -1411,7 +1411,7 @@ int persist_check(struct cmd_context *cmd, struct volume_group *vg, log_print_unless_silent("updating incorrect key file value 0x%llx to 0x%llx", (unsigned long long)file_key, (unsigned long long)our_key_val); if (!write_key_file(cmd, vg, our_key_val)) - log_warn("WARNING: failed to update key file."); + log_warn("WARNING: Failed to update key file."); } return 1; @@ -1995,10 +1995,10 @@ int persist_start(struct cmd_context *cmd, struct volume_group *vg, if (vg_is_shared(vg)) { if (prtype != PR_TYPE_WEAR) - log_warn("WARNING: expected prtype WEAR for shared VG on %s", dev_name(dev)); + log_warn("WARNING: Expected prtype WEAR for shared VG on %s.", dev_name(dev)); } else { if ((prtype != PR_TYPE_WE) && !dev_is_mpath(cmd, dev)) - log_warn("WARNING: expected prtype WE on %s", dev_name(dev)); + log_warn("WARNING: Expected prtype WE on %s.", dev_name(dev)); } } diff --git a/lib/filters/filter-mpath.c b/lib/filters/filter-mpath.c index 5536a6d3b..056cf13f2 100644 --- a/lib/filters/filter-mpath.c +++ b/lib/filters/filter-mpath.c @@ -40,7 +40,7 @@ static int _ignore_mpath_component(struct cmd_context *cmd, struct dev_filter *f if ((dev->flags & DEV_MATCHED_USE_ID) && mpath_devno) { if (!get_du_for_devno(cmd, mpath_devno)) { struct device *mpath_dev = dev_cache_get_by_devt(cmd, mpath_devno); - log_warn("WARNING: devices file is missing %s (%u:%u) using multipath component %s.", + log_warn("WARNING: Devices file is missing %s (%u:%u) using multipath component %s.", mpath_dev ? dev_name(mpath_dev) : "unknown", MAJOR(mpath_devno), MINOR(mpath_devno), dev_name(dev)); if (!_lvmdevices_update_msg && strcmp(get_cmd_name(), "lvmdevices")) { diff --git a/lib/format_text/format-text.c b/lib/format_text/format-text.c index b494cef2c..8650fabeb 100644 --- a/lib/format_text/format-text.c +++ b/lib/format_text/format-text.c @@ -193,11 +193,11 @@ static void _xlate_mdah(struct mda_header *mdah) static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev_area, int primary_mda, uint32_t ignore_bad_fields, uint32_t *bad_fields) { - log_debug_metadata("Reading mda header sector from %s at %llu", + log_debug_metadata("Reading mda header sector from %s at %llu.", dev_name(dev_area->dev), (unsigned long long)dev_area->start); if (!dev_read_bytes(dev_area->dev, dev_area->start, MDA_HEADER_SIZE, mdah)) { - log_error("Failed to read metadata area header on %s at %llu", + log_error("Failed to read metadata area header on %s at %llu.", dev_name(dev_area->dev), (unsigned long long)dev_area->start); *bad_fields |= BAD_MDA_READ; return 0; @@ -206,7 +206,7 @@ static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev if (mdah->checksum_xl != htole32(calc_crc(INITIAL_CRC, (uint8_t *)mdah->magic, MDA_HEADER_SIZE - sizeof(mdah->checksum_xl)))) { - log_warn("WARNING: wrong checksum %x in mda header on %s at %llu", + log_warn("WARNING: Wrong checksum %x in mda header on %s at %llu.", mdah->checksum_xl, dev_name(dev_area->dev), (unsigned long long)dev_area->start); *bad_fields |= BAD_MDA_CHECKSUM; @@ -215,20 +215,20 @@ static int _raw_read_mda_header(struct mda_header *mdah, struct device_area *dev _xlate_mdah(mdah); if (memcmp(mdah->magic, FMTT_MAGIC, sizeof(mdah->magic))) { - log_warn("WARNING: wrong magic number in mda header on %s at %llu", + log_warn("WARNING: Wrong magic number in mda header on %s at %llu.", dev_name(dev_area->dev), (unsigned long long)dev_area->start); *bad_fields |= BAD_MDA_MAGIC; } if (mdah->version != FMTT_VERSION) { - log_warn("WARNING: wrong version %u in mda header on %s at %llu", + log_warn("WARNING: Wrong version %u in mda header on %s at %llu.", mdah->version, dev_name(dev_area->dev), (unsigned long long)dev_area->start); *bad_fields |= BAD_MDA_VERSION; } if (mdah->start != dev_area->start) { - log_warn("WARNING: wrong start sector %llu in mda header on %s at %llu", + log_warn("WARNING: Wrong start sector %llu in mda header on %s at %llu.", (unsigned long long)mdah->start, dev_name(dev_area->dev), (unsigned long long)dev_area->start); *bad_fields |= BAD_MDA_START; @@ -337,7 +337,7 @@ static uint64_t _next_rlocn_offset(struct volume_group *vg, struct raw_locn *rlo /* This has only been designed to work with 512. */ if (alignment != 512) - log_warn("WARNING: metadata alignment should be 512 not %llu", + log_warn("WARNING: Metadata alignment should be 512 not %llu.", (unsigned long long)alignment); /* @@ -475,13 +475,13 @@ static struct volume_group *_vg_read_raw(struct cmd_context *cmd, */ struct device *dev = mdac->area.dev; struct lvmcache_info *info = lvmcache_info_from_pvid(dev->pvid, dev, 0); - log_warn("WARNING: reading %s mda%d failed to read metadata.", dev_name(dev), mda_is_primary(mda)?1:2); - log_warn("WARNING: repair VG metadata on %s with vgck --updatemetadata.", dev_name(dev)); + log_warn("WARNING: Reading %s mda%d failed to read metadata.", dev_name(dev), mda_is_primary(mda)?1:2); + log_warn("WARNING: Repair VG metadata on %s with vgck --updatemetadata.", dev_name(dev)); if (info) /* remove mda from lvmcache, saving it in info->bad_mdas for possible repair with updatemetadata */ lvmcache_del_save_bad_mda(info, mda->mda_num, BAD_MDA_TEXT); else - log_warn("WARNING: No cache info for %s", dev_name(dev)); + log_warn("WARNING: No cache info for %s.", dev_name(dev)); /* remove mda from fid */ fid_remove_mda(fid, mda, NULL, 0, 0); @@ -1558,7 +1558,7 @@ int read_metadata_location_summary(const struct format_type *fmt, (off_t) (dev_area->start + MDA_HEADER_SIZE), wrap, calc_crc, vgsummary->vgname ? 1 : 0, vgsummary)) { - log_warn("WARNING: metadata on %s at %llu has invalid summary for VG.", + log_warn("WARNING: Metadata on %s at %llu has invalid summary for VG.", dev_name(dev_area->dev), (unsigned long long)(dev_area->start + rlocn->offset)); return 0; @@ -1566,7 +1566,7 @@ int read_metadata_location_summary(const struct format_type *fmt, /* Ignore this entry if the characters aren't permissible */ if (!validate_name(vgsummary->vgname)) { - log_warn("WARNING: metadata on %s at %llu has invalid VG name.", + log_warn("WARNING: Metadata on %s at %llu has invalid VG name.", dev_name(dev_area->dev), (unsigned long long)(dev_area->start + rlocn->offset)); return 0; diff --git a/lib/format_text/import.c b/lib/format_text/import.c index 0ab9c1ab0..02e7c1a36 100644 --- a/lib/format_text/import.c +++ b/lib/format_text/import.c @@ -62,13 +62,13 @@ int text_read_metadata_summary(const struct format_type *fmt, offset2, size2, checksum_fn, vgsummary->mda_checksum, checksum_only, 1, 1)) { - log_warn("WARNING: invalid metadata text from %s at %llu.", + log_warn("WARNING: Invalid metadata text from %s at %llu.", dev_name(dev), (unsigned long long)offset); goto out; } } else { if (!config_file_read_from_file(cft)) { - log_warn("WARNING: invalid metadata text from file."); + log_warn("WARNING: Invalid metadata text from file."); goto out; } } @@ -157,12 +157,12 @@ struct volume_group *text_read_metadata(struct format_instance *fid, if (!config_file_read_fd(cft, dev, MDA_CONTENT_REASON(primary_mda), offset, size, offset2, size2, checksum_fn, checksum, skip_parse, 1, 0)) { - log_warn("WARNING: couldn't read volume group metadata from %s.", dev_name(dev)); + log_warn("WARNING: Couldn't read volume group metadata from %s.", dev_name(dev)); goto out; } } else { if (!config_file_read_from_file(cft)) { - log_warn("WARNING: couldn't read volume group metadata from file."); + log_warn("WARNING: Couldn't read volume group metadata from file."); goto out; } } diff --git a/lib/format_text/text_label.c b/lib/format_text/text_label.c index a6446a557..5f8b50cb8 100644 --- a/lib/format_text/text_label.c +++ b/lib/format_text/text_label.c @@ -332,7 +332,7 @@ static int _read_mda_header_and_metadata(const struct format_type *fmt, retry: if (!(mdah = raw_read_mda_header(fmt, &mdac->area, (mda->mda_num == 1), 0, bad_fields))) { - log_warn("WARNING: bad metadata header on %s at %llu.", + log_warn("WARNING: Bad metadata header on %s at %llu.", dev_name(mdac->area.dev), (unsigned long long)mdac->area.start); mda->header_start = mdac->area.start; @@ -389,7 +389,7 @@ static int _read_mda_header_and_metadata(const struct format_type *fmt, goto retry; } - log_warn("WARNING: bad metadata text on %s in mda%d", + log_warn("WARNING: Bad metadata text on %s in mda%d.", dev_name(mdac->area.dev), mda->mda_num); *bad_fields |= BAD_MDA_TEXT; return 0; @@ -574,8 +574,8 @@ static int _text_read(struct cmd_context *cmd, struct labeller *labeller, struct * used by vg_read/vg_write, but keep track of it in * lvmcache for repair. */ - log_warn("WARNING: scanning %s mda1 failed to read metadata summary.", dev_name(dev)); - log_warn("WARNING: repair VG metadata on %s with vgck --updatemetadata.", dev_name(dev)); + log_warn("WARNING: Scanning %s mda1 failed to read metadata summary.", dev_name(dev)); + log_warn("WARNING: Repair VG metadata on %s with vgck --updatemetadata.", dev_name(dev)); dm_list_del(&mda1->list); mda1->bad_fields = bad_fields; @@ -624,8 +624,8 @@ static int _text_read(struct cmd_context *cmd, struct labeller *labeller, struct * used by vg_read/vg_write, but keep track of it in * lvmcache for repair. */ - log_warn("WARNING: scanning %s mda2 failed to read metadata summary.", dev_name(dev)); - log_warn("WARNING: repair VG metadata on %s with vgck --updatemetadata.", dev_name(dev)); + log_warn("WARNING: Scanning %s mda2 failed to read metadata summary.", dev_name(dev)); + log_warn("WARNING: Repair VG metadata on %s with vgck --updatemetadata.", dev_name(dev)); dm_list_del(&mda2->list); mda2->bad_fields = bad_fields; diff --git a/lib/label/label.c b/lib/label/label.c index 9fe188c60..b26d3a39a 100644 --- a/lib/label/label.c +++ b/lib/label/label.c @@ -446,7 +446,7 @@ static int _process_block(struct cmd_context *cmd, struct dev_filter *f, * lvmcache with empty info->mdas, and it will behave * like a PV with no mdas (a common configuration.) */ - log_warn("WARNING: scan failed to get metadata summary from %s PVID %s", dev_name(dev), dev->pvid); + log_warn("WARNING: Scan failed to get metadata summary from %s PVID %s.", dev_name(dev), dev->pvid); } } out: @@ -856,9 +856,9 @@ void prepare_open_file_limit(struct cmd_context *cmd, unsigned int num_devs) rv = prlimit(0, RLIMIT_NOFILE, &new, &old); if (rv < 0) { if (errno == EPERM) - log_warn("WARNING: permission error setting open file limit for scanning %u devices.", num_devs); + log_warn("WARNING: Permission error setting open file limit for scanning %u devices.", num_devs); else - log_warn("WARNING: cannot set open file limit for scanning %u devices.", num_devs); + log_warn("WARNING: Cannot set open file limit for scanning %u devices.", num_devs); return; } #endif @@ -1421,9 +1421,9 @@ int label_scan(struct cmd_context *cmd) if ((remainder = (want_size_kb % 1024))) want_size_kb = want_size_kb + 1024 - remainder; - log_warn("WARNING: metadata may not be usable with current io_memory_size %d KiB", + log_warn("WARNING: Metadata may not be usable with current io_memory_size %d KiB.", io_memory_size()); - log_warn("WARNING: increase lvm.conf io_memory_size to at least %llu KiB", + log_warn("WARNING: Increase lvm.conf io_memory_size to at least %llu KiB.", (unsigned long long)want_size_kb); } diff --git a/lib/locking/lvmlockd.c b/lib/locking/lvmlockd.c index 23971b8e9..b6624634c 100644 --- a/lib/locking/lvmlockd.c +++ b/lib/locking/lvmlockd.c @@ -1771,7 +1771,7 @@ int lockd_global_create(struct cmd_context *cmd, const char *def_mode, const cha if (cmd->lockd_gl_disable) { log_debug("lockd global create disabled %s", def_mode ?: ""); if (def_mode && !strcmp(def_mode, "ex")) - log_warn("WARNING: skipping global lock in lvmlockd."); + log_warn("WARNING: Skipping global lock in lvmlockd."); goto out; } @@ -2043,7 +2043,7 @@ int lockd_global(struct cmd_context *cmd, const char *def_mode) if (cmd->lockd_gl_disable) { log_debug("lockd global disabled %s", def_mode ?: ""); if (def_mode && !strcmp(def_mode, "ex")) - log_warn("WARNING: skipping global lock in lvmlockd."); + log_warn("WARNING: Skipping global lock in lvmlockd."); goto allow; } req: @@ -2323,7 +2323,7 @@ int lockd_vg(struct cmd_context *cmd, const char *vg_name, const char *def_mode, if (cmd->lockd_vg_disable) { log_debug("lockd VG disabled %s", def_mode ?: ""); if (def_mode && !strcmp(def_mode, "ex")) - log_warn("WARNING: skipping VG lock in lvmlockd."); + log_warn("WARNING: Skipping VG lock in lvmlockd."); return 1; } @@ -2835,7 +2835,7 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg, if (!_query_lv(cmd, vg, lv_name, lv_uuid, lock_args, &ex, &sh)) return 1; if (sh) { - log_warn("WARNING: shared LV may require refresh on other hosts where it is active."); + log_warn("WARNING: Shared LV may require refresh on other hosts where it is active."); return 1; } } @@ -2845,7 +2845,7 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg, if (cmd->lockd_lv_disable) { log_debug("lockd_lv disabled %s %s/%s", def_mode ?: "", vg->name, lv_name); if (def_mode && strcmp(def_mode, "un")) - log_warn("WARNING: skipping LV lock in lvmlockd."); + log_warn("WARNING: Skipping LV lock in lvmlockd."); return 1; } @@ -2969,7 +2969,7 @@ int lockd_lv_name(struct cmd_context *cmd, struct volume_group *vg, if (lockd_flags & LD_RF_SH_EXISTS) { if (flags & LDLV_SH_EXISTS_OK) { - log_warn("WARNING: extending LV with a shared lock, other hosts may require LV refresh."); + log_warn("WARNING: Extending LV with a shared lock, other hosts may require LV refresh."); cmd->lockd_lv_sh_for_ex = 1; return 1; } diff --git a/lib/metadata/cache_manip.c b/lib/metadata/cache_manip.c index 3e7b34a66..74b766140 100644 --- a/lib/metadata/cache_manip.c +++ b/lib/metadata/cache_manip.c @@ -1175,8 +1175,8 @@ int cache_vol_set_params(struct cmd_context *cmd, log_warn("WARNING: Data redundancy could be lost with writeback caching of raid logical volume!"); if (lv_is_thin_pool_data(cache_lv)) { - log_warn("WARNING: thin pool data will not be automatically extended when cached."); - log_warn("WARNING: manual splitcache is required before extending thin pool data."); + log_warn("WARNING: Thin pool data will not be automatically extended when cached."); + log_warn("WARNING: Manual splitcache is required before extending thin pool data."); } cache_seg->chunk_size = chunk_size; diff --git a/lib/metadata/integrity_manip.c b/lib/metadata/integrity_manip.c index 43a9143a5..59f9ef7a6 100644 --- a/lib/metadata/integrity_manip.c +++ b/lib/metadata/integrity_manip.c @@ -848,7 +848,7 @@ void lv_clear_integrity_recalculate_metadata(struct logical_volume *lv) } if (!vg_write(vg) || !vg_commit(vg)) { - log_warn("WARNING: failed to clear integrity recalculate flag for %s", + log_warn("WARNING: Failed to clear integrity recalculate flag for %s.", display_lvname(lv)); } } diff --git a/lib/metadata/metadata.c b/lib/metadata/metadata.c index fcf17f461..096d26b42 100644 --- a/lib/metadata/metadata.c +++ b/lib/metadata/metadata.c @@ -2898,10 +2898,10 @@ static void _wipe_outdated_pvs(struct cmd_context *cmd, struct volume_group *vg) if (mdas) { dm_list_iterate_items(mda, mdas) { - log_warn("WARNING: wiping mda on outdated PV %s", dev_name(dev)); + log_warn("WARNING: Wiping mda on outdated PV %s.", dev_name(dev)); if (!text_wipe_outdated_pv_mda(cmd, dev, mda)) - log_warn("WARNING: failed to wipe mda on outdated PV %s", dev_name(dev)); + log_warn("WARNING: Failed to wipe mda on outdated PV %s.", dev_name(dev)); } } @@ -2916,10 +2916,10 @@ static void _wipe_outdated_pvs(struct cmd_context *cmd, struct volume_group *vg) lvmcache_set_ext_version(info, PV_HEADER_EXTENSION_VSN); lvmcache_set_ext_flags(info, ext_flags); - log_warn("WARNING: wiping header on outdated PV %s", dev_name(dev)); + log_warn("WARNING: Wiping header on outdated PV %s.", dev_name(dev)); if (!label_write(dev, label)) - log_warn("WARNING: failed to wipe header on outdated PV %s", dev_name(dev)); + log_warn("WARNING: Failed to wipe header on outdated PV %s.", dev_name(dev)); lvmcache_del(info); } @@ -3026,7 +3026,7 @@ int vg_write(struct volume_group *vg) new_pvl->pv = pvl->pv; dm_list_add(&vg->pv_write_list, &new_pvl->list); - log_warn("WARNING: updating PV header on %s for VG %s.", pv_dev_name(pvl->pv), vg->name); + log_warn("WARNING: Updating PV header on %s for VG %s.", pv_dev_name(pvl->pv), vg->name); } dm_list_iterate_items_safe(pvl, pvl_safe, &vg->pv_write_list) { @@ -3041,7 +3041,7 @@ int vg_write(struct volume_group *vg) continue; if (!(mda_dev = mda_get_device(mda))) { - log_warn("WARNING: mda without device."); + log_warn("WARNING: Mda without device."); continue; } @@ -3057,7 +3057,7 @@ int vg_write(struct volume_group *vg) * we see the old metadata. */ if (lvmcache_has_old_metadata(vg->cmd, vg->name, vgid, mda_dev)) { - log_warn("WARNING: updating old metadata to %u on %s for VG %s.", + log_warn("WARNING: Updating old metadata to %u on %s for VG %s.", vg->seqno, dev_name(mda_dev), vg->name); } @@ -4506,7 +4506,7 @@ void vg_write_commit_bad_mdas(struct cmd_context *cmd, struct volume_group *vg) (mda->bad_fields & BAD_MDA_INTERNAL) || (mda->bad_fields & BAD_MDA_MAGIC) || (mda->bad_fields & BAD_MDA_START)) { - log_warn("WARNING: not repairing bad metadata (0x%x) for mda%d on %s", + log_warn("WARNING: Not repairing bad metadata (0x%x) for mda%d on %s.", mda->bad_fields, mda->mda_num, dev_name(dev)); continue; } @@ -4525,23 +4525,23 @@ void vg_write_commit_bad_mdas(struct cmd_context *cmd, struct volume_group *vg) if (mda->bad_fields & BAD_MDA_VERSION) mda->ignore_bad_fields |= BAD_MDA_VERSION; - log_warn("WARNING: repairing bad metadata (0x%x) in mda%d at %llu on %s.", + log_warn("WARNING: Repairing bad metadata (0x%x) in mda%d at %llu on %s.", mda->bad_fields, mda->mda_num, (unsigned long long)mda->header_start, dev_name(dev)); if (!mda->ops->vg_write(vg->fid, vg, mda)) { - log_warn("WARNING: failed to write VG %s metadata to bad mda%d at %llu on %s.", + log_warn("WARNING: Failed to write VG %s metadata to bad mda%d at %llu on %s.", vg->name, mda->mda_num, (unsigned long long)mda->header_start, dev_name(dev)); continue; } if (!mda->ops->vg_precommit(vg->fid, vg, mda)) { - log_warn("WARNING: failed to precommit VG %s metadata to bad mda%d at %llu on %s.", + log_warn("WARNING: Failed to precommit VG %s metadata to bad mda%d at %llu on %s.", vg->name, mda->mda_num, (unsigned long long)mda->header_start, dev_name(dev)); continue; } if (!mda->ops->vg_commit(vg->fid, vg, mda)) { - log_warn("WARNING: failed to commit VG %s metadata to bad mda%d at %llu on %s.", + log_warn("WARNING: Failed to commit VG %s metadata to bad mda%d at %llu on %s.", vg->name, mda->mda_num, (unsigned long long)mda->header_start, dev_name(dev)); continue; } @@ -4852,7 +4852,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, if (vg->seqno == vg_ret->seqno) { release_vg(vg); } else if (vg->seqno > vg_ret->seqno) { - log_warn("WARNING: ignoring metadata seqno %u on %s for seqno %u on %s for VG %s.", + log_warn("WARNING: Ignoring metadata seqno %u on %s for seqno %u on %s for VG %s.", vg_ret->seqno, dev_name(dev_ret), vg->seqno, dev_name(mda_dev), vg->name); found_old_metadata = 1; @@ -4861,7 +4861,7 @@ static struct volume_group *_vg_read(struct cmd_context *cmd, dev_ret = mda_dev; vg_fmtdata = NULL; } else { /* vg->seqno < vg_ret->seqno */ - log_warn("WARNING: ignoring metadata seqno %u on %s for seqno %u on %s for VG %s.", + log_warn("WARNING: Ignoring metadata seqno %u on %s for seqno %u on %s for VG %s.", vg->seqno, dev_name(mda_dev), vg_ret->seqno, dev_name(dev_ret), vg->name); found_old_metadata = 1; @@ -5029,7 +5029,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const * name, but if the vgs have the same lv name, activating those lvs will fail. */ if (activating && original_vgid_set && is_duplicate_vgname) - log_warn("WARNING: activating multiple VGs with the same name is dangerous and may fail."); + log_warn("WARNING: Activating multiple VGs with the same name is dangerous and may fail."); if (!(vg = _vg_read(cmd, vg_name, vgid, 0, writing, &incorrect_pv_claim))) { unlock_vg(cmd, NULL, vg_name); @@ -5047,7 +5047,7 @@ struct volume_group *vg_read(struct cmd_context *cmd, const char *vg_name, const _check_pv_ext(cmd, vg); if (!vg_strip_outdated_historical_lvs(vg)) - log_warn("WARNING: failed to strip outdated historical lvs."); + log_warn("WARNING: Failed to strip outdated historical lvs."); /* * Check for missing devices in the VG. In most cases a VG cannot be diff --git a/lib/metadata/pool_manip.c b/lib/metadata/pool_manip.c index cbe1b3ff0..28c0b1477 100644 --- a/lib/metadata/pool_manip.c +++ b/lib/metadata/pool_manip.c @@ -760,7 +760,7 @@ int handle_pool_metadata_spare(struct volume_group *vg, uint32_t extents, /* TODO: Not showing when lvm.conf would define 'n' ? */ if (DEFAULT_POOL_METADATA_SPARE && extents) /* Warn if there would be any user */ - log_warn("WARNING: recovery of pools without pool " + log_warn("WARNING: Recovery of pools without pool " "metadata spare LV is not automated."); return 1; } diff --git a/lib/metadata/raid_manip.c b/lib/metadata/raid_manip.c index 48439c369..9f1ed73b2 100644 --- a/lib/metadata/raid_manip.c +++ b/lib/metadata/raid_manip.c @@ -2013,7 +2013,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv, log_print_unless_silent("If that leaves the logical volume larger than %llu extents due to stripe rounding,", (unsigned long long) extend_le_count); log_print_unless_silent("you may want to grow the content afterwards (filesystem etc.)"); - log_warn("WARNING: to remove freed stripes after the conversion has finished, you have to run \"lvconvert --stripes %u %s\"", + log_warn("WARNING: To remove freed stripes after the conversion has finished, you have to run \"lvconvert --stripes %u %s\".", new_stripes, display_lvname(lv)); if (!force) { @@ -2095,7 +2095,7 @@ static int _raid_reshape_remove_images(struct logical_volume *lv, else { seg->stripe_size = stripe_size; if (stripe_size_changed) - log_warn("WARNING: ignoring --stripesize on conversion of %s to 1 stripe.", + log_warn("WARNING: Ignoring --stripesize on conversion of %s to 1 stripe.", display_lvname(lv)); } @@ -6478,11 +6478,11 @@ static int _conversion_options_allowed(const struct lv_segment *seg_from, /* Can't reshape stripes or stripe size when performing a takeover! */ if (!_is_same_level(seg_from->segtype, *segtype_to)) { if (*stripes && *stripes != _data_rimages_count(seg_from, seg_from->area_count)) - log_warn("WARNING: ignoring --stripes option on takeover of %s (reshape afterwards).", + log_warn("WARNING: Ignoring --stripes option on takeover of %s (reshape afterwards).", display_lvname(seg_from->lv)); if (!seg_is_raid1(seg_from) && new_stripe_size_supplied) - log_warn("WARNING: ignoring --stripesize option on takeover of %s (reshape afterwards).", + log_warn("WARNING: Ignoring --stripesize option on takeover of %s (reshape afterwards).", display_lvname(seg_from->lv)); } diff --git a/lib/writecache/writecache.c b/lib/writecache/writecache.c index 013dab270..cf83ef3ef 100644 --- a/lib/writecache/writecache.c +++ b/lib/writecache/writecache.c @@ -325,13 +325,13 @@ static int _writecache_add_target_line(struct dev_manager *dm, } if (!_writecache_cleaner_supported && seg->writecache_settings.cleaner_set && seg->writecache_settings.cleaner) { - log_warn("WARNING: ignoring writecache setting \"cleaner\" which is not supported by kernel for LV %s.", seg->lv->name); + log_warn("WARNING: Ignoring writecache setting \"cleaner\" which is not supported by kernel for LV %s.", seg->lv->name); seg->writecache_settings.cleaner = 0; seg->writecache_settings.cleaner_set = 0; } if (!_writecache_max_age_supported && seg->writecache_settings.max_age_set) { - log_warn("WARNING: ignoring writecache setting \"max_age\" which is not supported by kernel for LV %s.", seg->lv->name); + log_warn("WARNING: Ignoring writecache setting \"max_age\" which is not supported by kernel for LV %s.", seg->lv->name); seg->writecache_settings.max_age = 0; seg->writecache_settings.max_age_set = 0; } diff --git a/libdm/libdm-stats.c b/libdm/libdm-stats.c index 81f71a5f6..9d63b01ce 100644 --- a/libdm/libdm-stats.c +++ b/libdm/libdm-stats.c @@ -4060,7 +4060,7 @@ merge: continue; if (_extents_overlap(ext, next)) { - log_warn("WARNING: region IDs " FMTu64 " and " + log_warn("WARNING: Region IDs " FMTu64 " and " FMTu64 " overlap. Some events will be " "counted twice.", ext->id, next->id); /* merge larger extent into smaller */ diff --git a/tools/lvchange.c b/tools/lvchange.c index 0ccebd344..78b2e8105 100644 --- a/tools/lvchange.c +++ b/tools/lvchange.c @@ -736,8 +736,8 @@ static int _lvchange_cache(struct cmd_context *cmd, goto_out; if (seg_is_cache(seg) && lv_is_cache_vol(seg->pool_lv) && (mode == CACHE_MODE_WRITEBACK)) { - log_warn("WARNING: repairing a damaged cachevol is not yet possible."); - log_warn("WARNING: cache mode writethrough is suggested for safe operation."); + log_warn("WARNING: Repairing a damaged cachevol is not yet possible."); + log_warn("WARNING: Cache mode writethrough is suggested for safe operation."); if (!arg_is_set(cmd, yes_ARG) && yes_no_prompt("Continue using writeback without repair?") == 'n') goto_out; diff --git a/tools/lvconvert.c b/tools/lvconvert.c index a69253361..94939a2e2 100644 --- a/tools/lvconvert.c +++ b/tools/lvconvert.c @@ -1913,8 +1913,8 @@ static int _lvconvert_split_and_keep_cachevol(struct cmd_context *cmd, */ if ((cache_mode != CACHE_MODE_WRITETHROUGH) && lv_is_partial(lv_fast)) { if (!arg_is_set(cmd, force_ARG)) { - log_warn("WARNING: writeback cache on %s is not complete and cannot be flushed.", display_lvname(lv_fast)); - log_warn("WARNING: cannot detach writeback cache from %s without --force.", display_lvname(lv)); + log_warn("WARNING: Writeback cache on %s is not complete and cannot be flushed.", display_lvname(lv_fast)); + log_warn("WARNING: Cannot detach writeback cache from %s without --force.", display_lvname(lv)); log_error("Conversion aborted."); return 0; } @@ -3687,8 +3687,8 @@ static int _cache_vol_attach(struct cmd_context *cmd, goto_out; if (cache_mode == CACHE_MODE_WRITEBACK) { - log_warn("WARNING: repairing a damaged cachevol is not yet possible."); - log_warn("WARNING: cache mode writethrough is suggested for safe operation."); + log_warn("WARNING: Repairing a damaged cachevol is not yet possible."); + log_warn("WARNING: Cache mode writethrough is suggested for safe operation."); if (!arg_is_set(cmd, yes_ARG) && yes_no_prompt("Continue using writeback without repair?") == 'n') goto_out; @@ -5723,8 +5723,8 @@ static int _lvconvert_detach_writecache(struct cmd_context *cmd, if (lv_is_partial(lv_fast) || (!active_begin && arg_is_set(cmd, force_ARG))) { if (!arg_is_set(cmd, force_ARG)) { - log_warn("WARNING: writecache on %s is not complete and cannot be flushed.", display_lvname(lv_fast)); - log_warn("WARNING: cannot detach writecache from %s without --force.", display_lvname(lv)); + log_warn("WARNING: Writecache on %s is not complete and cannot be flushed.", display_lvname(lv_fast)); + log_warn("WARNING: Cannot detach writecache from %s without --force.", display_lvname(lv)); log_error("Conversion aborted."); return 0; } @@ -6177,8 +6177,8 @@ skip_fs: block_size, lbs_4k ? 4096 : 512, pbs_4k ? 4096 : 512); if (block_size != 512) { - log_warn("WARNING: unable to detect a file system block size on %s", display_lvname(lv)); - log_warn("WARNING: using a writecache block size larger than the file system block size may corrupt the file system."); + log_warn("WARNING: Unable to detect a file system block size on %s.", display_lvname(lv)); + log_warn("WARNING: Using a writecache block size larger than the file system block size may corrupt the file system."); if (!arg_is_set(cmd, yes_ARG) && yes_no_prompt("Use writecache block size %u? [y/n]: ", block_size) == 'n') { log_error("Conversion aborted."); @@ -6282,7 +6282,7 @@ static int _check_writecache_memory(struct cmd_context *cmd, struct logical_volu * confirm if writecache needs > 90% of main memory. */ if (need_mem_bytes >= (proc_mem_bytes / 2)) { - log_warn("WARNING: writecache size %s will use %llu GiB of system memory (%llu GiB).", + log_warn("WARNING: Writecache size %s will use %llu GiB of system memory (%llu GiB).", display_size(cmd, lv_fast->size), (unsigned long long)need_mem_gb, (unsigned long long)proc_mem_gb); diff --git a/tools/lvmcmdline.c b/tools/lvmcmdline.c index b9f254fd8..a346c8a5d 100644 --- a/tools/lvmcmdline.c +++ b/tools/lvmcmdline.c @@ -3271,7 +3271,7 @@ int lvm_run_command(struct cmd_context *cmd, int argc, char **argv) locking_type = find_config_tree_int(cmd, global_locking_type_CFG, NULL); if (locking_type == 3) - log_warn("WARNING: see lvmlockd(8) for information on using cluster/clvm VGs."); + log_warn("WARNING: See lvmlockd(8) for information on using cluster/clvm VGs."); if ((locking_type == 0) || (locking_type == 5)) { log_warn("WARNING: locking_type (%d) is deprecated, using --nolocking.", locking_type); diff --git a/tools/lvmdevices.c b/tools/lvmdevices.c index fd766e102..6d9a629d3 100644 --- a/tools/lvmdevices.c +++ b/tools/lvmdevices.c @@ -826,7 +826,7 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv) cmd->filter_deviceid_skip = 1; if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, NULL)) { - log_warn("WARNING: adding device %s that is excluded: %s.", + log_warn("WARNING: Adding device %s that is excluded: %s.", dev_name(dev), dev_filtered_reason(dev)); } @@ -896,7 +896,7 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv) goto_bad; if (strncmp(devname, "/dev/", 5)) - log_warn("WARNING: to remove a device by device id, include --deviceidtype."); + log_warn("WARNING: To remove a device by device id, include --deviceidtype."); /* * No filter because we always want to allow removing a device @@ -948,7 +948,7 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv) } if (!strncmp(idname, "/dev/", 5)) - log_warn("WARNING: to remove a device by name, do not include --deviceidtype."); + log_warn("WARNING: To remove a device by name, do not include --deviceidtype."); if (!(du = get_du_for_device_id(cmd, idtype, idname))) { log_error("No devices file entry with device id %s %s.", idtype_str, idname); diff --git a/tools/lvmdiskscan.c b/tools/lvmdiskscan.c index ad7695d5f..5dbcd7ede 100644 --- a/tools/lvmdiskscan.c +++ b/tools/lvmdiskscan.c @@ -95,7 +95,7 @@ int lvmdiskscan(struct cmd_context *cmd, int argc __attribute__((unused)), _pv_parts_found = 0; if (arg_is_set(cmd, lvmpartition_ARG)) - log_warn("WARNING: only considering LVM devices"); + log_warn("WARNING: Only considering LVM devices."); /* Call before using dev_iter which uses filters which want bcache data. */ label_scan(cmd); diff --git a/tools/pvck.c b/tools/pvck.c index 2d1f25262..8ce685da9 100644 --- a/tools/pvck.c +++ b/tools/pvck.c @@ -596,9 +596,9 @@ static int _dump_all_text(struct cmd_context *cmd, struct settings *set, const c */ if (!_text_buf_parsable(text_buf, text_size)) - log_warn("WARNING: parse error for metadata at %llu", (unsigned long long)(mda_offset + buf_off)); + log_warn("WARNING: Parse error for metadata at %llu.", (unsigned long long)(mda_offset + buf_off)); if (bad_end) - log_warn("WARNING: unexpected terminating bytes for metadata at %llu", (unsigned long long)(mda_offset + buf_off)); + log_warn("WARNING: Unexpected terminating bytes for metadata at %llu.", (unsigned long long)(mda_offset + buf_off)); if (arg_is_set(cmd, verbose_ARG)) { char *str1, *str2; @@ -636,7 +636,7 @@ static int _dump_all_text(struct cmd_context *cmd, struct settings *set, const c } if (multiple_vgs) - log_warn("WARNING: metadata from multiple VGs was found."); + log_warn("WARNING: Metadata from multiple VGs was found."); if (fp) { if (fflush(fp)) @@ -1998,7 +1998,7 @@ static int _get_pv_info_from_metadata(struct cmd_context *cmd, struct settings * } if (pvid_cur_valid && set->pvid_set && memcmp(&pvid_cur, &pvid_set, ID_LEN)) { - log_warn("WARNING: existing PV UUID %s does not match pv_uuid setting %s.", + log_warn("WARNING: Existing PV UUID %s does not match pv_uuid setting %s.", pvid_cur, pvid_set); memcpy(&pvid_use, &pvid_set, ID_LEN); @@ -2287,7 +2287,7 @@ static int _repair_pv_header(struct cmd_context *cmd, const char *repair, log_warn("WARNING: PV will have no metadata with zero metadata areas."); } else if (!mda_count) { - log_warn("WARNING: no previous metadata areas found on device."); + log_warn("WARNING: No previous metadata areas found on device."); if (arg_is_set(cmd, yes_ARG) || yes_no_prompt("Should a metadata area be included? ") == 'y') { @@ -2908,7 +2908,7 @@ static int _check_metadata_file(struct cmd_context *cmd, struct metadata_file *m if (text_buf[text_size-1] != '\0' || text_buf[text_size-2] != '\n' || text_buf[text_size-3] != '\n') - log_warn("WARNING: unexpected final bytes of raw metadata, expected \\n\\n\\0."); + log_warn("WARNING: Unexpected final bytes of raw metadata, expected \\n\\n\\0."); if (_check_vgname_start(text_buf, &namelen)) { if (!(vgid = strstr(text_buf, "id = "))) { @@ -2919,7 +2919,7 @@ static int _check_metadata_file(struct cmd_context *cmd, struct metadata_file *m return 1; } - log_warn("WARNING: file data does not begin with a VG name and may be invalid."); + log_warn("WARNING: File data does not begin with a VG name and may be invalid."); if (!arg_is_set(cmd, yes_ARG) && yes_no_prompt("Write input file data to disk?") == 'n') { diff --git a/tools/pvremove.c b/tools/pvremove.c index 4a69d50bb..e8896f7a5 100644 --- a/tools/pvremove.c +++ b/tools/pvremove.c @@ -38,7 +38,7 @@ int pvremove(struct cmd_context *cmd, int argc, char **argv) if (!lock_global(cmd, "ex")) { /* Let pvremove -ff skip locks */ if (pp.force == DONT_PROMPT_OVERRIDE) - log_warn("WARNING: skipping global lock for force."); + log_warn("WARNING: Skipping global lock for force."); else return_ECMD_FAILED; } diff --git a/tools/pvscan.c b/tools/pvscan.c index fe7acee5d..59ea7f955 100644 --- a/tools/pvscan.c +++ b/tools/pvscan.c @@ -185,7 +185,7 @@ int pvscan_display_cmd(struct cmd_context *cmd, int argc, char **argv) } if (arg_is_set(cmd, exported_ARG) || arg_is_set(cmd, novolumegroup_ARG)) - log_warn("WARNING: only considering physical volumes %s", + log_warn("WARNING: Only considering physical volumes %s.", arg_is_set(cmd, exported_ARG) ? "of exported volume group(s)" : "in no volume group"); diff --git a/tools/toollib.c b/tools/toollib.c index 6f45a5ddf..562ce71d8 100644 --- a/tools/toollib.c +++ b/tools/toollib.c @@ -5165,7 +5165,7 @@ static void _check_pvcreate_prompt(struct cmd_context *cmd, } if (answer_yes && answer_no) { - log_warn("WARNING: prompt answer yes is overridden by prompt answer no."); + log_warn("WARNING: Prompt answer yes is overridden by prompt answer no."); answer_yes = 0; }