From ea16b13f64ae455bf32b15cecffc784d34f2b592 Mon Sep 17 00:00:00 2001 From: oster Date: Sat, 7 Jun 2008 17:50:34 +0000 Subject: - Use bdev_strategy() instead of VOP_STRATEGY(). - Don't bother taking the v_interlock or bumping b_vp->v_numoutput -- there won't be any other writers for this bp, and so there's no point doing this locking song'n'dance. Patch from Juergen Hannken-Illjes. Thanks!!! Addresses PR#38856. With this change I've been unable to replicate the hard hangs. --- sys/dev/raidframe/rf_netbsdkintf.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) (limited to 'sys/dev/raidframe') diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index b21f041c257..313a491a213 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.246 2008/04/28 20:23:56 martin Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.247 2008/06/07 17:50:34 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2008 The NetBSD Foundation, Inc. * All rights reserved. @@ -139,7 +139,7 @@ ***********************************************************/ #include -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.246 2008/04/28 20:23:56 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.247 2008/06/07 17:50:34 oster Exp $"); #include #include @@ -2104,7 +2104,7 @@ rf_DispatchKernelIO(RF_DiskQueue_t *queue, RF_DiskQueueData_t *req) (int) (req->numSector << queue->raidPtr->logBytesPerSector), (int) queue->raidPtr->logBytesPerSector)); - VOP_STRATEGY(bp->b_vp, bp); + bdev_strategy(bp); break; @@ -2216,14 +2216,6 @@ InitBP(struct buf *bp, struct vnode *b_vp, unsigned rw_flag, dev_t dev, bp->b_proc = b_proc; 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); - } - } static void -- cgit