aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vinum
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2000-04-16 07:18:08 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2000-04-16 07:18:08 +0000
commit896402f4028ad47b257b129eb88c4b332a6a33be (patch)
treeb0d641a5b40b5806f1cab0d072beca534c6a5c7d /sys/dev/vinum
parentd3490611f25ff5d6a5af4d60e567bfca2af28212 (diff)
Notes
Diffstat (limited to 'sys/dev/vinum')
-rw-r--r--sys/dev/vinum/vinuminterrupt.c4
-rw-r--r--sys/dev/vinum/vinumraid5.c2
-rw-r--r--sys/dev/vinum/vinumrequest.c35
3 files changed, 21 insertions, 20 deletions
diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c
index 1a1725c9d36ca..7d3e163f5d822 100644
--- a/sys/dev/vinum/vinuminterrupt.c
+++ b/sys/dev/vinum/vinuminterrupt.c
@@ -182,7 +182,7 @@ complete_rqe(struct buf *bp)
ubp->b_resid = 0; /* completed our transfer */
if (rq->isplex == 0) /* volume request, */
VOL[rq->volplex.volno].active--; /* another request finished */
- biodone(ubp); /* top level buffer completed */
+ bufdone(ubp); /* top level buffer completed */
freerq(rq); /* return the request storage */
}
}
@@ -237,7 +237,7 @@ sdio_done(struct buf *bp)
SD[sbp->sdno].writes++;
SD[sbp->sdno].bytes_written += sbp->b.b_bcount;
}
- biodone(sbp->bp); /* complete the caller's I/O */
+ bufdone(sbp->bp); /* complete the caller's I/O */
Free(sbp);
}
diff --git a/sys/dev/vinum/vinumraid5.c b/sys/dev/vinum/vinumraid5.c
index 41b9999417a0d..3409b2170ce98 100644
--- a/sys/dev/vinum/vinumraid5.c
+++ b/sys/dev/vinum/vinumraid5.c
@@ -469,7 +469,7 @@ bre5(struct request *rq,
if (rqg == NULL) { /* malloc failed */
bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENOMEM;
- biodone(bp);
+ bufdone(bp);
return REQUEST_ENOMEM;
}
rqg->plexno = plexno;
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c
index 41dfa5d75b43c..62fe2ced36091 100644
--- a/sys/dev/vinum/vinumrequest.c
+++ b/sys/dev/vinum/vinumrequest.c
@@ -117,8 +117,9 @@ logrq(enum rqinfo_type type, union rqinfou info, struct buf *ubp)
#endif
void
-vinumstrategy(struct buf *bp)
+vinumstrategy(struct bio *bip)
{
+ struct buf *bp = (struct buf *) bip;
int volno;
struct volume *vol = NULL;
@@ -136,7 +137,7 @@ vinumstrategy(struct buf *bp)
default:
bp->b_error = EIO; /* I/O error */
bp->b_ioflags |= BIO_ERROR;
- biodone(bp);
+ bufdone(bp);
return;
case VINUM_VOLUME_TYPE: /* volume I/O */
@@ -145,11 +146,11 @@ vinumstrategy(struct buf *bp)
if (vol->state != volume_up) { /* can't access this volume */
bp->b_error = EIO; /* I/O error */
bp->b_ioflags |= BIO_ERROR;
- biodone(bp);
+ bufdone(bp);
return;
}
if (vinum_bounds_check(bp, vol) <= 0) { /* don't like them bounds */
- biodone(bp); /* have nothing to do with this */
+ bufdone(bp); /* have nothing to do with this */
return;
}
/* FALLTHROUGH */
@@ -193,14 +194,14 @@ vinumstart(struct buf *bp, int reviveok)
if ((bp->b_bcount % DEV_BSIZE) != 0) { /* bad length */
bp->b_error = EINVAL; /* invalid size */
bp->b_ioflags |= BIO_ERROR;
- biodone(bp);
+ bufdone(bp);
return -1;
}
rq = (struct request *) Malloc(sizeof(struct request)); /* allocate a request struct */
if (rq == NULL) { /* can't do it */
bp->b_error = ENOMEM; /* can't get memory */
bp->b_ioflags |= BIO_ERROR;
- biodone(bp);
+ bufdone(bp);
return -1;
}
bzero(rq, sizeof(struct request));
@@ -259,7 +260,7 @@ vinumstart(struct buf *bp, int reviveok)
bp->b_error = EIO; /* I/O error */
bp->b_ioflags |= BIO_ERROR;
}
- biodone(bp);
+ bufdone(bp);
freerq(rq);
return -1;
}
@@ -289,7 +290,7 @@ vinumstart(struct buf *bp, int reviveok)
bp->b_ioflags |= BIO_ERROR;
}
if ((bp->b_flags & B_DONE) == 0)
- biodone(bp);
+ bufdone(bp);
freerq(rq);
return -1;
}
@@ -482,7 +483,7 @@ bre(struct request *rq,
if (rqg == NULL) { /* malloc failed */
bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENOMEM;
- biodone(bp);
+ bufdone(bp);
return REQUEST_ENOMEM;
}
rqg->plexno = plexno;
@@ -521,7 +522,7 @@ bre(struct request *rq,
deallocrqg(rqg);
bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENOMEM;
- biodone(bp);
+ bufdone(bp);
return REQUEST_ENOMEM; /* can't do it */
}
}
@@ -566,7 +567,7 @@ bre(struct request *rq,
if (rqg == NULL) { /* malloc failed */
bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENOMEM;
- biodone(bp);
+ bufdone(bp);
return REQUEST_ENOMEM;
}
rqg->plexno = plexno;
@@ -631,7 +632,7 @@ bre(struct request *rq,
deallocrqg(rqg);
bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENOMEM;
- biodone(bp);
+ bufdone(bp);
return REQUEST_ENOMEM; /* can't do it */
}
*diskaddr += rqe->datalen; /* look at the remainder */
@@ -857,7 +858,7 @@ abortrequest(struct request *rq, int error)
bp->b_ioflags |= BIO_ERROR;
bp->b_error = error;
freerq(rq); /* free everything we're doing */
- biodone(bp);
+ bufdone(bp);
return error; /* and give up */
}
@@ -899,7 +900,7 @@ sdio(struct buf *bp)
}
bp->b_ioflags |= BIO_ERROR;
bp->b_error = EIO;
- biodone(bp);
+ bufdone(bp);
return;
}
/*
@@ -909,7 +910,7 @@ sdio(struct buf *bp)
if (sd->state < sd_empty) { /* nothing to talk to, */
bp->b_ioflags |= BIO_ERROR;
bp->b_error = EIO;
- biodone(bp);
+ bufdone(bp);
return;
}
/* Get a buffer */
@@ -917,7 +918,7 @@ sdio(struct buf *bp)
if (sbp == NULL) {
bp->b_ioflags |= BIO_ERROR;
bp->b_error = ENOMEM;
- biodone(bp);
+ bufdone(bp);
return;
}
bzero(sbp, sizeof(struct sdbuf)); /* start with nothing */
@@ -940,7 +941,7 @@ sdio(struct buf *bp)
sbp->b.b_bcount -= (endoffset - sd->sectors) * DEV_BSIZE; /* trim */
if (sbp->b.b_bcount <= 0) { /* nothing to transfer */
bp->b_resid = bp->b_bcount; /* nothing transferred */
- biodone(bp);
+ bufdone(bp);
Free(sbp);
return;
}