return_0;
pvl->pv->fmt = fmt;
- dm_list_add(&vg->pvs, &pvl->list);
- vg->pv_count++;
+ add_pvl_to_vgs(vg, pvl);
}
return 1;
vg->extent_count += pv->pe_count;
vg->free_count += pv->pe_count;
- vg->pv_count++;
- dm_list_add(&vg->pvs, &pvl->list);
+ add_pvl_to_vgs(vg, pvl);
return 1;
}
return pv->pe_align_offset;
}
+void add_pvl_to_vgs(struct volume_group *vg, struct pv_list *pvl)
+{
+ dm_list_add(&vg->pvs, &pvl->list);
+ vg->pv_count++;
+}
+
+
/**
* add_pv_to_vg - Add a physical volume to a volume group
* @vg - volume group to add to
}
pvl->pv = pv;
- dm_list_add(&vg->pvs, &pvl->list);
-
- vg->pv_count++;
+ add_pvl_to_vgs(vg, pvl);
vg->extent_count += pv->pe_count;
vg->free_count += pv->pe_count;
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);
+void add_pvl_to_vgs(struct volume_group *vg, struct pv_list *pvl);
#endif