summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum/vinumlock.c
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-08-24 02:23:21 +0000
committergrog <grog@FreeBSD.org>1999-08-24 02:23:21 +0000
commita7b84f6d056a53296ed549087422521cc2feeea3 (patch)
tree6f4a6a587ca841e6c1006066dac3b1de8f317a7b /sys/dev/vinum/vinumlock.c
parent9e831b88aa6cc24fc8f081b60a9b9d646f85e56c (diff)
downloadFreeBSD-src-a7b84f6d056a53296ed549087422521cc2feeea3.zip
FreeBSD-src-a7b84f6d056a53296ed549087422521cc2feeea3.tar.gz
Change parameters of unlockrange to allow calling from revive_block,
which doesn't use request groups.
Diffstat (limited to 'sys/dev/vinum/vinumlock.c')
-rw-r--r--sys/dev/vinum/vinumlock.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/sys/dev/vinum/vinumlock.c b/sys/dev/vinum/vinumlock.c
index c524f3b..9daf64d 100644
--- a/sys/dev/vinum/vinumlock.c
+++ b/sys/dev/vinum/vinumlock.c
@@ -51,10 +51,10 @@
/* Lock a drive, wait if it's in use */
#if VINUMDEBUG
-int
+int
lockdrive(struct drive *drive, char *file, int line)
#else
-int
+int
lockdrive(struct drive *drive)
#endif
{
@@ -103,7 +103,7 @@ lockdrive(struct drive *drive)
}
/* Unlock a drive and let the next one at it */
-void
+void
unlockdrive(struct drive *drive)
{
drive->flags &= ~VF_LOCKED;
@@ -112,7 +112,7 @@ unlockdrive(struct drive *drive)
}
/* Lock a volume, wait if it's in use */
-int
+int
lockvol(struct volume *vol)
{
int error;
@@ -136,7 +136,7 @@ lockvol(struct volume *vol)
}
/* Unlock a volume and let the next one at it */
-void
+void
unlockvol(struct volume *vol)
{
vol->flags &= ~VF_LOCKED;
@@ -147,7 +147,7 @@ unlockvol(struct volume *vol)
}
/* Lock a plex, wait if it's in use */
-int
+int
lockplex(struct plex *plex)
{
int error;
@@ -171,7 +171,7 @@ lockplex(struct plex *plex)
}
/* Unlock a plex and let the next one at it */
-void
+void
unlockplex(struct plex *plex)
{
plex->flags &= ~VF_LOCKED;
@@ -286,23 +286,23 @@ 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)
+void
+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);
}
/* Get a lock for the global config, wait if it's not available */
-int
+int
lock_config(void)
{
int error;
@@ -317,7 +317,7 @@ lock_config(void)
}
/* Unlock and wake up any waiters */
-void
+void
unlock_config(void)
{
vinum_conf.flags &= ~VF_LOCKED;
OpenPOWER on IntegriCloud