summaryrefslogtreecommitdiff
path: root/sys/kern/spec_vnops.c
diff options
context:
space:
mode:
authorConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-06 20:04:36 +0000
committerConstantine Sapuntzakis <csapuntz@cvs.openbsd.org>1997-11-06 20:04:36 +0000
commit826a0a0c816ecbc7c3db6161a4b3a30d2c88f062 (patch)
tree7d75ef47dd5bd42a36df4f7d08d01604e314b312 /sys/kern/spec_vnops.c
parentb5cc8361e0c5ce2b972872699aa729216f1bb2ea (diff)
Removed i386-specific crud
Diffstat (limited to 'sys/kern/spec_vnops.c')
-rw-r--r--sys/kern/spec_vnops.c97
1 files changed, 4 insertions, 93 deletions
diff --git a/sys/kern/spec_vnops.c b/sys/kern/spec_vnops.c
index b2fcc0aa692..2d70674a2ac 100644
--- a/sys/kern/spec_vnops.c
+++ b/sys/kern/spec_vnops.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: spec_vnops.c,v 1.12 1997/11/06 05:58:44 csapuntz Exp $ */
+/* $OpenBSD: spec_vnops.c,v 1.13 1997/11/06 20:04:35 csapuntz Exp $ */
/* $NetBSD: spec_vnops.c,v 1.29 1996/04/22 01:42:38 christos Exp $ */
/*
@@ -532,77 +532,6 @@ loop:
return (0);
}
-/*
- * Just call the device strategy routine
- */
-int fs_read[16], fs_write[16];
-
-int cur_found[10];
-
-int fs_bwrite[64][10];
-int fs_bwrite_cnt[64];
-int num_found;
-
-int num_levels = 4;
-#include <machine/cpu.h>
-#include <machine/pcb.h>
-
-int find_stack(int);
-
-int find_stack(int levels)
-
-{
- struct pcb stack;
- int *eip, *ebp;
-
- savectx(&stack);
- ebp = (int *)stack.pcb_ebp;
- eip = (int *) *(ebp + 1);
-
- while ((int)ebp > 0xf0000000 && levels--) {
- eip = (int *) *(ebp + 1);
-
- ebp = (int *) *ebp;
- }
-
- return ((int)eip);
-}
-
-void track_write __P((void));
-
-void track_write(void)
-
-{
- int idx, cnt;
-
- for (idx = 0; idx < 10; idx++) {
- cur_found[idx] = find_stack(idx + num_levels);
- }
-
- for (cnt = 0; cnt < num_found; cnt++) {
- for (idx = 0; idx < 10; idx++) {
- if (fs_bwrite[cnt][idx] != cur_found[idx])
- goto next_iter;
- }
-
- fs_bwrite_cnt[cnt]++;
- break;
- next_iter:
- }
-
- if ((cnt == num_found) &&
- (num_found != 64)) {
- for (idx = 0; idx < 10; idx++) {
- fs_bwrite[num_found][idx] = cur_found[idx];
- }
-
- fs_bwrite_cnt[num_found] = 1;
- num_found++;
- }
-
- return;
-}
-
int
spec_strategy(v)
void *v;
@@ -610,31 +539,13 @@ spec_strategy(v)
struct vop_strategy_args /* {
struct buf *a_bp;
} */ *ap = v;
- struct buf *bp;
-
- int maj = major(ap->a_bp->b_dev);
+ struct buf *bp = ap->a_bp;
+ int maj = major(bp->b_dev);
- if ((maj >= 0) && (maj < 16)) {
- if (ap->a_bp->b_flags & B_READ)
- fs_read[maj]++;
- else {
- fs_write[maj]++;
- if (maj == 4)
- track_write();
-
- }
- }
-
-#if 0
- assert (!(flags & (B_DELWRI | B_DONE)));
-#endif
-
- bp = ap->a_bp;
-
if (LIST_FIRST(&bp->b_dep) != NULL && bioops.io_start)
(*bioops.io_start)(bp);
- (*bdevsw[maj].d_strategy)(ap->a_bp);
+ (*bdevsw[maj].d_strategy)(bp);
return (0);
}