From d360d6d42fa54bc605cba0bffb8e1ff8d6f191f7 Mon Sep 17 00:00:00 2001 From: le Date: Sun, 25 Jul 2004 23:01:09 +0000 Subject: There's a chance that the VINUMDRIVE class tastes before the VINUM class, so let the VINUMDRIVE class parse the on-disk configuration, too. --- sys/geom/vinum/geom_vinum_drive.c | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'sys') diff --git a/sys/geom/vinum/geom_vinum_drive.c b/sys/geom/vinum/geom_vinum_drive.c index 86eec15..a7fa0d6 100644 --- a/sys/geom/vinum/geom_vinum_drive.c +++ b/sys/geom/vinum/geom_vinum_drive.c @@ -313,7 +313,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 errstr[ERRBUFSIZ]; + char *buf, errstr[ERRBUFSIZ]; vhdr = NULL; d = NULL; @@ -357,8 +357,19 @@ gv_drive_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) /* * We have found a valid vinum drive. Let's see if it is - * already known in the configuration. + * 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. */ + buf = g_read_data(cp, GV_CFG_OFFSET, GV_CFG_LEN, &error); + if (buf == NULL || error != 0) { + g_free(vhdr); + break; + } + gv_parse_config(sc, buf, 1); + g_free(buf); + g_topology_lock(); g_access(cp, -1, 0, 0); g_detach(cp); -- cgit v1.1