if (!pv)
return_NULL;
+ pv->fid = NULL;
pv->pe_size = 0;
pv->pe_start = 0;
pv->pe_count = 0;
unsigned metadataignore, struct dm_list *mdas)
{
const struct format_type *fmt = cmd->fmt;
+ struct format_instance_ctx fic;
struct dm_pool *mem = fmt->cmd->mem;
struct physical_volume *pv = _alloc_pv(mem, dev);
goto bad;
}
+ fic.type = FMT_INSTANCE_PV;
+ fic.context.pv_id = (const char *) &pv->id;
+ if (!(pv->fid = fmt->ops->create_instance(fmt, &fic))) {
+ log_error("Couldn't create format instance for PV %s.", pv_dev_name(pv));
+ goto bad;
+ }
+
pv->fmt = fmt;
pv->vg_name = fmt->orphan_vg_name;
struct id id;
struct device *dev;
const struct format_type *fmt;
+ struct format_instance *fid;
/*
* vg_name and vgid are used before the parent VG struct exists.