Lines Matching refs:geom

57 #include <geom/geom.h>
58 #include <geom/geom_dbg.h>
59 #include <geom/geom_int.h>
70 SDT_PROVIDER_DEFINE(geom);
165 LIST_INIT(&mp->geom);
174 LIST_FOREACH(gp, &mp2->geom, geom) {
195 LIST_FOREACH(gp, &mp->geom, geom) {
207 /* If the geom is withering, wait for it to finish. */
218 if (!LIST_EMPTY(&mp->geom) && mp->destroy_geom == NULL) {
227 LIST_FOREACH(gp, &mp->geom, geom) {
236 gp = LIST_FIRST(&mp->geom);
240 ("Non-withering geom in class %s", mp->name));
296 KASSERT(LIST_EMPTY(&mp->geom),
297 ("Unloaded class (%s) still has geom", mp->name));
329 LIST_FOREACH(gp, &mp2->geom, geom) {
334 if (cp->geom->class == mp &&
340 g_wither_geom(cp->geom, ENXIO);
394 LIST_INSERT_HEAD(&mp->geom, gp, geom);
425 LIST_REMOVE(gp, geom);
432 * This function is called (repeatedly) until the geom has withered away.
494 LIST_FOREACH_SAFE(gp, &mp->geom, geom, gp2) {
529 ("g_new_consumer on WITHERing geom(%s) (class %s)",
532 ("g_new_consumer on geom(%s) (class %s) without orphan",
536 cp->geom = gp;
556 gp = cp->geom;
582 cp->geom->attrchanged != NULL)
583 cp->geom->attrchanged(cp, "GEOM::media");
591 if (cp->geom->class == mp &&
611 ("new provider on geom(%s) without ->access (class %s)",
614 ("new provider on geom(%s) without ->start (class %s)",
617 ("new provider on WITHERing geom(%s) (class %s)",
631 pp->geom = gp;
703 gp = cp->geom;
714 cp->geom->orphan(cp);
721 gp = cp->geom;
734 if (cp->geom->class == mp &&
774 LIST_FOREACH(gp, &cp->geom, geom) {
805 gp = pp->geom;
826 * sequence. If we cannot assign rank to a geom because it's
829 * At some point we encounter our original geom and if we stil fail
864 n = cp->provider->geom->rank;
878 /* no rank to original geom means loop */
904 error = redo_rank(cp->geom);
908 redo_rank(cp->geom);
930 if ((cp->geom->flags & G_GEOM_WITHER) ||
931 (pp->geom->flags & G_GEOM_WITHER) ||
934 redo_rank(cp->geom);
960 gp = pp->geom;
972 KASSERT(gp->access != NULL, ("NULL geom->access"));
979 if (cp->geom->spoiled != NULL && (cp->flags & G_CF_SPOILED) &&
988 * geom for the first time. As a result, more than one thread may
993 * Note that if the geom's access method never drops the topology lock,
998 "%s: race on geom %s via provider %s and consumer of %s",
999 __func__, gp->name, pp->name, cp->geom->name);
1051 ("Access counts changed during geom->access"));
1079 if ((cp->geom->flags & G_GEOM_WITHER) &&
1184 gp = cp->geom;
1217 pp->geom->class->name, pp->geom->name, pp->name);
1223 if (cp->geom->spoiled == NULL)
1225 cp->geom->spoiled(cp);
1269 !(pp->geom->flags & G_GEOM_WITHER));
1370 LIST_FOREACH(gp, &mp->geom, geom) {
1439 gprintln(" class: %s (%p)", cp->geom->class->name,
1440 cp->geom->class);
1441 gprintln(" geom: %s (%p)", cp->geom->name, cp->geom);
1472 gprintln(" class: %s (%p)", pp->geom->class->name,
1473 pp->geom->class);
1474 gprintln(" geom: %s (%p)", pp->geom->name, pp->geom);
1514 gprintln("geom: %s (%p)", gp->name, gp);
1524 gprintf("geom: %s (%p), rank=%d", gp->name, gp, gp->rank);
1554 LIST_FOREACH(gp, &mp->geom, geom) {
1564 DB_SHOW_COMMAND(geom, db_show_geom)