Lines Matching +full:- +full:gp

1 /*-
2 * SPDX-License-Identifier: BSD-3-Clause
4 * Copyright (c) 2002 Poul-Henning Kamp
7 * Copyright (c) 2013-2022 Alexander Motin <mav@FreeBSD.org>
9 * This software was developed for the FreeBSD Project by Poul-Henning Kamp
11 * under DARPA/SPAWAR contract N66001-01-C-8035 ("CBOSS"), as part of the
54 cp, cp->acr, cp->acw, cp->ace); in g_confdot_consumer()
55 if (cp->provider) in g_confdot_consumer()
56 sbuf_printf(sb, "z%p -> z%p;\n", cp, cp->provider); in g_confdot_consumer()
64 "sector=%u\\nstripe=%ju\"];\n", pp, pp->name, pp->acr, pp->acw, in g_confdot_provider()
65 pp->ace, pp->error, pp->sectorsize, (uintmax_t)pp->stripesize); in g_confdot_provider()
69 g_confdot_geom(struct sbuf *sb, struct g_geom *gp) in g_confdot_geom() argument
75 gp, gp->class->name, gp->name, gp->rank); in g_confdot_geom()
76 LIST_FOREACH(cp, &gp->consumer, consumer) { in g_confdot_geom()
78 sbuf_printf(sb, "z%p -> z%p;\n", gp, cp); in g_confdot_geom()
81 LIST_FOREACH(pp, &gp->provider, provider) { in g_confdot_geom()
83 sbuf_printf(sb, "z%p -> z%p;\n", pp, gp); in g_confdot_geom()
90 struct g_geom *gp; in g_confdot_class() local
92 LIST_FOREACH(gp, &mp->geom, geom) in g_confdot_class()
93 g_confdot_geom(sb, gp); in g_confdot_class()
113 g_conftxt_geom(struct sbuf *sb, struct g_geom *gp, int level) in g_conftxt_geom() argument
118 if (gp->flags & G_GEOM_WITHER) in g_conftxt_geom()
120 LIST_FOREACH(pp, &gp->provider, provider) { in g_conftxt_geom()
121 sbuf_printf(sb, "%d %s %s %ju %u", level, gp->class->name, in g_conftxt_geom()
122 pp->name, (uintmax_t)pp->mediasize, pp->sectorsize); in g_conftxt_geom()
123 if (gp->dumpconf != NULL) in g_conftxt_geom()
124 gp->dumpconf(sb, NULL, gp, NULL, pp); in g_conftxt_geom()
126 LIST_FOREACH(cp, &pp->consumers, consumers) in g_conftxt_geom()
127 g_conftxt_geom(sb, cp->geom, level + 1); in g_conftxt_geom()
134 struct g_geom *gp; in g_conftxt_class() local
136 LIST_FOREACH(gp, &mp->geom, geom) in g_conftxt_class()
137 g_conftxt_geom(sb, gp, 0); in g_conftxt_class()
150 if (!strcmp(mp->name, G_DISK_CLASS_NAME) || !strcmp(mp->name, "MD")) in g_conftxt()
193 sbuf_printf(sb, "\t <geom ref=\"%p\"/>\n", cp->geom); in g_conf_consumer()
194 if (cp->provider != NULL) in g_conf_consumer()
195 sbuf_printf(sb, "\t <provider ref=\"%p\"/>\n", cp->provider); in g_conf_consumer()
197 cp->acr, cp->acw, cp->ace); in g_conf_consumer()
198 if (cp->geom->flags & G_GEOM_WITHER) in g_conf_consumer()
200 else if (cp->geom->dumpconf != NULL) { in g_conf_consumer()
202 cp->geom->dumpconf(sb, "\t ", cp->geom, cp, NULL); in g_conf_consumer()
214 sbuf_printf(sb, "\t <geom ref=\"%p\"/>\n", pp->geom); in g_conf_provider()
216 pp->acr, pp->acw, pp->ace); in g_conf_provider()
218 g_conf_cat_escaped(sb, pp->name); in g_conf_provider()
220 LIST_FOREACH(gap, &pp->aliases, ga_next) { in g_conf_provider()
222 g_conf_cat_escaped(sb, gap->ga_alias); in g_conf_provider()
226 (intmax_t)pp->mediasize); in g_conf_provider()
227 sbuf_printf(sb, "\t <sectorsize>%u</sectorsize>\n", pp->sectorsize); in g_conf_provider()
228 sbuf_printf(sb, "\t <stripesize>%ju</stripesize>\n", (uintmax_t)pp->stripesize); in g_conf_provider()
229 sbuf_printf(sb, "\t <stripeoffset>%ju</stripeoffset>\n", (uintmax_t)pp->stripeoffset); in g_conf_provider()
230 if (pp->flags & G_PF_WITHER) in g_conf_provider()
232 else if (pp->geom->flags & G_GEOM_WITHER) in g_conf_provider()
234 else if (pp->geom->dumpconf != NULL) { in g_conf_provider()
236 pp->geom->dumpconf(sb, "\t ", pp->geom, NULL, pp); in g_conf_provider()
243 g_conf_geom(struct sbuf *sb, struct g_geom *gp) in g_conf_geom() argument
248 sbuf_printf(sb, " <geom id=\"%p\">\n", gp); in g_conf_geom()
249 sbuf_printf(sb, " <class ref=\"%p\"/>\n", gp->class); in g_conf_geom()
251 g_conf_cat_escaped(sb, gp->name); in g_conf_geom()
253 sbuf_printf(sb, " <rank>%d</rank>\n", gp->rank); in g_conf_geom()
254 if (gp->flags & G_GEOM_WITHER) in g_conf_geom()
256 else if (gp->dumpconf != NULL) { in g_conf_geom()
258 gp->dumpconf(sb, "\t", gp, NULL, NULL); in g_conf_geom()
261 LIST_FOREACH(cp, &gp->consumer, consumer) in g_conf_geom()
263 LIST_FOREACH(pp, &gp->provider, provider) in g_conf_geom()
269 g_conf_matchgp(struct g_geom *gp, struct g_geom **gps) in g_conf_matchgp() argument
275 if (*gps == gp) in g_conf_matchgp()
284 struct g_geom *gp; in g_conf_class() local
288 g_conf_cat_escaped(sb, mp->name); in g_conf_class()
290 LIST_FOREACH(gp, &mp->geom, geom) { in g_conf_class()
291 if (!g_conf_matchgp(gp, gps)) in g_conf_class()
293 g_conf_geom(sb, gp); in g_conf_class()