summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>1999-08-14 03:10:03 +0000
committeroster <oster@NetBSD.org>1999-08-14 03:10:03 +0000
commit6409e641a6af48e566f50562f669686ac9b24514 (patch)
tree660177e37186be534a2b26895b1c3b101272e289 /sys/dev/raidframe
parent4a058e82c533b4d5cb3c9b8e8ecc0224646c9680 (diff)
Remove a 'struct proc *'-passing abomination that's been bugging me
for quite some time.
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_copyback.c4
-rw-r--r--sys/dev/raidframe/rf_disks.c4
-rw-r--r--sys/dev/raidframe/rf_driver.c7
-rw-r--r--sys/dev/raidframe/rf_netbsdkintf.c19
-rw-r--r--sys/dev/raidframe/rf_raid.h3
-rw-r--r--sys/dev/raidframe/rf_reconstruct.c4
6 files changed, 12 insertions, 29 deletions
diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c
index e7949cac283..503a2adcdb5 100644
--- a/sys/dev/raidframe/rf_copyback.c
+++ b/sys/dev/raidframe/rf_copyback.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_copyback.c,v 1.8 1999/08/13 03:41:53 oster Exp $ */
+/* $NetBSD: rf_copyback.c,v 1.9 1999/08/14 03:10:03 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -123,7 +123,7 @@ rf_CopybackReconstructedData(raidPtr)
}
badDisk = &raidPtr->Disks[frow][fcol];
- proc = raidPtr->proc; /* XXX Yes, this is not nice.. */
+ proc = raidPtr->engine_thread;
/* This device may have been opened successfully the first time. Close
* it before trying to open it again.. */
diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c
index 7e3f197aba4..8c620400950 100644
--- a/sys/dev/raidframe/rf_disks.c
+++ b/sys/dev/raidframe/rf_disks.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_disks.c,v 1.12 1999/08/13 03:41:56 oster Exp $ */
+/* $NetBSD: rf_disks.c,v 1.13 1999/08/14 03:10:03 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -377,7 +377,7 @@ rf_ConfigureDisk(raidPtr, buf, diskPtr, row, col)
}
(void) strcpy(diskPtr->devname, p);
- proc = raidPtr->proc; /* XXX Yes, this is not nice.. */
+ proc = raidPtr->engine_thread;
/* Let's start by claiming the component is fine and well... */
diskPtr->status = rf_ds_optimal;
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c
index b5c2e23e8ce..4c1e55d52df 100644
--- a/sys/dev/raidframe/rf_driver.c
+++ b/sys/dev/raidframe/rf_driver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_driver.c,v 1.14 1999/08/13 03:41:58 oster Exp $ */
+/* $NetBSD: rf_driver.c,v 1.15 1999/08/14 03:10:03 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -331,7 +331,7 @@ rf_UnconfigureVnodes( raidPtr )
/* We take this opportunity to close the vnodes like we should.. */
- p = raidPtr->proc; /* XXX */
+ p = raidPtr->engine_thread;
for (r = 0; r < raidPtr->numRow; r++) {
for (c = 0; c < raidPtr->numCol; c++) {
@@ -417,7 +417,6 @@ rf_Configure(raidPtr, cfgPtr)
RF_RowCol_t row, col;
int i, rc;
int unit;
- struct proc *p;
if (raidPtr->valid) {
RF_ERRORMSG("RAIDframe configuration not shut down. Aborting configure.\n");
@@ -475,10 +474,8 @@ rf_Configure(raidPtr, cfgPtr)
/* XXX this clearing should be moved UP to outside of here.... that,
* or rf_Configure() needs to take more arguments... XXX */
unit = raidPtr->raidid;
- p = raidPtr->proc; /* XXX save these... */
bzero((char *) raidPtr, sizeof(RF_Raid_t));
raidPtr->raidid = unit;
- raidPtr->proc = p; /* XXX and then recover them.. */
DO_RAID_MUTEX(&raidPtr->mutex);
/* set up the cleanup list. Do this after ConfigureDebug so that
* value of memDebug will be set */
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c
index be5f7731bc7..55737d12d54 100644
--- a/sys/dev/raidframe/rf_netbsdkintf.c
+++ b/sys/dev/raidframe/rf_netbsdkintf.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_netbsdkintf.c,v 1.26 1999/08/14 02:41:36 oster Exp $ */
+/* $NetBSD: rf_netbsdkintf.c,v 1.27 1999/08/14 03:10:03 oster Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -789,16 +789,6 @@ raidioctl(dev, cmd, data, flag, p)
/* should do some kind of sanity check on the configuration.
* Store the sum of all the bytes in the last byte? */
-#if 0
- db1_printf(("Considering configuring the system.:%d 0x%x\n",
- unit, p));
-#endif
-
- /* We need the pointer to this a little deeper, so stash it
- * here... */
-
- raidPtrs[unit]->proc = p;
-
/* configure the system */
raidPtrs[unit]->raidid = unit;
@@ -846,7 +836,6 @@ raidioctl(dev, cmd, data, flag, p)
if (rf_debugKernelAccess) {
printf("call shutdown\n");
}
- raidPtrs[unit]->proc = p; /* XXX necessary evil */
retcode = rf_Shutdown(raidPtrs[unit]);
@@ -985,7 +974,7 @@ raidioctl(dev, cmd, data, flag, p)
}
/* borrow the thread of the requesting process */
- raidPtrs[unit]->proc = p; /* Blah... :-p GO */
+
s = splbio();
retcode = rf_RewriteParity(raidPtrs[unit]);
splx(s);
@@ -1006,7 +995,6 @@ raidioctl(dev, cmd, data, flag, p)
sparePtr = (RF_SingleComponent_t *) data;
memcpy( &hot_spare, sparePtr, sizeof(RF_SingleComponent_t));
printf("Adding spare\n");
- raidPtrs[unit]->proc = p; /* Blah... :-p GO */
retcode = rf_add_hot_spare(raidPtrs[unit], &hot_spare);
return(retcode);
@@ -1032,7 +1020,6 @@ raidioctl(dev, cmd, data, flag, p)
}
printf("Attempting a rebuild in place\n");
s = splbio();
- raidPtrs[unit]->proc = p; /* Blah... :-p GO */
retcode = rf_ReconstructInPlace(raidPtrs[unit], row, column);
splx(s);
return(retcode);
@@ -1170,7 +1157,7 @@ raidioctl(dev, cmd, data, flag, p)
}
/* borrow the current thread to get this done */
- raidPtrs[unit]->proc = p; /* ICK.. but needed :-p GO */
+
s = splbio();
rf_CopybackReconstructedData(raidPtrs[unit]);
splx(s);
diff --git a/sys/dev/raidframe/rf_raid.h b/sys/dev/raidframe/rf_raid.h
index bb27422e414..ba75dcb8e7c 100644
--- a/sys/dev/raidframe/rf_raid.h
+++ b/sys/dev/raidframe/rf_raid.h
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_raid.h,v 1.6 1999/07/08 00:45:24 oster Exp $ */
+/* $NetBSD: rf_raid.h,v 1.7 1999/08/14 03:10:04 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -222,7 +222,6 @@ struct RF_Raid_s {
int keep_acc_totals;
struct raidcinfo **raid_cinfo; /* array of component info */
- struct proc *proc; /* XXX shouldn't be needed here.. :-p */
int terminate_disk_queues;
diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c
index dcaa84a2e1b..877c7db894c 100644
--- a/sys/dev/raidframe/rf_reconstruct.c
+++ b/sys/dev/raidframe/rf_reconstruct.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_reconstruct.c,v 1.7 1999/08/13 03:41:57 oster Exp $ */
+/* $NetBSD: rf_reconstruct.c,v 1.8 1999/08/14 03:10:04 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -491,7 +491,7 @@ rf_ReconstructInPlace(raidPtr, row, col)
badDisk = &raidPtr->Disks[row][col];
- proc = raidPtr->proc; /* XXX Yes, this is not nice.. */
+ proc = raidPtr->engine_thread;
/* This device may have been opened successfully the
first time. Close it before trying to open it again.. */