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.
This commit is contained in:
parent
dbc2a95f40
commit
df5175af0f
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149501
@ -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. */
|
||||
|
@ -3,7 +3,7 @@
|
||||
.PATH: ${.CURDIR}/../../../geom/vinum
|
||||
|
||||
KMOD= geom_vinum
|
||||
SRCS= geom_vinum.c geom_vinum_drive.c geom_vinum_plex.c \
|
||||
SRCS= geom_vinum_drive.c geom_vinum.c geom_vinum_plex.c \
|
||||
geom_vinum_volume.c geom_vinum_subr.c geom_vinum_raid5.c \
|
||||
geom_vinum_share.c geom_vinum_list.c geom_vinum_rm.c \
|
||||
geom_vinum_init.c geom_vinum_state.c
|
||||
|
Loading…
Reference in New Issue
Block a user