summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2004-07-01 17:48:45 +0000
committeroster <oster@NetBSD.org>2004-07-01 17:48:45 +0000
commit98af6adb1da311a0d6ffd463017a29bc9e537a37 (patch)
treec7d0b159b7f2aa8ddab54b83a8a0404beae25f8b /sys/dev/raidframe
parent11e21240ccd339bb61e363078d7a8e3a5034caa0 (diff)
The result of rf_DoAccess() should *not* be assigned to bp->b_error.
As well, when we do detect some sort of an error, we should be doing a biodone() here. Thanks to yamt for noting the missing biodone(), as that led to discovery of the additional lossage.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index 91001a3167e..6b10e3f6f27 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.179 2004/04/22 00:17:13 itojun Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.180 2004/07/01 17:48:45 oster 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.179 2004/04/22 00:17:13 itojun Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.180 2004/07/01 17:48:45 oster Exp $");
#include <sys/param.h>
#include <sys/errno.h>
@@ -1674,6 +1674,7 @@ raidstart(RF_Raid_t *raidPtr)
struct raid_softc *rs;
int do_async;
struct buf *bp;
+ int rc;
unit = raidPtr->raidid;
rs = &raid_softc[unit];
@@ -1768,13 +1769,17 @@ raidstart(RF_Raid_t *raidPtr)
/* don't ever condition on bp->b_flags & B_WRITE.
* always condition on B_READ instead */
- bp->b_error = rf_DoAccess(raidPtr, (bp->b_flags & B_READ) ?
- RF_IO_TYPE_READ : RF_IO_TYPE_WRITE,
- do_async, raid_addr, num_blocks,
- bp->b_data, bp, RF_DAG_NONBLOCKING_IO);
+ rc = rf_DoAccess(raidPtr, (bp->b_flags & B_READ) ?
+ RF_IO_TYPE_READ : RF_IO_TYPE_WRITE,
+ do_async, raid_addr, num_blocks,
+ bp->b_data, bp, RF_DAG_NONBLOCKING_IO);
- if (bp->b_error) {
+ if (rc) {
+ bp->b_error = rc;
bp->b_flags |= B_ERROR;
+ bp->b_resid = bp->b_bcount;
+ biodone(bp);
+ /* continue loop */
}
RF_LOCK_MUTEX(raidPtr->mutex);