summaryrefslogtreecommitdiff
path: root/sys/scsi
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/scsi
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/scsi')
-rw-r--r--sys/scsi/cd.c7
-rw-r--r--sys/scsi/sd.c7
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/scsi/cd.c b/sys/scsi/cd.c
index 6736c67350e..fd441cad760 100644
--- a/sys/scsi/cd.c
+++ b/sys/scsi/cd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cd.c,v 1.73 2003/11/07 10:16:46 jmc Exp $ */
+/* $OpenBSD: cd.c,v 1.74 2004/02/15 02:45:47 tedu Exp $ */
/* $NetBSD: cd.c,v 1.100 1997/04/02 02:29:30 mycroft Exp $ */
/*
@@ -705,7 +705,7 @@ cdstart(v)
(u_char *) bp->b_data, bp->b_bcount,
CDRETRIES, 30000, bp, SCSI_NOSLEEP |
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT))) {
- disk_unbusy(&cd->sc_dk, 0);
+ disk_unbusy(&cd->sc_dk, 0, 0);
printf("%s: not queued", cd->sc_dev.dv_xname);
}
}
@@ -718,7 +718,8 @@ cddone(xs)
struct cd_softc *cd = xs->sc_link->device_softc;
if (xs->bp != NULL)
- disk_unbusy(&cd->sc_dk, xs->bp->b_bcount - xs->bp->b_resid);
+ disk_unbusy(&cd->sc_dk, xs->bp->b_bcount - xs->bp->b_resid,
+ (xs->bp->b_flags & B_READ));
}
void
diff --git a/sys/scsi/sd.c b/sys/scsi/sd.c
index de69457d985..a1ad171164e 100644
--- a/sys/scsi/sd.c
+++ b/sys/scsi/sd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sd.c,v 1.65 2004/01/25 21:51:18 krw Exp $ */
+/* $OpenBSD: sd.c,v 1.66 2004/02/15 02:45:47 tedu Exp $ */
/* $NetBSD: sd.c,v 1.111 1997/04/02 02:29:41 mycroft Exp $ */
/*-
@@ -751,7 +751,7 @@ sdstart(v)
SDRETRIES, 60000, bp, SCSI_NOSLEEP |
((bp->b_flags & B_READ) ? SCSI_DATA_IN : SCSI_DATA_OUT));
if (error) {
- disk_unbusy(&sd->sc_dk, 0);
+ disk_unbusy(&sd->sc_dk, 0, 0);
printf("%s: not queued, error %d\n",
sd->sc_dev.dv_xname, error);
}
@@ -770,7 +770,8 @@ sddone(xs)
}
if (xs->bp != NULL)
- disk_unbusy(&sd->sc_dk, (xs->bp->b_bcount - xs->bp->b_resid));
+ disk_unbusy(&sd->sc_dk, (xs->bp->b_bcount - xs->bp->b_resid),
+ (xs->bp->b_flags & B_READ));
}
void