Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-6]: src/sys/dev/mscp Pull up revision 1.32 (requested by ragge ...
details: https://anonhg.NetBSD.org/src/rev/d65d057e2346
branches: netbsd-1-6
changeset: 529317:d65d057e2346
user: he <he%NetBSD.org@localhost>
date: Sun Nov 10 15:44:02 2002 +0000
description:
Pull up revision 1.32 (requested by ragge in ticket #547):
Correct ``ra'' disk instrumentation.
diffstat:
sys/dev/mscp/mscp_disk.c | 29 +++++++++++++++++++++++------
1 files changed, 23 insertions(+), 6 deletions(-)
diffs (85 lines):
diff -r 61ca7970dba7 -r d65d057e2346 sys/dev/mscp/mscp_disk.c
--- a/sys/dev/mscp/mscp_disk.c Sun Nov 10 15:41:37 2002 +0000
+++ b/sys/dev/mscp/mscp_disk.c Sun Nov 10 15:44:02 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $ */
+/* $NetBSD: mscp_disk.c,v 1.30.10.1 2002/11/10 15:44:02 he Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* Copyright (c) 1988 Regents of the University of California.
@@ -49,7 +49,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.30 2001/11/13 07:38:28 lukem Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mscp_disk.c,v 1.30.10.1 2002/11/10 15:44:02 he Exp $");
#include <sys/param.h>
#include <sys/buf.h>
@@ -287,6 +287,8 @@
{
int unit;
struct ra_softc *ra;
+ int b;
+
/*
* Make sure this is a reasonable drive to use.
*/
@@ -300,6 +302,10 @@
* If drive is open `raw' or reading label, let it at it.
*/
if (ra->ra_state == DK_RDLABEL) {
+ /* Make some statistics... /bqt */
+ b = splbio();
+ disk_busy(&ra->ra_disk);
+ splx(b);
mscp_strategy(bp, ra->ra_dev.dv_parent);
return;
}
@@ -321,8 +327,9 @@
goto done;
/* Make some statistics... /bqt */
- ra->ra_disk.dk_xfer++;
- ra->ra_disk.dk_bytes += bp->b_bcount;
+ b = splbio();
+ disk_busy(&ra->ra_disk);
+ splx(b);
mscp_strategy(bp, ra->ra_dev.dv_parent);
return;
@@ -671,6 +678,7 @@
{
int unit;
struct rx_softc *rx;
+ int b;
/*
* Make sure this is a reasonable drive to use.
@@ -700,8 +708,9 @@
}
/* Make some statistics... /bqt */
- rx->ra_disk.dk_xfer++;
- rx->ra_disk.dk_bytes += bp->b_bcount;
+ b = splbio();
+ disk_busy(&rx->ra_disk);
+ splx(b);
mscp_strategy(bp, rx->ra_dev.dv_parent);
return;
@@ -841,6 +850,14 @@
struct device *usc;
struct buf *bp;
{
+ struct ra_softc *ra;
+ int unit;
+
+ /* We assume that this is a reasonable drive. ra_strategy should
+ already have verified it. Thus, no checks here... /bqt */
+ unit = DISKUNIT(bp->b_dev);
+ ra = ra_cd.cd_devs[unit];
+ disk_unbusy(&ra->ra_disk, bp->b_bcount);
biodone(bp);
}
Home |
Main Index |
Thread Index |
Old Index