summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>2008-01-02 11:48:20 +0000
committerad <ad@NetBSD.org>2008-01-02 11:48:20 +0000
commit4a780c9ae2adec0bc218b3dea0fcec31165494ed (patch)
tree199a903df0335a6381eae4dd10bf5666da00fad9 /sys/dev/raidframe
parenta41df3835967f15a459c3de3f85e8b82074e5b9d (diff)
Merge vmlocking2 to head.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_diskqueue.c14
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c13
2 files changed, 13 insertions, 14 deletions
diff --git a/sys/dev/raidframe/rf_diskqueue.c b/sys/dev/raidframe/rf_diskqueue.c
index 3a7a7cb16f2..5f557b039e5 100644
--- a/sys/dev/raidframe/rf_diskqueue.c
+++ b/sys/dev/raidframe/rf_diskqueue.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_diskqueue.c,v 1.49 2007/03/04 06:02:37 christos Exp $ */
+/* $NetBSD: rf_diskqueue.c,v 1.50 2008/01/02 11:48:38 ad Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -66,7 +66,7 @@
****************************************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.49 2007/03/04 06:02:37 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_diskqueue.c,v 1.50 2008/01/02 11:48:38 ad Exp $");
#include <dev/raidframe/raidframevar.h>
@@ -449,25 +449,19 @@ rf_CreateDiskQueueData(RF_IoType_t typ, RF_SectorNum_t ssect,
int waitflag)
{
RF_DiskQueueData_t *p;
- int s;
- s = splbio();
p = pool_get(&rf_pools.dqd, waitflag);
- splx(s);
if (p == NULL)
return (NULL);
memset(p, 0, sizeof(RF_DiskQueueData_t));
if (waitflag == PR_WAITOK) {
- p->bp = getiobuf();
+ p->bp = getiobuf(NULL, true);
} else {
- p->bp = getiobuf_nowait();
+ p->bp = getiobuf(NULL, false);
}
if (p->bp == NULL) {
- /* no memory for the buffer!?!? */
- s = splbio();
pool_put(&rf_pools.dqd, p);
- splx(s);
return (NULL);
}
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 2d3d898ec20..608c1440b21 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.241 2007/12/18 01:09:46 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.242 2008/01/02 11:48:38 ad Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -146,7 +146,7 @@
***********************************************************/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.241 2007/12/18 01:09:46 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.242 2008/01/02 11:48:38 ad Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -2208,7 +2208,9 @@ InitBP(struct buf *bp, struct vnode *b_vp, unsigned rw_flag, dev_t dev,
struct proc *b_proc)
{
/* bp->b_flags = B_PHYS | rw_flag; */
- bp->b_flags = B_CALL | rw_flag; /* XXX need B_PHYS here too??? */
+ bp->b_flags = rw_flag; /* XXX need B_PHYS here too??? */
+ bp->b_oflags = 0;
+ bp->b_cflags = 0;
bp->b_bcount = numSect << logBytesPerSector;
bp->b_bufsize = bp->b_bcount;
bp->b_error = 0;
@@ -2223,8 +2225,11 @@ InitBP(struct buf *bp, struct vnode *b_vp, unsigned rw_flag, dev_t dev,
bp->b_iodone = cbFunc;
bp->b_private = cbArg;
bp->b_vp = b_vp;
+ bp->b_objlock = &b_vp->v_interlock;
if ((bp->b_flags & B_READ) == 0) {
- bp->b_vp->v_numoutput++;
+ mutex_enter(&b_vp->v_interlock);
+ b_vp->v_numoutput++;
+ mutex_exit(&b_vp->v_interlock);
}
}