*
* . When dev_args is set, then complete VGs that that contain
* devs in dev_args will be returned in found_vgnames.
+ *
+ * found_vgnames is null for 'pvscan --cache' (without -aay)
+ * since the command does not need to keep track of complete
+ * vgs since it does not need to activate them.
*/
static void _online_pvscan_all_devs(struct cmd_context *cmd,
}
/* This PV without metadata may complete a VG. */
- if (pvid_without_metadata)
+ if (pvid_without_metadata && found_vgnames)
_check_vg_with_pvid_complete(cmd, found_vgnames, &all_vgs, pvid_without_metadata);
}