diff options
| author | Greg Lehey <grog@FreeBSD.org> | 1999-08-26 03:25:38 +0000 |
|---|---|---|
| committer | Greg Lehey <grog@FreeBSD.org> | 1999-08-26 03:25:38 +0000 |
| commit | ca558379901de1521c85f25c0587f2b6f0e66c2a (patch) | |
| tree | 1aa736219a132c053b9df1701b8b0fb028fb31f4 | |
| parent | 05da76e022b6fe3dafb11835f3fcc4023abf3f49 (diff) | |
Notes
| -rw-r--r-- | sys/dev/vinum/vinumconfig.c | 6 | ||||
| -rw-r--r-- | sys/dev/vinum/vinumlock.c | 5 |
2 files changed, 3 insertions, 8 deletions
diff --git a/sys/dev/vinum/vinumconfig.c b/sys/dev/vinum/vinumconfig.c index 5d2277da2241..0fc1e1ed885a 100644 --- a/sys/dev/vinum/vinumconfig.c +++ b/sys/dev/vinum/vinumconfig.c @@ -1352,12 +1352,6 @@ config_plex(int update) sprintf(plexsuffix, ".p%d", pindex); /* form the suffix */ strcat(plex->name, plexsuffix); /* and add it to the name */ } - if (plex->organization == plex_raid5) { /* RAID-5 plex, */ - plex->lock = (struct rangelock *) - Malloc(sizeof(struct rangelock) * INITIAL_LOCKS); /* allocate lock table */ - bzero(plex->lock, sizeof(struct rangelock) * INITIAL_LOCKS); /* zero it */ - plex->alloclocks = INITIAL_LOCKS; /* and note how many there are */ - } /* Note the last plex we configured */ current_plex = plexno; plex->state = state; /* set whatever state we chose */ diff --git a/sys/dev/vinum/vinumlock.c b/sys/dev/vinum/vinumlock.c index 9daf64d8f2c4..8bc13207c13e 100644 --- a/sys/dev/vinum/vinumlock.c +++ b/sys/dev/vinum/vinumlock.c @@ -268,10 +268,11 @@ lockrange(daddr_t stripe, struct buf *bp, struct plex *plex) if (foundlocks >= plex->alloclocks) { /* searched the lot, */ newlock = plex->alloclocks; EXPAND(plex->lock, struct rangelock, plex->alloclocks, INITIAL_LOCKS); + pos = &plex->lock[newlock]; while (newlock < plex->alloclocks) plex->lock[newlock++].stripe = 0; - } - pos = lock; /* put it at the end */ + } else + pos = lock; /* put it at the end */ } pos->stripe = stripe; pos->bp = bp; |
