summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorgrog <grog@FreeBSD.org>1999-03-23 04:49:08 +0000
committergrog <grog@FreeBSD.org>1999-03-23 04:49:08 +0000
commitd82a5036065c10d8a84fb9dc43409cfa87b84ebf (patch)
tree3bbcca28c452a0c44a127db133aa67dcfa40b128
parented415fe18c2f1400c0b9ce43698c275fd5050326 (diff)
downloadFreeBSD-src-d82a5036065c10d8a84fb9dc43409cfa87b84ebf.zip
FreeBSD-src-d82a5036065c10d8a84fb9dc43409cfa87b84ebf.tar.gz
vinum_start:
remove the splbio() around the call to launch read requests. launch_requests: Move the splbio() protection outside the entire launch_loop. The previous location was causing problems with IDE drives, where the call to the strategy routine often did not complete until after complete_rqe deallocated the request structure. Solution-independently-found-by: Russell Neeper <r-neeper@tamu.edu> Problem-reported-by: Vallo Kallaste <vallo@matti.ee> John Saunders <john@nlc.net.au> Bernd Walter <ticso@cicely.de> (maybe)
-rw-r--r--sys/dev/vinum/vinumrequest.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c
index 6786fe0..7d68ef8 100644
--- a/sys/dev/vinum/vinumrequest.c
+++ b/sys/dev/vinum/vinumrequest.c
@@ -107,7 +107,6 @@ vinumstrategy(struct buf *bp)
int volno;
struct volume *vol = NULL;
struct devcode *device = (struct devcode *) &bp->b_dev; /* decode device number */
- int s; /* spl */
switch (device->type) {
case VINUM_SD_TYPE:
@@ -148,9 +147,7 @@ vinumstrategy(struct buf *bp)
case VINUM_PLEX_TYPE:
case VINUM_RAWPLEX_TYPE:
bp->b_resid = bp->b_bcount; /* transfer everything */
- s = splbio();
vinumstart(bp, 0);
- splx(s);
return;
}
}
@@ -364,6 +361,7 @@ launch_requests(struct request *rq, int reviveok)
if (debug & DEBUG_LASTREQS)
logrq(loginfo_user_bpl, (union rqinfou) rq->bp, rq->bp);
#endif
+ s = splbio();
for (rqg = rq->rqg; rqg != NULL; rqg = rqg->next) { /* through the whole request chain */
rqg->active = rqg->count; /* they're all active */
rq->active++; /* one more active request group */
@@ -394,13 +392,12 @@ launch_requests(struct request *rq, int reviveok)
logrq(loginfo_rqe, (union rqinfou) rqe, rq->bp);
#endif
/* fire off the request */
- s = splbio();
(*bdevsw[major(rqe->b.b_dev)]->d_strategy) (&rqe->b);
- splx(s);
}
/* XXX Do we need caching? Think about this more */
}
}
+ splx(s);
return 0;
}
OpenPOWER on IntegriCloud