Lines Matching refs:sg

196 	struct g_llvm_segment *sg;
241 /* skip much of the calculations for a single sg */
245 sg = lv->lv_firstsg;
246 pv = sg->sg_pv;
247 cb->bio_offset = offset + sg->sg_pvoffset;
255 LIST_FOREACH(sg, &lv->lv_segs, sg_next) {
256 if (chunk_index >= sg->sg_start &&
257 chunk_index <= sg->sg_end) {
258 /* adjust chunk index for sg start */
259 chunk_index -= sg->sg_start;
260 pv = sg->sg_pv;
266 + in_chunk_offset + sg->sg_pvoffset;
313 struct g_llvm_segment *sg;
325 LIST_FOREACH(sg, &lv->lv_segs, sg_next) {
326 if (sg->sg_pv == pv) {
327 sg->sg_pv = NULL;
394 struct g_llvm_segment *sg;
454 LIST_FOREACH(sg, &lv->lv_segs, sg_next) {
455 if (strcmp(sg->sg_pvname, pv->pv_name) == 0) {
457 KASSERT(sg->sg_pv == NULL,
459 sg->sg_pvoffset =
460 (off_t)sg->sg_pvstart * vg->vg_extentsize
462 sg->sg_pv = pv;
467 lv->lv_name, sg->sg_start, sg->sg_end,
468 sg->sg_pvname, sg->sg_pvstart,
469 sg->sg_pvoffset,
470 sg->sg_pvoffset / vg->vg_sectorsize);
494 struct g_llvm_segment *sg;
502 while ((sg = LIST_FIRST(&lv->lv_segs)) != NULL) {
503 LIST_REMOVE(sg, sg_next);
504 free(sg, M_GLLVM);
1039 struct g_llvm_segment *sg;
1093 while ((sg = LIST_FIRST(&lv->lv_segs)) != NULL) {
1094 LIST_REMOVE(sg, sg_next);
1095 free(sg, M_GLLVM);
1104 struct g_llvm_segment *sg;
1111 sg = malloc(sizeof(*sg), M_GLLVM, M_NOWAIT|M_ZERO);
1112 if (sg == NULL)
1141 strncpy(sg->sg_pvname, v, sizeof(sg->sg_pvname));
1146 sg->sg_pvstart = strtol(tok, &v, 10);
1157 GRAB_INT("start_extent", v, tok, sg->sg_start);
1158 GRAB_INT("extent_count", v, tok, sg->sg_count);
1165 if (count != 1 || sg->sg_count == 0)
1168 sg->sg_end = sg->sg_start + sg->sg_count - 1;
1170 lv->lv_extentcount += sg->sg_count;
1171 LIST_INSERT_HEAD(&lv->lv_segs, sg, sg_next);
1175 free(sg, M_GLLVM);