There's a chance that the VINUMDRIVE class tastes before the

VINUM class, so let the VINUMDRIVE class parse the on-disk
configuration, too.
This commit is contained in:
le 2004-07-25 23:01:09 +00:00
parent 33405a02bc
commit 46d61d32d9

View File

@ -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);