summaryrefslogtreecommitdiffstats
path: root/sys/geom
diff options
context:
space:
mode:
authorlulf <lulf@FreeBSD.org>2009-04-18 16:36:27 +0000
committerlulf <lulf@FreeBSD.org>2009-04-18 16:36:27 +0000
commitc18c28353dc66cc25c439ccf86c893b190476c2c (patch)
tree5616723305c0bebdb8e1da964ef8442ca69d24e7 /sys/geom
parent55e55d53bc444bd750a9c8d6fcf1d48ebbf72c0b (diff)
downloadFreeBSD-src-c18c28353dc66cc25c439ccf86c893b190476c2c.zip
FreeBSD-src-c18c28353dc66cc25c439ccf86c893b190476c2c.tar.gz
- Remove assertion of topology lock remaining from 7.x gvinum. It is not needed,
as the renaming only changes internal gvinum names and will not alter the geom topology. - The topology lock was not held when calling g_wither_geom after renaming.
Diffstat (limited to 'sys/geom')
-rw-r--r--sys/geom/vinum/geom_vinum.c2
-rw-r--r--sys/geom/vinum/geom_vinum_rename.c4
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/geom/vinum/geom_vinum.c b/sys/geom/vinum/geom_vinum.c
index 4a6760a..1c6c792 100644
--- a/sys/geom/vinum/geom_vinum.c
+++ b/sys/geom/vinum/geom_vinum.c
@@ -897,7 +897,9 @@ gv_worker(void *arg)
v->name);
break;
}
+ g_topology_lock();
g_wither_provider(v->provider, ENOENT);
+ g_topology_unlock();
v->provider = NULL;
gv_post_event(sc, GV_EVENT_SETUP_OBJECTS, sc,
NULL, 0, 0);
diff --git a/sys/geom/vinum/geom_vinum_rename.c b/sys/geom/vinum/geom_vinum_rename.c
index 53c173f..7764c85 100644
--- a/sys/geom/vinum/geom_vinum_rename.c
+++ b/sys/geom/vinum/geom_vinum_rename.c
@@ -125,7 +125,6 @@ gv_rename_drive(struct gv_softc *sc, struct gv_drive *d, char *newname,
{
struct gv_sd *s;
- g_topology_assert();
KASSERT(d != NULL, ("gv_rename_drive: NULL d"));
if (gv_object_type(sc, newname) != GV_ERR_NOTFOUND) {
@@ -151,7 +150,6 @@ gv_rename_plex(struct gv_softc *sc, struct gv_plex *p, char *newname, int flags)
char *ptr;
int err;
- g_topology_assert();
KASSERT(p != NULL, ("gv_rename_plex: NULL p"));
if (gv_object_type(sc, newname) != GV_ERR_NOTFOUND) {
@@ -203,7 +201,6 @@ gv_rename_sd(struct gv_softc *sc, struct gv_sd *s, char *newname, int flags)
{
char *dot1, *dot2;
- g_topology_assert();
KASSERT(s != NULL, ("gv_rename_sd: NULL s"));
if (gv_object_type(sc, newname) != GV_ERR_NOTFOUND) {
@@ -231,7 +228,6 @@ gv_rename_vol(struct gv_softc *sc, struct gv_volume *v, char *newname,
char newplex[GV_MAXPLEXNAME], *ptr;
int err;
- g_topology_assert();
KASSERT(v != NULL, ("gv_rename_vol: NULL v"));
pp = v->provider;
KASSERT(pp != NULL, ("gv_rename_vol: NULL pp"));
OpenPOWER on IntegriCloud