Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
This commit is contained in:
parent
9e831b88aa
commit
a7b84f6d05
@ -39,7 +39,7 @@
|
||||
* otherwise) arising in any way out of the use of this software, even if
|
||||
* advised of the possibility of such damage.
|
||||
*
|
||||
* $Id: vinuminterrupt.c,v 1.15 1999/08/14 06:25:52 grog Exp $
|
||||
* $Id: vinuminterrupt.c,v 1.6 1999/06/18 00:50:53 grog Exp grog $
|
||||
*/
|
||||
|
||||
#include <dev/vinum/vinumhdr.h>
|
||||
@ -181,7 +181,7 @@ freerq(struct request *rq)
|
||||
|
||||
for (rqg = rq->rqg; rqg != NULL; rqg = nrqg) { /* through the whole request chain */
|
||||
if (rqg->lock) /* got a lock? */
|
||||
unlockrange(rqg); /* yes, free it */
|
||||
unlockrange(rqg->plexno, rqg->lock); /* yes, free it */
|
||||
for (rqno = 0; rqno < rqg->count; rqno++)
|
||||
if ((rqg->rqe[rqno].flags & XFR_MALLOCED) /* data buffer was malloced, */
|
||||
&&rqg->rqe[rqno].b.b_data) /* and the allocation succeeded */
|
||||
|
@ -287,17 +287,17 @@ lockrange(daddr_t stripe, struct buf *bp, struct plex *plex)
|
||||
|
||||
/* Unlock a volume and let the next one at it */
|
||||
void
|
||||
unlockrange(struct rqgroup *rqg)
|
||||
unlockrange(int plexno, struct rangelock *lock)
|
||||
{
|
||||
daddr_t lockaddr;
|
||||
|
||||
#ifdef VINUMDEBUG
|
||||
if (debug & DEBUG_LASTREQS)
|
||||
logrq(loginfo_unlock, (union rqinfou) rqg->lock, rqg->lock->bp);
|
||||
logrq(loginfo_unlock, (union rqinfou) lock, lock->bp);
|
||||
#endif
|
||||
lockaddr = rqg->lock->stripe;
|
||||
rqg->lock->stripe = 0; /* no longer used */
|
||||
PLEX[rqg->plexno].usedlocks--; /* one less lock */
|
||||
lockaddr = lock->stripe;
|
||||
lock->stripe = 0; /* no longer used */
|
||||
PLEX[plexno].usedlocks--; /* one less lock */
|
||||
wakeup((void *) lockaddr);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user