Lines Matching full:gp

63 static int g_mountver_destroy(struct g_geom *gp, boolean_t force);
66 struct g_geom *gp);
70 struct g_geom *gp, struct g_consumer *cp, struct g_provider *pp);
99 struct g_geom *gp; in g_mountver_done() local
104 gp = cp->geom; in g_mountver_done()
117 KASSERT(pbp->bio_to == LIST_FIRST(&gp->provider), in g_mountver_done()
124 sc = gp->softc; in g_mountver_done()
136 g_mountver_send(struct g_geom *gp, struct bio *bp) in g_mountver_send() argument
138 struct g_mountver_softc *sc = gp->softc; in g_mountver_send()
149 cp = LIST_FIRST(&gp->consumer); in g_mountver_send()
161 struct g_geom *gp; in g_mountver_queue() local
163 gp = bp->bio_to->geom; in g_mountver_queue()
164 sc = gp->softc; in g_mountver_queue()
172 g_mountver_send_queued(struct g_geom *gp) in g_mountver_send_queued() argument
177 sc = gp->softc; in g_mountver_send_queued()
184 g_mountver_send(gp, bp); in g_mountver_send_queued()
191 g_mountver_discard_queued(struct g_geom *gp) in g_mountver_discard_queued() argument
196 sc = gp->softc; in g_mountver_discard_queued()
213 struct g_geom *gp; in g_mountver_start() local
215 gp = bp->bio_to->geom; in g_mountver_start()
216 sc = gp->softc; in g_mountver_start()
235 g_mountver_send_queued(gp); in g_mountver_start()
239 g_mountver_send(gp, bp); in g_mountver_start()
247 struct g_geom *gp; in g_mountver_access() local
252 gp = pp->geom; in g_mountver_access()
253 cp = LIST_FIRST(&gp->consumer); in g_mountver_access()
254 sc = gp->softc; in g_mountver_access()
273 struct g_geom *gp; in g_mountver_create() local
283 gp = NULL; in g_mountver_create()
288 LIST_FOREACH(gp, &mp->geom, geom) { in g_mountver_create()
289 if (strcmp(gp->name, name) == 0) { in g_mountver_create()
294 gp = g_new_geomf(mp, "%s", name); in g_mountver_create()
299 gp->softc = sc; in g_mountver_create()
300 gp->start = g_mountver_start; in g_mountver_create()
301 gp->orphan = g_mountver_orphan; in g_mountver_create()
302 gp->resize = g_mountver_resize; in g_mountver_create()
303 gp->access = g_mountver_access; in g_mountver_create()
304 gp->dumpconf = g_mountver_dumpconf; in g_mountver_create()
306 newpp = g_new_providerf(gp, "%s", gp->name); in g_mountver_create()
314 G_MOUNTVER_DEBUG(0, "Unmapped supported for %s.", gp->name); in g_mountver_create()
317 G_MOUNTVER_DEBUG(0, "Unmapped unsupported for %s.", gp->name); in g_mountver_create()
321 cp = g_new_consumer(gp); in g_mountver_create()
346 G_MOUNTVER_DEBUG(0, "Device %s created.", gp->name); in g_mountver_create()
354 g_free(gp->softc); in g_mountver_create()
355 g_destroy_geom(gp); in g_mountver_create()
360 g_mountver_destroy(struct g_geom *gp, boolean_t force) in g_mountver_destroy() argument
366 if (gp->softc == NULL) in g_mountver_destroy()
368 sc = gp->softc; in g_mountver_destroy()
369 pp = LIST_FIRST(&gp->provider); in g_mountver_destroy()
380 G_MOUNTVER_DEBUG(0, "Device %s removed.", gp->name); in g_mountver_destroy()
384 g_mountver_discard_queued(gp); in g_mountver_destroy()
386 g_free(gp->softc); in g_mountver_destroy()
387 gp->softc = NULL; in g_mountver_destroy()
388 g_wither_geom(gp, ENXIO); in g_mountver_destroy()
394 g_mountver_destroy_geom(struct gctl_req *req, struct g_class *mp, struct g_geom *gp) in g_mountver_destroy_geom() argument
397 return (g_mountver_destroy(gp, 0)); in g_mountver_destroy_geom()
431 struct g_geom *gp; in g_mountver_find_geom() local
433 LIST_FOREACH(gp, &mp->geom, geom) { in g_mountver_find_geom()
434 if (strcmp(gp->name, name) == 0) in g_mountver_find_geom()
435 return (gp); in g_mountver_find_geom()
444 struct g_geom *gp; in g_mountver_ctl_destroy() local
474 gp = g_mountver_find_geom(mp, name); in g_mountver_ctl_destroy()
475 if (gp == NULL) { in g_mountver_ctl_destroy()
480 error = g_mountver_destroy(gp, *force); in g_mountver_ctl_destroy()
483 gp->name, error); in g_mountver_ctl_destroy()
510 struct g_geom *gp; in g_mountver_resize() local
513 gp = cp->geom; in g_mountver_resize()
515 LIST_FOREACH(pp, &gp->provider, provider) in g_mountver_resize()
520 g_mountver_ident_matches(struct g_geom *gp) in g_mountver_ident_matches() argument
527 sc = gp->softc; in g_mountver_ident_matches()
528 cp = LIST_FIRST(&gp->consumer); in g_mountver_ident_matches()
536 "not attaching; error = %d.", gp->name, error); in g_mountver_ident_matches()
543 "not attaching; error = %d.", gp->name, error); in g_mountver_ident_matches()
548 "from expected \"%s\", not attaching.", gp->name, ident, in g_mountver_ident_matches()
561 struct g_geom *gp; in g_mountver_taste() local
571 LIST_FOREACH(gp, &mp->geom, geom) { in g_mountver_taste()
572 sc = gp->softc; in g_mountver_taste()
577 if (pp == LIST_FIRST(&gp->provider)) in g_mountver_taste()
583 if (gp == NULL) in g_mountver_taste()
586 cp = LIST_FIRST(&gp->consumer); in g_mountver_taste()
593 error = g_mountver_ident_matches(gp); in g_mountver_taste()
607 g_mountver_send_queued(gp); in g_mountver_taste()
610 return (gp); in g_mountver_taste()
642 g_mountver_dumpconf(struct sbuf *sb, const char *indent, struct g_geom *gp, in g_mountver_dumpconf() argument
650 sc = gp->softc; in g_mountver_dumpconf()
662 struct g_geom *gp, *gp2; in g_mountver_shutdown_pre_sync() local
666 LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) { in g_mountver_shutdown_pre_sync()
667 if (gp->softc == NULL) in g_mountver_shutdown_pre_sync()
669 sc = gp->softc; in g_mountver_shutdown_pre_sync()
672 g_mountver_destroy(gp, 1); in g_mountver_shutdown_pre_sync()