* propagated transitively, so LVs referencing other LVs are marked
* partial as well, if any of their referenced LVs are marked partial.
*/
-int vg_mark_partial_lvs(struct volume_group *vg)
+int vg_mark_partial_lvs(struct volume_group *vg, int clear)
{
+ struct lv_list *lvl;
+
+ if (clear)
+ dm_list_iterate_items(lvl, &vg->lvs)
+ lvl->lv->status &= ~PARTIAL_LV;
+
if (!_lv_postorder_vg(vg, _lv_mark_if_partial_single, NULL))
return_0;
-
return 1;
}
if (vg_missing_pv_count(correct_vg)) {
log_verbose("There are %d physical volumes missing.",
vg_missing_pv_count(correct_vg));
- vg_mark_partial_lvs(correct_vg);
+ vg_mark_partial_lvs(correct_vg, 1);
}
return correct_vg;
} else {
if (vg_missing_pv_count(correct_vg)) {
log_verbose("There are %d physical volumes missing.",
vg_missing_pv_count(correct_vg));
- vg_mark_partial_lvs(correct_vg);
+ vg_mark_partial_lvs(correct_vg, 1);
}
if ((correct_vg->status & PVMOVE) && !pvmove_mode()) {
struct physical_volume *pv_by_path(struct cmd_context *cmd, const char *pv_name);
int add_pv_to_vg(struct volume_group *vg, const char *pv_name,
struct physical_volume *pv);
-int vg_mark_partial_lvs(struct volume_group *vg);
int is_mirror_image_removable(struct logical_volume *mimage_lv, void *baton);
uint64_t find_min_mda_size(struct dm_list *mdas);