diff options
author | Greg Lehey <grog@FreeBSD.org> | 2001-01-10 05:07:52 +0000 |
---|---|---|
committer | Greg Lehey <grog@FreeBSD.org> | 2001-01-10 05:07:52 +0000 |
commit | 91c6496f6e4ee3d689e77596e56f7bdaf29085d8 (patch) | |
tree | 16a6400038b73fef49ff60728df2dd0e1d4b5c39 /sys/dev/vinum/vinumrequest.c | |
parent | 6e763eb38a6c5b89f0c76982511173c14ede73f4 (diff) | |
download | src-91c6496f6e4ee3d689e77596e56f7bdaf29085d8.tar.gz src-91c6496f6e4ee3d689e77596e56f7bdaf29085d8.zip |
vinumstart: Don't check for B_DONE on return from bre(), it doesn't
happen any more.
abortrequest: don't bufdone the user bp on error, let vinumstart() do
it.
Based on analysis by: tegge
Notes
Notes:
svn path=/head/; revision=70867
Diffstat (limited to 'sys/dev/vinum/vinumrequest.c')
-rw-r--r-- | sys/dev/vinum/vinumrequest.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/sys/dev/vinum/vinumrequest.c b/sys/dev/vinum/vinumrequest.c index 35abf3760f6a..fad2f3802975 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: vinumrequest.c,v 1.26 1999/12/30 07:38:33 grog Exp grog $ + * $Id: vinumrequest.c,v 1.30 2001/01/09 04:20:55 grog Exp grog $ * $FreeBSD$ */ @@ -253,8 +253,7 @@ vinumstart(struct buf *bp, int reviveok) diskaddr + (bp->b_bcount / DEV_BSIZE)); } - if ((status > REQUEST_RECOVERED) /* can't satisfy it */ - ||(bp->b_flags & B_DONE)) { /* XXX shouldn't get this without bad status */ + if (status > REQUEST_RECOVERED) { /* can't satisfy it */ if (status == REQUEST_DOWN) { /* not enough subdisks */ bp->b_error = EIO; /* I/O error */ bp->b_io.bio_flags |= BIO_ERROR; @@ -281,14 +280,12 @@ vinumstart(struct buf *bp, int reviveok) &diskstart, bp->b_blkno + (bp->b_bcount / DEV_BSIZE)); /* build requests for the plex */ } - if ((status > REQUEST_RECOVERED) /* can't satisfy it */ - ||(bp->b_flags & B_DONE)) { /* XXX shouldn't get this without bad status */ + if (status > REQUEST_RECOVERED) { /* can't satisfy it */ if (status == REQUEST_DOWN) { /* not enough subdisks */ bp->b_error = EIO; /* I/O error */ bp->b_io.bio_flags |= BIO_ERROR; } - if ((bp->b_flags & B_DONE) == 0) - bufdone(bp); + bufdone(bp); freerq(rq); return -1; } @@ -494,7 +491,6 @@ bre(struct request *rq, if (rqg == NULL) { /* malloc failed */ bp->b_error = ENOMEM; bp->b_io.bio_flags |= BIO_ERROR; - bufdone(bp); return REQUEST_ENOMEM; } rqg->plexno = plexno; @@ -533,7 +529,6 @@ bre(struct request *rq, deallocrqg(rqg); bp->b_error = ENOMEM; bp->b_io.bio_flags |= BIO_ERROR; - bufdone(bp); return REQUEST_ENOMEM; /* can't do it */ } } @@ -578,7 +573,6 @@ bre(struct request *rq, if (rqg == NULL) { /* malloc failed */ bp->b_error = ENOMEM; bp->b_io.bio_flags |= BIO_ERROR; - bufdone(bp); return REQUEST_ENOMEM; } rqg->plexno = plexno; @@ -643,7 +637,6 @@ bre(struct request *rq, deallocrqg(rqg); bp->b_error = ENOMEM; bp->b_io.bio_flags |= BIO_ERROR; - bufdone(bp); return REQUEST_ENOMEM; /* can't do it */ } *diskaddr += rqe->datalen; /* look at the remainder */ @@ -873,7 +866,6 @@ abortrequest(struct request *rq, int error) bp->b_error = error; freerq(rq); /* free everything we're doing */ bp->b_io.bio_flags |= BIO_ERROR; - bufdone(bp); return error; /* and give up */ } |