summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe/rf_raid.h
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>1999-01-26 02:33:49 +0000
committeroster <oster@NetBSD.org>1999-01-26 02:33:49 +0000
commit1eecf8e491f4ecb40edff2d8093fac193d203e73 (patch)
treefc9f06792e783e03fe393007c4caf9d3c8da17f3 /sys/dev/raidframe/rf_raid.h
parent7c2e6d4c420981d843ea6d87e2aa3ad916fac166 (diff)
RAIDframe cleanup, phase 1. Nuke simulator support, user-land driver,
out-dated comments, and other unneeded stuff. This helps prepare for cleaning up the rest of the code, and adding new functionality. No functional changes to the kernel code in this commit.
Diffstat (limited to 'sys/dev/raidframe/rf_raid.h')
-rw-r--r--sys/dev/raidframe/rf_raid.h202
1 files changed, 2 insertions, 200 deletions
diff --git a/sys/dev/raidframe/rf_raid.h b/sys/dev/raidframe/rf_raid.h
index 56ab2256059..255189b7d9c 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.1 1998/11/13 04:20:32 oster Exp $ */
+/* $NetBSD: rf_raid.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
@@ -30,176 +30,17 @@
* rf_raid.h -- main header file for RAID driver
**********************************************/
-/*
- * :
- * Log: rf_raid.h,v
- * Revision 1.48 1996/08/20 22:33:54 jimz
- * make hist_diskreq a doubly-indexed array
- *
- * Revision 1.47 1996/07/15 05:40:41 jimz
- * some recon datastructure cleanup
- * better handling of multiple failures
- * added undocumented double-recon test
- *
- * Revision 1.46 1996/07/10 22:28:51 jimz
- * get rid of obsolete row statuses (dead,degraded2)
- *
- * Revision 1.45 1996/06/14 14:56:29 jimz
- * make engine threading stuff ifndef SIMULATE
- *
- * Revision 1.44 1996/06/14 14:16:54 jimz
- * move in engine node queue, atomicity control
- *
- * Revision 1.43 1996/06/12 04:41:26 jimz
- * tweaks to make genplot work with user-level driver
- * (mainly change stat collection)
- *
- * Revision 1.42 1996/06/11 10:57:17 jimz
- * add recon_done_procs, recon_done_proc_mutex
- *
- * Revision 1.41 1996/06/11 01:26:48 jimz
- * added mechanism for user-level to sync diskthread startup,
- * shutdown
- *
- * Revision 1.40 1996/06/10 14:18:58 jimz
- * move user, throughput stats into per-array structure
- *
- * Revision 1.39 1996/06/10 11:55:47 jimz
- * Straightened out some per-array/not-per-array distinctions, fixed
- * a couple bugs related to confusion. Added shutdown lists. Removed
- * layout shutdown function (now subsumed by shutdown lists).
- *
- * Revision 1.38 1996/06/07 21:33:04 jimz
- * begin using consistent types for sector numbers,
- * stripe numbers, row+col numbers, recon unit numbers
- *
- * Revision 1.37 1996/06/05 19:38:32 jimz
- * fixed up disk queueing types config
- * added sstf disk queueing
- * fixed exit bug on diskthreads (ref-ing bad mem)
- *
- * Revision 1.36 1996/06/05 18:06:02 jimz
- * Major code cleanup. The Great Renaming is now done.
- * Better modularity. Better typing. Fixed a bunch of
- * synchronization bugs. Made a lot of global stuff
- * per-desc or per-array. Removed dead code.
- *
- * Revision 1.35 1996/06/03 23:28:26 jimz
- * more bugfixes
- * check in tree to sync for IPDS runs with current bugfixes
- * there still may be a problem with threads in the script test
- * getting I/Os stuck- not trivially reproducible (runs ~50 times
- * in a row without getting stuck)
- *
- * Revision 1.34 1996/06/02 17:31:48 jimz
- * Moved a lot of global stuff into array structure, where it belongs.
- * Fixed up paritylogging, pss modules in this manner. Some general
- * code cleanup. Removed lots of dead code, some dead files.
- *
- * Revision 1.33 1996/05/30 23:22:16 jimz
- * bugfixes of serialization, timing problems
- * more cleanup
- *
- * Revision 1.32 1996/05/30 11:29:41 jimz
- * Numerous bug fixes. Stripe lock release code disagreed with the taking code
- * about when stripes should be locked (I made it consistent: no parity, no lock)
- * There was a lot of extra serialization of I/Os which I've removed- a lot of
- * it was to calculate values for the cache code, which is no longer with us.
- * More types, function, macro cleanup. Added code to properly quiesce the array
- * on shutdown. Made a lot of stuff array-specific which was (bogusly) general
- * before. Fixed memory allocation, freeing bugs.
- *
- * Revision 1.31 1996/05/27 18:56:37 jimz
- * more code cleanup
- * better typing
- * compiles in all 3 environments
- *
- * Revision 1.30 1996/05/24 22:17:04 jimz
- * continue code + namespace cleanup
- * typed a bunch of flags
- *
- * Revision 1.29 1996/05/23 21:46:35 jimz
- * checkpoint in code cleanup (release prep)
- * lots of types, function names have been fixed
- *
- * Revision 1.28 1996/05/23 00:33:23 jimz
- * code cleanup: move all debug decls to rf_options.c, all extern
- * debug decls to rf_options.h, all debug vars preceded by rf_
- *
- * Revision 1.27 1996/05/18 19:51:34 jimz
- * major code cleanup- fix syntax, make some types consistent,
- * add prototypes, clean out dead code, et cetera
- *
- * Revision 1.26 1996/05/08 21:01:24 jimz
- * fixed up enum type names that were conflicting with other
- * enums and function names (ie, "panic")
- * future naming trends will be towards RF_ and rf_ for
- * everything raidframe-related
- *
- * Revision 1.25 1996/05/02 14:57:55 jimz
- * add sectorMask
- *
- * Revision 1.24 1996/04/22 15:53:13 jimz
- * MAX_RAIDS -> NRAIDFRAME
- *
- * Revision 1.23 1995/12/14 18:39:46 jimz
- * convert to rf_types.h types
- *
- * Revision 1.22 1995/12/06 15:02:26 root
- * added copyright info
- *
- * Revision 1.21 1995/10/09 17:39:24 jimz
- * added info for tracking number of outstanding accesses
- * at user-level
- *
- * Revision 1.20 1995/09/30 20:37:46 jimz
- * added acc_totals to Raid for kernel
- *
- * Revision 1.19 1995/09/19 22:57:14 jimz
- * add cache of raidid for kernel
- *
- * Revision 1.18 1995/09/18 16:50:04 jimz
- * added RF_MAX_DISKS (for config ioctls)
- *
- * Revision 1.17 1995/09/07 19:02:31 jimz
- * mods to get raidframe to compile and link
- * in kernel environment
- *
- * Revision 1.16 1995/07/21 19:29:51 robby
- * added some info for the idler to the Raid
- *
- * Revision 1.15 1995/07/16 03:19:14 cfb
- * added cachePtr to *raidPtr
- *
- * Revision 1.14 1995/06/23 13:39:36 robby
- * updeated to prototypes in rf_layout.h
- *
- */
#ifndef _RF__RF_RAID_H_
#define _RF__RF_RAID_H_
-#ifdef _KERNEL
-#define KERNEL
-#endif
-
#include "rf_archs.h"
#include "rf_types.h"
#include "rf_threadstuff.h"
-#if defined(__NetBSD__) && defined(_KERNEL)
#include "rf_netbsd.h"
-#endif
-#ifdef KERNEL
-/* XXX Needs to be added. GO
-#include <raidframe.h>
-*/
#include <sys/disklabel.h>
-#else /* KERNEL */
-#include <stdio.h>
-#include <assert.h>
-#endif /* KERNEL */
#include <sys/types.h>
#include "rf_alloclist.h"
@@ -216,11 +57,7 @@
#endif /* RF_INCLUDE_PARITYLOGGING > 0 */
#define RF_MAX_DISKS 128 /* max disks per array */
-#ifdef __NetBSD__
#define RF_DEV2RAIDID(_dev) (DISKUNIT(_dev))
-#else
-#define RF_DEV2RAIDID(_dev) (minor(_dev)>>6) /* convert dev_t to raid id */
-#endif
/*
* Each row in the array is a distinct parity group, so
@@ -250,15 +87,6 @@ struct RF_ThroughputStats_s {
long num_out_ios; /* number of outstanding ios */
};
-#ifdef SIMULATE
-typedef struct RF_PendingRecon_s RF_PendingRecon_t;
-struct RF_PendingRecon_s {
- RF_RowCol_t row;
- RF_RowCol_t col;
- RF_PendingRecon_t *next;
-};
-#endif /* SIMULATE */
-
struct RF_Raid_s {
/* This portion never changes, and can be accessed without locking */
/* an exception is Disks[][].status, which requires locking when it is changed */
@@ -299,24 +127,10 @@ struct RF_Raid_s {
RF_HeadSepLimit_t headSepLimit;
int numFloatingReconBufs;
int reconInProgress;
-#ifdef SIMULATE
- RF_PendingRecon_t *pendingRecon;
-#endif /* SIMULATE */
RF_DECLARE_COND(waitForReconCond)
RF_RaidReconDesc_t *reconDesc; /* reconstruction descriptor */
RF_ReconCtrl_t **reconControl; /* reconstruction control structure pointers for each row in the array */
-#if !defined(KERNEL) && !defined(SIMULATE)
- /*
- * Disk thread stuff
- */
- int diskthreads_created;
- int diskthreads_running;
- int diskthreads_shutdown;
- RF_DECLARE_MUTEX(diskthread_count_mutex)
- RF_DECLARE_COND(diskthread_count_cond)
-#endif /* !KERNEL && !SIMULATE */
-
/*
* Array-quiescence stuff
*/
@@ -331,7 +145,7 @@ struct RF_Raid_s {
/*
* Statistics
*/
-#if !defined(KERNEL) && !defined(SIMULATE)
+#if !defined(_KERNEL) && !defined(SIMULATE)
RF_ThroughputStats_t throughputstats;
#endif /* !KERNEL && !SIMULATE */
RF_CumulativeStats_t userstats;
@@ -342,10 +156,8 @@ struct RF_Raid_s {
RF_DECLARE_MUTEX(node_queue_mutex)
RF_DECLARE_COND(node_queue_cond)
RF_DagNode_t *node_queue;
-#ifndef SIMULATE
RF_Thread_t engine_thread;
RF_ThreadGroup_t engine_tg;
-#endif /* !SIMULATE */
int shutdown_engine;
int dags_in_flight; /* debug */
@@ -365,10 +177,6 @@ struct RF_Raid_s {
RF_ReconDoneProc_t *recon_done_procs;
RF_DECLARE_MUTEX(recon_done_proc_mutex)
-#if !defined(KERNEL) && !defined(SIMULATE)
- RF_Thread_t **diskthreads, *sparediskthreads; /* thread descriptors for disk threads in user-level version */
-#endif /* !KERNEL && !SIMULATE */
-
/*
* nAccOutstanding, waitShutdown protected by desc freelist lock
* (This may seem strange, since that's a central serialization point
@@ -382,16 +190,12 @@ struct RF_Raid_s {
RF_DiskId_t **diskids;
RF_DiskId_t *sparediskids;
-#ifdef KERNEL
int raidid;
-#endif /* KERNEL */
RF_AccTotals_t acc_totals;
int keep_acc_totals;
-#ifdef _KERNEL
struct raidcinfo **raid_cinfo; /* array of component info */
struct proc *proc; /* XXX shouldn't be needed here.. :-p */
-#endif
int terminate_disk_queues;
@@ -422,9 +226,7 @@ struct RF_Raid_s {
RF_RegionBufferQueue_t regionBufferPool; /* buffers for holding region log */
RF_RegionBufferQueue_t parityBufferPool; /* buffers for holding parity */
caddr_t parityLogBufferHeap; /* pool of unused parity logs */
-#ifndef SIMULATE
RF_Thread_t pLogDiskThreadHandle;
-#endif /* !SIMULATE */
#endif /* RF_INCLUDE_PARITYLOGGING > 0 */
};