Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/raidframe/rf_netbsdkintf.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.239.6.3 retrieving revision 1.240 diff -u -p -r1.239.6.3 -r1.240 --- src/sys/dev/raidframe/rf_netbsdkintf.c 2008/01/08 22:11:19 1.239.6.3 +++ src/sys/dev/raidframe/rf_netbsdkintf.c 2007/12/11 01:54:46 1.240 @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.239.6.3 2008/01/08 22:11:19 bouyer Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.240 2007/12/11 01:54:46 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -146,7 +146,7 @@ ***********************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.239.6.3 2008/01/08 22:11:19 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.240 2007/12/11 01:54:46 oster Exp $"); #include #include @@ -162,6 +162,7 @@ __KERNEL_RCSID(0, "$NetBSD: rf_netbsdkin #include #include #include +#include #include #include #include @@ -2207,9 +2208,7 @@ InitBP(struct buf *bp, struct vnode *b_v struct proc *b_proc) { /* bp->b_flags = B_PHYS | rw_flag; */ - bp->b_flags = rw_flag; /* XXX need B_PHYS here too??? */ - bp->b_oflags = 0; - bp->b_cflags = 0; + bp->b_flags = B_CALL | rw_flag; /* XXX need B_PHYS here too??? */ bp->b_bcount = numSect << logBytesPerSector; bp->b_bufsize = bp->b_bcount; bp->b_error = 0; @@ -2224,11 +2223,8 @@ InitBP(struct buf *bp, struct vnode *b_v 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) { - mutex_enter(&b_vp->v_interlock); - b_vp->v_numoutput++; - mutex_exit(&b_vp->v_interlock); + bp->b_vp->v_numoutput++; } } @@ -2912,21 +2908,17 @@ rf_find_raid_components() struct dkwedge_info dkw; error = VOP_IOCTL(vp, DIOCGWEDGEINFO, &dkw, FREAD, NOCRED); + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VOP_CLOSE(vp, FREAD | FWRITE, NOCRED); + vput(vp); if (error) { printf("RAIDframe: can't get wedge info for " "dev %s (%d)\n", dv->dv_xname, error); - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - VOP_CLOSE(vp, FREAD | FWRITE, NOCRED); - vput(vp); continue; } - if (strcmp(dkw.dkw_ptype, DKW_PTYPE_RAIDFRAME) != 0) { - vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); - VOP_CLOSE(vp, FREAD | FWRITE, NOCRED); - vput(vp); + if (strcmp(dkw.dkw_ptype, DKW_PTYPE_RAIDFRAME) != 0) continue; - } ac_list = rf_get_component(ac_list, dev, vp, dv->dv_xname, dkw.dkw_size);