Lines Matching defs:lv

91 static int _is_converting(struct logical_volume *lv)
95 if (lv->status & MIRRORED) {
96 seg = first_seg(lv);
173 * the lv segments.
277 static void _insert_segment(struct logical_volume *lv, struct lv_segment *seg)
281 dm_list_iterate_items(comp, &lv->segments) {
288 lv->le_count += seg->len;
289 dm_list_add(&lv->segments, &seg->list);
293 struct logical_volume *lv, struct config_node *sn,
311 "of logical volume %s.", sn->key, lv->name);
317 "of logical volume %s.", sn->key, lv->name);
339 if (!(seg = alloc_lv_segment(mem, segtype, lv, start_extent,
354 vg->name, lv->name);
361 _insert_segment(lv, seg);
364 lv->status |= MIRRORED;
367 lv->status |= VIRTUAL;
369 if (_is_converting(lv))
370 lv->status |= CONVERTING;
412 } else if ((lv1 = find_lv(seg->lv->vg, cv->v.str))) {
440 struct logical_volume *lv, struct config_node *lvn,
452 if (!_read_segment(mem, vg, lv, sn, pv_hash))
458 if ((lv->status & SNAPSHOT) && count > 1) {
466 lv->name);
472 "disagree for logical volume %s.", lv->name);
477 * Check there are no gaps or overlaps in the lv.
479 if (!check_lv_segments(lv, 0))
485 if (!lv_merge_segments(lv))
497 struct logical_volume *lv;
500 if (!(lv = alloc_lv(mem)))
503 if (!(lv->name = dm_pool_strdup(mem, lvn->key)))
511 if (!_read_flag_config(lvn, &lv->status, LV_FLAGS)) {
513 lv->name);
517 lv->alloc = ALLOC_INHERIT;
525 lv->alloc = get_alloc_from_string(cv->v.str);
526 if (lv->alloc == ALLOC_INVALID)
530 if (!_read_int32(lvn, "read_ahead", &lv->read_ahead))
532 lv->read_ahead = vg->cmd->default_settings.read_ahead;
534 switch (lv->read_ahead) {
536 lv->read_ahead = DM_READ_AHEAD_AUTO;
539 lv->read_ahead = DM_READ_AHEAD_NONE;
548 !(read_tags(mem, &lv->tags, cn->v))) {
550 vg->name, lv->name);
554 return link_lv_to_vg(vg, lv);
563 struct logical_volume *lv;
571 lv = lvl->lv;
579 if (!_read_id(&lv->lvid.id[1], lvn, "id")) {
581 lv->name);
585 memcpy(&lv->lvid.id[0], &lv->vg->id, sizeof(lv->lvid.id[0]));
587 if (!_read_segments(mem, vg, lv, lvn, pv_hash))
590 lv->size = (uint64_t) lv->le_count * (uint64_t) vg->extent_size;
592 lv->minor = -1;
593 if ((lv->status & FIXED_MINOR) &&
594 !_read_int32(lvn, "minor", &lv->minor)) {
596 "volume %s.", lv->name);
600 lv->major = -1;
601 if ((lv->status & FIXED_MINOR) &&
602 !_read_int32(lvn, "major", &lv->major)) {
604 "volume %s.", lv->name);
705 * implicitly when reading in the pv's and lv's.