Lines Matching refs:lv
62 struct logical_volume *lv;
64 if (!(lv = alloc_lv(mem)))
67 lv->status = 0;
68 lv->alloc = ALLOC_NORMAL;
69 lv->size = 0;
70 lv->name = NULL;
71 lv->le_count = 0;
72 lv->read_ahead = vg->cmd->default_settings.read_ahead;
75 lv->size += pl->pd.pl_blocks;
77 if (lv->name)
80 if (!(lv->name = dm_pool_strdup(mem, pl->pd.pl_pool_name)))
83 get_pool_lv_uuid(lv->lvid.id, &pl->pd);
84 log_debug("Calculated lv uuid for lv %s: %s", lv->name,
85 lv->lvid.s);
87 lv->status |= VISIBLE_LV | LVM_READ | LVM_WRITE;
88 lv->major = POOL_MAJOR;
92 lv->status |= FIXED_MINOR;
93 lv->minor = pl->pd.pl_minor + MINOR_OFFSET;
95 lv->minor = -1;
99 lv->le_count = lv->size / POOL_PE_SIZE;
101 return link_lv_to_vg(vg, lv);
180 struct user_subpool *usp, struct logical_volume *lv,
195 if (!(segtype = get_segtype_from_string(lv->vg->cmd,
199 if (!(seg = alloc_lv_segment(mem, segtype, lv, *le_cur,
214 dm_list_add(&lv->segments, &seg->list);
222 struct user_subpool *usp, struct logical_volume *lv,
230 if (!(segtype = get_segtype_from_string(lv->vg->cmd, "striped")))
236 if (!(seg = alloc_lv_segment(mem, segtype, lv, *le_cur,
250 dm_list_add(&lv->segments, &seg->list);
262 struct logical_volume *lv;
267 lv = lvl->lv;
269 if (lv->status & SNAPSHOT)
274 if (!_add_stripe_seg(mem, &usp[i], lv, &le_cur))
277 if (!_add_linear_seg(mem, &usp[i], lv, &le_cur))