- 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.
This commit is contained in:
oster 2008-06-07 17:50:34 +00:00
parent 564b3de4f4
commit ea16b13f64
1 changed files with 3 additions and 11 deletions

View File

@ -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 <sys/cdefs.h>
__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 <sys/param.h>
#include <sys/errno.h>
@ -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