summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorTed Unangst <tedu@cvs.openbsd.org>2004-02-15 02:45:48 +0000
committerTed Unangst <tedu@cvs.openbsd.org>2004-02-15 02:45:48 +0000
commitbafaa11c619a93cd4b705e4cca3a65baa2688326 (patch)
treecab08efe46eb2822ef440f2d84e9c243d779a3a9 /sys/arch/sparc/dev
parent1218bfa7ac931aa5372051060561ce67ec995924 (diff)
new arg to disk_unbusy, to record separate read/write statistics.
looked at by various, testing henning@ mcbride@ dan weeks mostly from netbsd via Pedro Martelletto <pbastos@rdc.puc-rio.br>
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/fd.c7
-rw-r--r--sys/arch/sparc/dev/xd.c8
-rw-r--r--sys/arch/sparc/dev/xy.c8
3 files changed, 14 insertions, 9 deletions
diff --git a/sys/arch/sparc/dev/fd.c b/sys/arch/sparc/dev/fd.c
index 99de2dfe043..64b520ad889 100644
--- a/sys/arch/sparc/dev/fd.c
+++ b/sys/arch/sparc/dev/fd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fd.c,v 1.34 2004/01/12 11:35:08 jmc Exp $ */
+/* $OpenBSD: fd.c,v 1.35 2004/02/15 02:45:46 tedu Exp $ */
/* $NetBSD: fd.c,v 1.51 1997/05/24 20:16:19 pk Exp $ */
/*-
@@ -1363,7 +1363,7 @@ loop:
}
/*FALLTHROUGH*/
case SEEKCOMPLETE:
- disk_unbusy(&fd->sc_dk, 0); /* no data on seek */
+ disk_unbusy(&fd->sc_dk, 0, 0); /* no data on seek */
/* Make sure seek really happened. */
if (fdc->sc_nstat != 2 || (st0 & 0xf8) != 0x20 ||
@@ -1391,7 +1391,8 @@ loop:
case IOCOMPLETE: /* IO DONE, post-analyze */
timeout_del(&fdc->fdctimeout_to);
- disk_unbusy(&fd->sc_dk, (bp->b_bcount - bp->b_resid));
+ disk_unbusy(&fd->sc_dk, (bp->b_bcount - bp->b_resid),
+ (bp->b_flags & B_READ));
if (fdc->sc_nstat != 7 || st1 != 0 ||
((st0 & 0xf8) != 0 &&
diff --git a/sys/arch/sparc/dev/xd.c b/sys/arch/sparc/dev/xd.c
index 447a4dae08b..cf175036bd7 100644
--- a/sys/arch/sparc/dev/xd.c
+++ b/sys/arch/sparc/dev/xd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xd.c,v 1.27 2004/01/12 11:35:08 jmc Exp $ */
+/* $OpenBSD: xd.c,v 1.28 2004/02/15 02:45:46 tedu Exp $ */
/* $NetBSD: xd.c,v 1.37 1997/07/29 09:58:16 fair Exp $ */
/*
@@ -1738,7 +1738,8 @@ xdc_reset(xdcsc, quiet, blastmode, error, xdsc)
iorq->buf->b_bcount);
disk_unbusy(&xdcsc->reqs[lcv].xd->sc_dk,
(xdcsc->reqs[lcv].buf->b_bcount -
- xdcsc->reqs[lcv].buf->b_resid));
+ xdcsc->reqs[lcv].buf->b_resid),
+ (xdcsc->reqs[lcv].buf->b_flags & B_READ));
biodone(iorq->buf);
XDC_FREE(xdcsc, lcv); /* add to free list */
break;
@@ -1943,7 +1944,8 @@ xdc_remove_iorq(xdcsc)
(vaddr_t) bp->b_un.b_addr,
bp->b_bcount);
disk_unbusy(&iorq->xd->sc_dk,
- (bp->b_bcount - bp->b_resid));
+ (bp->b_bcount - bp->b_resid),
+ (bp->b_flags & B_READ));
XDC_FREE(xdcsc, rqno);
biodone(bp);
break;
diff --git a/sys/arch/sparc/dev/xy.c b/sys/arch/sparc/dev/xy.c
index 29411e8da2d..f651417287a 100644
--- a/sys/arch/sparc/dev/xy.c
+++ b/sys/arch/sparc/dev/xy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: xy.c,v 1.23 2003/09/29 09:08:19 miod Exp $ */
+/* $OpenBSD: xy.c,v 1.24 2004/02/15 02:45:46 tedu Exp $ */
/* $NetBSD: xy.c,v 1.26 1997/07/19 21:43:56 pk Exp $ */
/*
@@ -1644,7 +1644,8 @@ xyc_reset(xycsc, quiet, blastmode, error, xysc)
iorq->xy->xyq.b_actf = iorq->buf->b_actf;
disk_unbusy(&xycsc->reqs[lcv].xy->sc_dk,
(xycsc->reqs[lcv].buf->b_bcount -
- xycsc->reqs[lcv].buf->b_resid));
+ xycsc->reqs[lcv].buf->b_resid),
+ (xycsc->reqs[lcv].buf->b_flags & B_READ));
biodone(iorq->buf);
iorq->mode = XY_SUB_FREE;
break;
@@ -1821,7 +1822,8 @@ xyc_remove_iorq(xycsc)
bp->b_bcount);
iorq->xy->xyq.b_actf = bp->b_actf;
disk_unbusy(&iorq->xy->sc_dk,
- (bp->b_bcount - bp->b_resid));
+ (bp->b_bcount - bp->b_resid),
+ (bp->b_flags & B_READ));
iorq->mode = XY_SUB_FREE;
biodone(bp);
break;