Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 6 May 2009 19:06:28 +0000 (UTC)
From:      Ulf Lilleengen <lulf@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r191854 - head/sys/geom/vinum
Message-ID:  <200905061906.n46J6Sfb026983@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: lulf
Date: Wed May  6 19:06:28 2009
New Revision: 191854
URL: http://svn.freebsd.org/changeset/base/191854

Log:
  - Check if any plexes are doing internal maintenance before removing them.

Modified:
  head/sys/geom/vinum/geom_vinum_rm.c

Modified: head/sys/geom/vinum/geom_vinum_rm.c
==============================================================================
--- head/sys/geom/vinum/geom_vinum_rm.c	Wed May  6 18:37:32 2009	(r191853)
+++ head/sys/geom/vinum/geom_vinum_rm.c	Wed May  6 19:06:28 2009	(r191854)
@@ -172,6 +172,13 @@ gv_resetconfig(struct gv_softc *sc)
 			return (GV_ERR_ISBUSY);
 		}
 	}
+
+	/* Make sure nothing is going on internally. */
+	LIST_FOREACH_SAFE(p, &sc->plexes, plex, p2) {
+		if (p->flags & (GV_PLEX_REBUILDING | GV_PLEX_GROWING))
+			return (GV_ERR_ISBUSY);
+	}
+
 	/* Then if not, we remove everything. */
 	LIST_FOREACH_SAFE(s, &sc->subdisks, sd, s2)
 		gv_rm_sd(sc, s);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200905061906.n46J6Sfb026983>