From 5ccb30bf1f72b4f7adea3a16e531df51b82a43df Mon Sep 17 00:00:00 2001 From: grog Date: Sun, 17 Oct 1999 23:56:47 +0000 Subject: sdio_done: Set the errors in the correct buffer header. Inspection-provoked-by: Bernd Walter --- sys/dev/vinum/vinuminterrupt.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/vinum/vinuminterrupt.c b/sys/dev/vinum/vinuminterrupt.c index 6f02fee..7e1c242 100644 --- a/sys/dev/vinum/vinuminterrupt.c +++ b/sys/dev/vinum/vinuminterrupt.c @@ -39,7 +39,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinuminterrupt.c,v 1.7 1999/10/12 04:34:50 grog Exp grog $ + * $Id$ * $FreeBSD$ */ @@ -208,27 +208,27 @@ sdio_done(struct buf *bp) sbp = (struct sdbuf *) bp; if (sbp->b.b_flags & B_ERROR) { /* had an error */ - bp->b_flags |= B_ERROR; - bp->b_error = sbp->b.b_error; + sbp->bp->b_flags |= B_ERROR; /* propagate upwards */ + sbp->bp->b_error = sbp->b.b_error; } #ifdef VINUMDEBUG if (debug & DEBUG_LASTREQS) logrq(loginfo_sdiodone, (union rqinfou) bp, bp); #endif sbp->bp->b_resid = sbp->b.b_resid; /* copy the resid field */ - biodone(sbp->bp); /* complete the caller's I/O */ /* Now update the statistics */ if (bp->b_flags & B_READ) { /* read operation */ DRIVE[sbp->driveno].reads++; - DRIVE[sbp->driveno].bytes_read += bp->b_bcount; + DRIVE[sbp->driveno].bytes_read += sbp->b.b_bcount; SD[sbp->sdno].reads++; - SD[sbp->sdno].bytes_read += bp->b_bcount; + SD[sbp->sdno].bytes_read += sbp->b.b_bcount; } else { /* write operation */ DRIVE[sbp->driveno].writes++; - DRIVE[sbp->driveno].bytes_written += bp->b_bcount; + DRIVE[sbp->driveno].bytes_written += sbp->b.b_bcount; SD[sbp->sdno].writes++; - SD[sbp->sdno].bytes_written += bp->b_bcount; + SD[sbp->sdno].bytes_written += sbp->b.b_bcount; } + biodone(sbp->bp); /* complete the caller's I/O */ Free(sbp); } -- cgit v1.1