summaryrefslogtreecommitdiffstats
path: root/sys/dev
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1998-11-02 04:09:34 +0000
committergrog <grog@FreeBSD.org>1998-11-02 04:09:34 +0000
commitb7c6c26d5ae2740c585aff6b24d4bc856f56b794 (patch)
tree40601aa8124d226373a579dc50a2d4c9bed5ee9b /sys/dev
parentfad87abf77bdf42cdd6fd29f8d12678afdbb2bc2 (diff)
downloadFreeBSD-src-b7c6c26d5ae2740c585aff6b24d4bc856f56b794.zip
FreeBSD-src-b7c6c26d5ae2740c585aff6b24d4bc856f56b794.tar.gz
Close any drives downed in an interrupt context.
Ensure correct order of requests. Call launch_requests at splhigh to see if this stops the mysterious SMP panics
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/vinum/vinumrequest.c29
1 files changed, 24 insertions, 5 deletions
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c
index 94df5b9..bb7711c 100644
--- a/sys/dev/vinum/vinumrequest.c
+++ b/sys/dev/vinum/vinumrequest.c
@@ -37,7 +37,7 @@
* otherwise) arising in any way out of the use of this software, even if
* advised of the possibility of such damage.
*
- * $Id: request.c,v 1.18 1998/08/31 23:45:35 grog Exp grog $
+ * $Id: request.c,v 1.19 1998/11/01 02:18:39 grog Exp grog $
*/
#define REALLYKERNEL
@@ -134,7 +134,14 @@ vinumstrategy(struct buf *bp)
* The correct way is to hand it off the the Vinum
* daemon, but I haven't found a name for it yet */
while (vinum_conf.flags & VF_DIRTYCONFIG) { /* config is dirty, save it now */
+ int driveno;
+
vinum_conf.flags &= ~VF_DIRTYCONFIG; /* turn it off */
+ for (driveno = 0; driveno < vinum_conf.drives_used; driveno++) {
+ if ((DRIVE[driveno].state == drive_down) /* drive down */
+ &&(DRIVE[driveno].vp != NULL)) /* but still open */
+ close_drive(&DRIVE[driveno]); /* close it now */
+ }
save_config();
}
@@ -278,8 +285,13 @@ vinumstart(struct buf *bp, int reviveok)
biodone(bp);
freerq(rq);
return -1;
- }
- return launch_requests(rq, reviveok); /* now start the requests if we can */
+ } { /* XXX */
+ int result;
+ int s = splhigh();
+ result = launch_requests(rq, reviveok); /* now start the requests if we can */
+ splx(s);
+ return result;
+ }
} else
/* This is a write operation. We write to all
* plexes. If this is a RAID 5 plex, we must also
@@ -308,8 +320,14 @@ vinumstart(struct buf *bp, int reviveok)
biodone(bp);
freerq(rq);
return -1;
- }
- return launch_requests (rq, reviveok); /* start the requests */
+ } { /* XXX */
+ int result;
+ int s = splhigh();
+ result = launch_requests(rq, reviveok); /* now start the requests if we can */
+ splx(s);
+ return result;
+ }
+ /* return launch_requests (rq, reviveok); *//* start the requests */
}
}
@@ -378,6 +396,7 @@ launch_requests(struct request *rq, int reviveok)
struct drive *drive = &DRIVE[rqe->driveno]; /* drive to access */
if ((rqe->b.b_flags & B_READ) == 0)
rqe->b.b_vp->v_numoutput++; /* one more output going */
+ rqe->b.b_flags |= B_ORDERED; /* XXX chase SCSI driver */
#if DEBUG
if (debug & DEBUG_ADDRESSES)
printf(" %s dev 0x%x, sd %d, offset 0x%x, devoffset 0x%x, length %ld\n",
OpenPOWER on IntegriCloud