diff options
| author | Greg Lehey <grog@FreeBSD.org> | 2001-01-10 05:01:12 +0000 |
|---|---|---|
| committer | Greg Lehey <grog@FreeBSD.org> | 2001-01-10 05:01:12 +0000 |
| commit | 5f1a173c0183bd3bf5992658f7ed25865857ffdd (patch) | |
| tree | d3a29d3068cac599bdfad19fd8d2852a65c9cc8f /sys/dev/vinum | |
| parent | ef73ae4b0ccbd4beded1e8cce7f528799a1ae5ed (diff) | |
Notes
Diffstat (limited to 'sys/dev/vinum')
| -rw-r--r-- | sys/dev/vinum/vinumconfig.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c index 7dd36dbe6479..5251f244db83 100644 --- a/sys/dev/vinum/vinumconfig.c +++ b/sys/dev/vinum/vinumconfig.c @@ -45,7 +45,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinumconfig.c,v 1.30 2000/05/01 09:45:50 grog Exp grog $ + * $Id: vinumconfig.c,v 1.31 2001/01/10 01:16:00 grog Exp grog $ * $FreeBSD$ */ @@ -1393,6 +1393,13 @@ config_plex(int update) sprintf(plexsuffix, ".p%d", pindex); /* form the suffix */ strcat(plex->name, plexsuffix); /* and add it to the name */ } + if (isparity(plex)) { + plex->lock = (struct rangelock *) + Malloc(PLEX_LOCKS * sizeof(struct rangelock)); + CHECKALLOC(plex->lock, "vinum: Can't allocate lock table\n"); + bzero((char *) plex->lock, PLEX_LOCKS * sizeof(struct rangelock)); + mtx_init(&plex->lockmtx, plex->name, MTX_DEF); + } /* Note the last plex we configured */ current_plex = plexno; plex->state = state; /* set whatever state we chose */ @@ -1774,6 +1781,8 @@ remove_plex_entry(int plexno, int force, int recurse) } } log(LOG_INFO, "vinum: removing %s\n", plex->name); + if (isparity(plex)) + mtx_destroy(&plex->lockmtx); free_plex(plexno); vinum_conf.plexes_used--; /* one less plex */ } |
