|
|
38b7b2 |
From 090dc0c320f0abee8ab79f4eaea6561c195b5009 Mon Sep 17 00:00:00 2001
|
|
|
38b7b2 |
From: David Teigland <teigland@redhat.com>
|
|
|
38b7b2 |
Date: Thu, 31 Mar 2022 11:38:08 -0500
|
|
|
38b7b2 |
Subject: [PATCH 41/54] change messages about filtered devices
|
|
|
38b7b2 |
|
|
|
38b7b2 |
Change messages that refer to devices being "excluded by filters"
|
|
|
38b7b2 |
to say just "excluded". This will avoid mistaking the word
|
|
|
38b7b2 |
"filters" with the lvm.conf filter setting.
|
|
|
38b7b2 |
---
|
|
|
38b7b2 |
lib/device/device_id.c | 6 +++---
|
|
|
38b7b2 |
tools/lvmdevices.c | 4 ++--
|
|
|
38b7b2 |
tools/pvscan.c | 4 ++--
|
|
|
38b7b2 |
tools/vgimportclone.c | 4 ++--
|
|
|
38b7b2 |
4 files changed, 9 insertions(+), 9 deletions(-)
|
|
|
38b7b2 |
|
|
|
38b7b2 |
diff --git a/lib/device/device_id.c b/lib/device/device_id.c
|
|
|
38b7b2 |
index 82db6e4a5..6133e700a 100644
|
|
|
38b7b2 |
--- a/lib/device/device_id.c
|
|
|
38b7b2 |
+++ b/lib/device/device_id.c
|
|
|
38b7b2 |
@@ -1744,7 +1744,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
|
|
|
38b7b2 |
* probably wants to do something about it.
|
|
|
38b7b2 |
*/
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, "persistent")) {
|
|
|
38b7b2 |
- log_warn("Devices file %s is excluded by filter: %s.",
|
|
|
38b7b2 |
+ log_warn("Devices file %s is excluded: %s.",
|
|
|
38b7b2 |
dev_name(dev), dev_filtered_reason(dev));
|
|
|
38b7b2 |
continue;
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
@@ -1830,7 +1830,7 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs,
|
|
|
38b7b2 |
continue;
|
|
|
38b7b2 |
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, "persistent")) {
|
|
|
38b7b2 |
- log_warn("Devices file %s is excluded by filter: %s.",
|
|
|
38b7b2 |
+ log_warn("Devices file %s is excluded: %s.",
|
|
|
38b7b2 |
dev_name(dev), dev_filtered_reason(dev));
|
|
|
38b7b2 |
/* FIXME: what if this dev is wrongly matched and should be checked below? */
|
|
|
38b7b2 |
continue;
|
|
|
38b7b2 |
@@ -2266,7 +2266,7 @@ void device_ids_find_renamed_devs(struct cmd_context *cmd, struct dm_list *dev_l
|
|
|
38b7b2 |
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, NULL)) {
|
|
|
38b7b2 |
/* I don't think this would happen */
|
|
|
38b7b2 |
- log_warn("WARNING: new device %s for PVID %s does not pass filter %s.",
|
|
|
38b7b2 |
+ log_warn("WARNING: new device %s for PVID %s is excluded: %s.",
|
|
|
38b7b2 |
dev_name(dev), dil->pvid, dev_filtered_reason(dev));
|
|
|
38b7b2 |
if (du) /* Should not happen 'du' is NULL */
|
|
|
38b7b2 |
du->dev = NULL;
|
|
|
38b7b2 |
diff --git a/tools/lvmdevices.c b/tools/lvmdevices.c
|
|
|
38b7b2 |
index 662b35f9a..8521b89ea 100644
|
|
|
38b7b2 |
--- a/tools/lvmdevices.c
|
|
|
38b7b2 |
+++ b/tools/lvmdevices.c
|
|
|
38b7b2 |
@@ -112,7 +112,7 @@ static void _search_devs_for_pvids(struct cmd_context *cmd, struct dm_list *sear
|
|
|
38b7b2 |
dev = devl->dev;
|
|
|
38b7b2 |
cmd->filter->wipe(cmd, cmd->filter, dev, NULL);
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, NULL)) {
|
|
|
38b7b2 |
- log_warn("WARNING: PVID %s found on %s which is excluded by filter: %s",
|
|
|
38b7b2 |
+ log_warn("WARNING: PVID %s found on %s which is excluded: %s",
|
|
|
38b7b2 |
dev->pvid, dev_name(dev), dev_filtered_reason(dev));
|
|
|
38b7b2 |
dm_list_del(&devl->list);
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
@@ -310,7 +310,7 @@ int lvmdevices(struct cmd_context *cmd, int argc, char **argv)
|
|
|
38b7b2 |
cmd->filter_deviceid_skip = 1;
|
|
|
38b7b2 |
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, NULL)) {
|
|
|
38b7b2 |
- log_warn("WARNING: adding device %s that is excluded by filter: %s.",
|
|
|
38b7b2 |
+ log_warn("WARNING: adding device %s that is excluded: %s.",
|
|
|
38b7b2 |
dev_name(dev), dev_filtered_reason(dev));
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
|
|
|
38b7b2 |
diff --git a/tools/pvscan.c b/tools/pvscan.c
|
|
|
38b7b2 |
index 160a2c9a0..50d46051a 100644
|
|
|
38b7b2 |
--- a/tools/pvscan.c
|
|
|
38b7b2 |
+++ b/tools/pvscan.c
|
|
|
38b7b2 |
@@ -1756,7 +1756,7 @@ static int _pvscan_cache_args(struct cmd_context *cmd, int argc, char **argv,
|
|
|
38b7b2 |
|
|
|
38b7b2 |
dm_list_iterate_items_safe(devl, devl2, &pvscan_devs) {
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, devl->dev, NULL)) {
|
|
|
38b7b2 |
- log_print_pvscan(cmd, "%s excluded by filters: %s.",
|
|
|
38b7b2 |
+ log_print_pvscan(cmd, "%s excluded: %s.",
|
|
|
38b7b2 |
dev_name(devl->dev), dev_filtered_reason(devl->dev));
|
|
|
38b7b2 |
dm_list_del(&devl->list);
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
@@ -1813,7 +1813,7 @@ static int _pvscan_cache_args(struct cmd_context *cmd, int argc, char **argv,
|
|
|
38b7b2 |
|
|
|
38b7b2 |
/* Applies all filters, including those that need data from dev. */
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, devl->dev, NULL)) {
|
|
|
38b7b2 |
- log_print_pvscan(cmd, "%s excluded by filters: %s.",
|
|
|
38b7b2 |
+ log_print_pvscan(cmd, "%s excluded: %s.",
|
|
|
38b7b2 |
dev_name(devl->dev), dev_filtered_reason(devl->dev));
|
|
|
38b7b2 |
dm_list_del(&devl->list);
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
diff --git a/tools/vgimportclone.c b/tools/vgimportclone.c
|
|
|
38b7b2 |
index 23bb6271f..cab501619 100644
|
|
|
38b7b2 |
--- a/tools/vgimportclone.c
|
|
|
38b7b2 |
+++ b/tools/vgimportclone.c
|
|
|
38b7b2 |
@@ -311,8 +311,8 @@ int vgimportclone(struct cmd_context *cmd, int argc, char **argv)
|
|
|
38b7b2 |
*/
|
|
|
38b7b2 |
dm_list_iterate_items(devl, &vp.new_devs) {
|
|
|
38b7b2 |
if (!cmd->filter->passes_filter(cmd, cmd->filter, devl->dev, "persistent")) {
|
|
|
38b7b2 |
- /* FIXME: print which filter */
|
|
|
38b7b2 |
- log_error("Device %s was excluded by filters.", dev_name(devl->dev));
|
|
|
38b7b2 |
+ log_error("Device %s is excluded: %s.",
|
|
|
38b7b2 |
+ dev_name(devl->dev), dev_filtered_reason(devl->dev));
|
|
|
38b7b2 |
goto out;
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
}
|
|
|
38b7b2 |
--
|
|
|
38b7b2 |
2.34.3
|
|
|
38b7b2 |
|