Changeset View
Changeset View
Standalone View
Standalone View
sys/geom/multipath/g_multipath.c
Show First 20 Lines • Show All 817 Lines • ▼ Show 20 Lines | g_multipath_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) | ||||
g_topology_assert(); | g_topology_assert(); | ||||
gp = g_new_geomf(mp, "multipath:taste"); | gp = g_new_geomf(mp, "multipath:taste"); | ||||
gp->start = g_multipath_start; | gp->start = g_multipath_start; | ||||
gp->access = g_multipath_access; | gp->access = g_multipath_access; | ||||
gp->orphan = g_multipath_orphan; | gp->orphan = g_multipath_orphan; | ||||
cp = g_new_consumer(gp); | cp = g_new_consumer(gp); | ||||
g_attach(cp, pp); | error = g_attach(cp, pp); | ||||
if (error == 0) { | |||||
error = g_multipath_read_metadata(cp, &md); | error = g_multipath_read_metadata(cp, &md); | ||||
g_detach(cp); | g_detach(cp); | ||||
} | |||||
g_destroy_consumer(cp); | g_destroy_consumer(cp); | ||||
g_destroy_geom(gp); | g_destroy_geom(gp); | ||||
if (error != 0) | if (error != 0) | ||||
return (NULL); | return (NULL); | ||||
gp = NULL; | gp = NULL; | ||||
if (strcmp(md.md_magic, G_MULTIPATH_MAGIC) != 0) { | if (strcmp(md.md_magic, G_MULTIPATH_MAGIC) != 0) { | ||||
if (g_multipath_debug) | if (g_multipath_debug) | ||||
▲ Show 20 Lines • Show All 724 Lines • Show Last 20 Lines |