unsigned activate_component:1; /* command activates component LV */
unsigned process_component_lvs:1; /* command processes also component LVs */
unsigned mirror_warn_printed:1; /* command already printed warning about non-monitored mirrors */
- unsigned pvscan_cache_single:1;
+ unsigned expect_missing_vg_device:1; /* when reading a vg it's expected that a dev for a pv isn't found */
unsigned can_use_one_scan:1;
unsigned is_clvmd:1;
unsigned md_component_detection:1;
{
int held = 0;
- /* Defer updates to non-pvscan-cache commands. */
- if (cmd->pvscan_cache_single) {
- log_print("pvscan[%d] skip updating devices file.", getpid());
+ if (cmd->expect_missing_vg_device) {
+ log_print("skip updating devices file.");
return;
}
if (!id_write_format(&pv->id, buffer, sizeof(buffer)))
buffer[0] = '\0';
- if (cmd && !cmd->pvscan_cache_single &&
+ if (cmd && !cmd->expect_missing_vg_device &&
(!vg_is_foreign(vg) && !cmd->include_foreign_vgs))
log_warn("WARNING: Couldn't find device with uuid %s.", buffer);
else
if (!pvl->pv->dev) {
/* The obvious and common case of a missing device. */
- if (vg_is_foreign(vg) && !cmd->include_foreign_vgs)
+ if ((vg_is_foreign(vg) && !cmd->include_foreign_vgs) || cmd->expect_missing_vg_device)
log_debug("VG %s is missing PV %s (last written to %s)", vg_name, uuidstr, pvl->pv->device_hint ?: "na");
else if (pvl->pv->device_hint)
log_warn("WARNING: VG %s is missing PV %s (last written to %s).", vg_name, uuidstr, pvl->pv->device_hint);
dm_list_init(&pvscan_args);
dm_list_init(&pvscan_devs);
- cmd->pvscan_cache_single = 1;
+ cmd->expect_missing_vg_device = 1;
/*
* Special pvscan-specific setup steps to avoid looking