1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-14 10:09:48 +00:00

Change the way the plex lock mutexes work. Previously they were part

of the struct plex, which tore apart the mutex linked lists when the
plex table was expanded.  Now we maintain a pool of mutexes (currently
32) to be shared by all plexes.  This is still a lot better than the
splhigh() method used in other architectures.

Add and clarify comments.

Approved by: re (jhb)
This commit is contained in:
Greg Lehey 2003-05-23 01:15:30 +00:00
parent 7db14b2ff2
commit 93573e2e76
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=115249

View File

@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
* $Id: vinumobj.h,v 1.5 2003/04/28 02:54:43 grog Exp $
* $Id: vinumobj.h,v 1.7 2003/05/23 01:08:58 grog Exp $
* $FreeBSD$
*/
@ -108,13 +108,19 @@ struct __vinum_conf
struct _volume *volume;
#endif
/* the number allocated */
/* the number allocated of each object */
int drives_allocated;
int subdisks_allocated;
int plexes_allocated;
int volumes_allocated;
/* and the number currently in use */
/*
* Note that drives_used is not valid during drive recognition
* (vinum_scandisk and friends). Many invalid drives are added and
* later removed; the count isn't correct until we leave
* vinum_scandisk.
*/
int drives_used;
int subdisks_used;
int plexes_used;
@ -268,7 +274,7 @@ struct _plex
char name[MAXPLEXNAME]; /* name of plex */
#ifdef _KERNEL
struct rangelock *lock; /* ranges of locked addresses */
struct mtx lockmtx;
struct mtx *lockmtx; /* lock mutex, one of plexmutex [] */
dev_t dev; /* associated device */
#endif
};