• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /freebsd-12-stable/sys/geom/linux_lvm/

Lines Matching refs:sg

198 	struct g_llvm_segment *sg;
243 /* skip much of the calculations for a single sg */
247 sg = lv->lv_firstsg;
248 pv = sg->sg_pv;
249 cb->bio_offset = offset + sg->sg_pvoffset;
257 LIST_FOREACH(sg, &lv->lv_segs, sg_next) {
258 if (chunk_index >= sg->sg_start &&
259 chunk_index <= sg->sg_end) {
260 /* adjust chunk index for sg start */
261 chunk_index -= sg->sg_start;
262 pv = sg->sg_pv;
268 + in_chunk_offset + sg->sg_pvoffset;
315 struct g_llvm_segment *sg;
327 LIST_FOREACH(sg, &lv->lv_segs, sg_next) {
328 if (sg->sg_pv == pv) {
329 sg->sg_pv = NULL;
396 struct g_llvm_segment *sg;
456 LIST_FOREACH(sg, &lv->lv_segs, sg_next) {
457 if (strcmp(sg->sg_pvname, pv->pv_name) == 0) {
459 KASSERT(sg->sg_pv == NULL,
461 sg->sg_pvoffset =
462 (off_t)sg->sg_pvstart * vg->vg_extentsize
464 sg->sg_pv = pv;
469 lv->lv_name, sg->sg_start, sg->sg_end,
470 sg->sg_pvname, sg->sg_pvstart,
471 sg->sg_pvoffset,
472 sg->sg_pvoffset / vg->vg_sectorsize);
496 struct g_llvm_segment *sg;
504 while ((sg = LIST_FIRST(&lv->lv_segs)) != NULL) {
505 LIST_REMOVE(sg, sg_next);
506 free(sg, M_GLLVM);
1041 struct g_llvm_segment *sg;
1095 while ((sg = LIST_FIRST(&lv->lv_segs)) != NULL) {
1096 LIST_REMOVE(sg, sg_next);
1097 free(sg, M_GLLVM);
1106 struct g_llvm_segment *sg;
1113 sg = malloc(sizeof(*sg), M_GLLVM, M_NOWAIT|M_ZERO);
1114 if (sg == NULL)
1143 strncpy(sg->sg_pvname, v, sizeof(sg->sg_pvname));
1148 sg->sg_pvstart = strtol(tok, &v, 10);
1159 GRAB_INT("start_extent", v, tok, sg->sg_start);
1160 GRAB_INT("extent_count", v, tok, sg->sg_count);
1167 if (count != 1 || sg->sg_count == 0)
1170 sg->sg_end = sg->sg_start + sg->sg_count - 1;
1172 lv->lv_extentcount += sg->sg_count;
1173 LIST_INSERT_HEAD(&lv->lv_segs, sg, sg_next);
1177 free(sg, M_GLLVM);