summaryrefslogtreecommitdiff
path: root/sys/scsi/cd.c
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/cd.c
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/cd.c')
-rw-r--r--sys/scsi/cd.c7
1 files changed, 4 insertions, 3 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