summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum
diff options
context:
space:
mode:
authorle <le@FreeBSD.org>2005-08-26 14:40:32 +0000
committerle <le@FreeBSD.org>2005-08-26 14:40:32 +0000
commit33712bde29462ac57d749efe7bfb57f05675dd57 (patch)
tree537ade7b9a8e9936d8b045ed4400e363dd8df52a /sys/geom/vinum
parent6ff3e30a2cec59f3735d836ab5b7226dcd9648ae (diff)
downloadFreeBSD-src-33712bde29462ac57d749efe7bfb57f05675dd57.zip
FreeBSD-src-33712bde29462ac57d749efe7bfb57f05675dd57.tar.gz
Shuffle around the order in which the components are compiled.
This way, the VINUMDRIVE class is loaded before the VINUM class, but since geom does the tasting for newly arrived classes last-in-first-out, the VINUM class tastes first. This removes the need to call gv_parse_config() in the drive taste path.
Diffstat (limited to 'sys/geom/vinum')
-rw-r--r--sys/geom/vinum/geom_vinum_drive.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c
index 3bf237f..04a53cb 100644
--- a/sys/geom/vinum/geom_vinum_drive.c
+++ b/sys/geom/vinum/geom_vinum_drive.c
@@ -419,7 +419,7 @@ gv_drive_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
struct gv_freelist *fl;
struct gv_hdr *vhdr;
int error;
- char *buf, errstr[ERRBUFSIZ];
+ char errstr[ERRBUFSIZ];
vhdr = NULL;
d = NULL;
@@ -461,22 +461,12 @@ gv_drive_taste(struct g_class *mp, struct g_provider *pp, int flags __unused)
break;
}
+ g_topology_lock();
+
/*
* We have found a valid vinum drive. Let's see if it is
- * already known in the configuration. There's a chance that
- * the VINUMDRIVE class tastes before the VINUM class could
- * taste, so parse the configuration here too, just to be on
- * the safe side.
+ * already known in the configuration.
*/
- buf = g_read_data(cp, GV_CFG_OFFSET, GV_CFG_LEN, &error);
- if (buf == NULL || error != 0) {
- g_free(vhdr);
- break;
- }
- g_topology_lock();
- gv_parse_config(sc, buf, 1);
- g_free(buf);
-
d = gv_find_drive(sc, vhdr->label.name);
/* We already know about this drive. */
OpenPOWER on IntegriCloud