diff options
author | jeff <jeff@FreeBSD.org> | 2003-02-25 03:37:48 +0000 |
---|---|---|
committer | jeff <jeff@FreeBSD.org> | 2003-02-25 03:37:48 +0000 |
commit | 9e4c9a6ce908881b1e6f83cbb906a9fce08dd3ab (patch) | |
tree | df5eb5e550ba49b92f45eadaca861cb18128ad5d /sys/dev | |
parent | 541937cf7373ff6a61c871266ea041503bb02233 (diff) | |
download | FreeBSD-src-9e4c9a6ce908881b1e6f83cbb906a9fce08dd3ab.zip FreeBSD-src-9e4c9a6ce908881b1e6f83cbb906a9fce08dd3ab.tar.gz |
- Add an interlock argument to BUF_LOCK and BUF_TIMELOCK.
- Remove the buftimelock mutex and acquire the buf's interlock to protect
these fields instead.
- Hold the vnode interlock while locking bufs on the clean/dirty queues.
This reduces some cases from one BUF_LOCK with a LK_NOWAIT and another
BUF_LOCK with a LK_TIMEFAIL to a single lock.
Reviewed by: arch, mckusick
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/vinum/vinumrequest.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c index 8423ed2..6973e3f 100644 --- a/sys/dev/vinum/vinumrequest.c +++ b/sys/dev/vinum/vinumrequest.c @@ -814,7 +814,7 @@ build_rq_buffer(struct rqelement *rqe, struct plex *plex) panic("build_rq_buffer: rqe already locked"); /* XXX remove this when we're sure */ #endif BUF_LOCKINIT(bp); /* get a lock for the buffer */ - BUF_LOCK(bp, LK_EXCLUSIVE); /* and lock it */ + BUF_LOCK(bp, LK_EXCLUSIVE, NULL); /* and lock it */ BUF_KERNPROC(bp); rqe->flags |= XFR_BUFLOCKED; bp->b_iodone = complete_rqe; @@ -949,7 +949,7 @@ sdio(struct buf *bp) sbp->b.b_blkno = bp->b_blkno + sd->driveoffset; sbp->b.b_iodone = sdio_done; /* come here on completion */ BUF_LOCKINIT(&sbp->b); /* get a lock for the buffer */ - BUF_LOCK(&sbp->b, LK_EXCLUSIVE); /* and lock it */ + BUF_LOCK(&sbp->b, LK_EXCLUSIVE, NULL); /* and lock it */ BUF_KERNPROC(&sbp->b); sbp->bp = bp; /* note the address of the original header */ sbp->sdno = sd->sdno; /* note for statistics */ |