diff options
Diffstat (limited to 'lib/device/device_id.c')
-rw-r--r-- | lib/device/device_id.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/device/device_id.c b/lib/device/device_id.c index 4618247ba..003f10a96 100644 --- a/lib/device/device_id.c +++ b/lib/device/device_id.c @@ -1747,6 +1747,13 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs, continue; /* + * The matched device could not be read so we do not have + * the PVID from disk and cannot verify the devices file entry. + */ + if (dev->flags & DEV_SCAN_NOT_READ) + continue; + + /* * du and dev may have been matched, but the dev could still * have been excluded by other filters during label scan. * This shouldn't generally happen, but if it does the user @@ -1828,6 +1835,13 @@ void device_ids_validate(struct cmd_context *cmd, struct dm_list *scanned_devs, if (scanned_devs && !dev_in_device_list(dev, scanned_devs)) continue; + /* + * The matched device could not be read so we do not have + * the PVID from disk and cannot verify the devices file entry. + */ + if (dev->flags & DEV_SCAN_NOT_READ) + continue; + if (!cmd->filter->passes_filter(cmd, cmd->filter, dev, "persistent")) { log_warn("Devices file %s is excluded by filter: %s.", dev_name(dev), dev_filtered_reason(dev)); |