struct rangelock: Remove the field 'plex' from the entry. Range locks
are accessed only via the plex, so there's never any confusion as to the plex number. This value was, as a result, unused.
This commit is contained in:
parent
96f2d202a1
commit
940b9a4808
@ -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: vinumlock.c,v 1.14 2001/01/10 04:10:30 grog Exp grog $
|
||||
* $Id: vinumlock.c,v 1.13 2000/05/02 23:25:02 grog Exp grog $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
@ -152,15 +152,13 @@ lockrange(daddr_t stripe, struct buf *bp, struct plex *plex)
|
||||
if (lock->stripe) { /* in use */
|
||||
foundlocks++; /* found another one in use */
|
||||
if ((lock->stripe == stripe) /* it's our stripe */
|
||||
&&(lock->plexno == plex->plexno) /* and our plex */
|
||||
&&(lock->bp != bp)) { /* but not our request */
|
||||
&&(lock->bp != bp)) { /* but not our request */
|
||||
#ifdef VINUMDEBUG
|
||||
if (debug & DEBUG_LASTREQS) {
|
||||
struct rangelock info;
|
||||
|
||||
info.stripe = stripe;
|
||||
info.bp = bp;
|
||||
info.plexno = plex->plexno;
|
||||
logrq(loginfo_lockwait, (union rqinfou) &info, bp);
|
||||
}
|
||||
#endif
|
||||
@ -188,7 +186,6 @@ lockrange(daddr_t stripe, struct buf *bp, struct plex *plex)
|
||||
*/
|
||||
pos->stripe = stripe;
|
||||
pos->bp = bp;
|
||||
pos->plexno = plex->plexno;
|
||||
plex->usedlocks++; /* one more lock */
|
||||
mtx_exit(&plex->lockmtx, MTX_DEF);
|
||||
#ifdef VINUMDEBUG
|
||||
|
@ -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: vinumvar.h,v 1.26 2001/01/09 06:37:42 grog Exp grog $
|
||||
* $Id: vinumvar.h,v 1.24 2000/03/01 02:34:57 grog Exp grog $
|
||||
* $FreeBSD$
|
||||
*/
|
||||
|
||||
@ -506,7 +506,6 @@ struct plex {
|
||||
struct rangelock {
|
||||
daddr_t stripe; /* address + 1 of the range being locked */
|
||||
struct buf *bp; /* user's buffer pointer */
|
||||
int plexno; /* and number of plex it affects */
|
||||
};
|
||||
|
||||
struct volume {
|
||||
|
Loading…
Reference in New Issue
Block a user