mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-04 03:49:02 +00:00
Don't count iterations while waiting for a lock to become free.
This commit is contained in:
parent
aa1c16b781
commit
667b5ca097
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=51778
@ -236,20 +236,19 @@ lockrange(daddr_t stripe, struct buf *bp, struct plex *plex)
|
||||
* conflict would be an additional
|
||||
* schedule and time through this loop.
|
||||
*/
|
||||
while (lock->stripe) { /* wait for it to become free */
|
||||
#ifdef VINUMDEBUG
|
||||
if (debug & DEBUG_LASTREQS) {
|
||||
struct rangelock info;
|
||||
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
|
||||
tsleep((void *) lock->stripe, PRIBIO | PCATCH, "vrlock", 2 * hz);
|
||||
plex->lockwaits++; /* waited one more time */
|
||||
info.stripe = stripe;
|
||||
info.bp = bp;
|
||||
info.plexno = plex->plexno;
|
||||
logrq(loginfo_lockwait, (union rqinfou) &info, bp);
|
||||
}
|
||||
#endif
|
||||
plex->lockwaits++; /* waited one more time */
|
||||
while (lock->stripe) /* wait for it to become free */
|
||||
tsleep((void *) lock->stripe, PRIBIO | PCATCH, "vrlock", 2 * hz);
|
||||
break; /* out of the inner level loop */
|
||||
}
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user