Lines Matching full:lv

197 	struct g_llvm_lv *lv;  in g_llvm_start()  local
207 lv = pp->private; in g_llvm_start()
246 if (lv->lv_sgcount == 1) { in g_llvm_start()
251 sg = lv->lv_firstsg; in g_llvm_start()
261 LIST_FOREACH(sg, &lv->lv_segs, sg_next) { in g_llvm_start()
288 offset, length, lv->lv_name, in g_llvm_start()
318 struct g_llvm_lv *lv; in g_llvm_remove_disk() local
328 LIST_FOREACH(lv, &vg->vg_lvs, lv_next) { in g_llvm_remove_disk()
331 LIST_FOREACH(sg, &lv->lv_segs, sg_next) { in g_llvm_remove_disk()
334 lv->lv_sgactive--; in g_llvm_remove_disk()
341 lv->lv_gprov->name); in g_llvm_remove_disk()
342 g_wither_provider(lv->lv_gprov, ENXIO); in g_llvm_remove_disk()
343 lv->lv_gprov = NULL; in g_llvm_remove_disk()
370 g_llvm_activate_lv(struct g_llvm_vg *vg, struct g_llvm_lv *lv) in g_llvm_activate_lv() argument
377 KASSERT(lv->lv_sgactive == lv->lv_sgcount, ("segment missing")); in g_llvm_activate_lv()
380 pp = g_new_providerf(gp, "linux_lvm/%s-%s", vg->vg_name, lv->lv_name); in g_llvm_activate_lv()
381 pp->mediasize = vg->vg_extentsize * (off_t)lv->lv_extentcount; in g_llvm_activate_lv()
384 lv->lv_gprov = pp; in g_llvm_activate_lv()
385 pp->private = lv; in g_llvm_activate_lv()
399 struct g_llvm_lv *lv; in g_llvm_add_disk() local
458 LIST_FOREACH(lv, &vg->vg_lvs, lv_next) { in g_llvm_add_disk()
460 LIST_FOREACH(sg, &lv->lv_segs, sg_next) { in g_llvm_add_disk()
469 lv->lv_sgactive++; in g_llvm_add_disk()
473 lv->lv_name, sg->sg_start, sg->sg_end, in g_llvm_add_disk()
480 if (lv->lv_gprov == NULL && lv->lv_sgactive == lv->lv_sgcount) { in g_llvm_add_disk()
481 error = g_llvm_activate_lv(vg, lv); in g_llvm_add_disk()
499 struct g_llvm_lv *lv; in g_llvm_free_vg() local
507 while ((lv = LIST_FIRST(&vg->vg_lvs)) != NULL) { in g_llvm_free_vg()
508 while ((sg = LIST_FIRST(&lv->lv_segs)) != NULL) { in g_llvm_free_vg()
512 LIST_REMOVE(lv, lv_next); in g_llvm_free_vg()
513 free(lv, M_GLLVM); in g_llvm_free_vg()
1056 struct g_llvm_lv *lv; in llvm_textconf_decode_lv() local
1064 lv = malloc(sizeof(*lv), M_GLLVM, M_NOWAIT|M_ZERO); in llvm_textconf_decode_lv()
1065 if (lv == NULL) in llvm_textconf_decode_lv()
1068 lv->lv_vg = vg; in llvm_textconf_decode_lv()
1069 LIST_INIT(&lv->lv_segs); in llvm_textconf_decode_lv()
1073 len = llvm_grab_name(lv->lv_name, tok); in llvm_textconf_decode_lv()
1080 llvm_textconf_decode_sg(buf, tok, lv); in llvm_textconf_decode_lv()
1093 GRAB_STR("id", v, tok, lv->lv_uuid, sizeof(lv->lv_uuid)); in llvm_textconf_decode_lv()
1094 GRAB_INT("segment_count", v, tok, lv->lv_sgcount); in llvm_textconf_decode_lv()
1100 if (lv->lv_sgcount == 0 || lv->lv_sgcount != lv->lv_numsegs) in llvm_textconf_decode_lv()
1105 lv->lv_firstsg = LIST_FIRST(&lv->lv_segs); in llvm_textconf_decode_lv()
1106 LIST_INSERT_HEAD(&vg->vg_lvs, lv, lv_next); in llvm_textconf_decode_lv()
1107 G_LLVM_DEBUG(3, "lv: name=%s uuid=%s", lv->lv_name, lv->lv_uuid); in llvm_textconf_decode_lv()
1111 while ((sg = LIST_FIRST(&lv->lv_segs)) != NULL) { in llvm_textconf_decode_lv()
1115 free(lv, M_GLLVM); in llvm_textconf_decode_lv()
1120 llvm_textconf_decode_sg(char **buf, char *tok, struct g_llvm_lv *lv) in llvm_textconf_decode_sg() argument
1187 lv->lv_numsegs++; in llvm_textconf_decode_sg()
1188 lv->lv_extentcount += sg->sg_count; in llvm_textconf_decode_sg()
1189 LIST_INSERT_HEAD(&lv->lv_segs, sg, sg_next); in llvm_textconf_decode_sg()