diff options
| author | oster <oster@NetBSD.org> | 1999-01-26 02:33:49 +0000 |
|---|---|---|
| committer | oster <oster@NetBSD.org> | 1999-01-26 02:33:49 +0000 |
| commit | 1eecf8e491f4ecb40edff2d8093fac193d203e73 (patch) | |
| tree | fc9f06792e783e03fe393007c4caf9d3c8da17f3 /sys | |
| parent | 7c2e6d4c420981d843ea6d87e2aa3ad916fac166 (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')
144 files changed, 202 insertions, 12719 deletions
diff --git a/sys/dev/raidframe/rf_acctrace.c b/sys/dev/raidframe/rf_acctrace.c index 013dc22a3f0..59d0a9560c3 100644 --- a/sys/dev/raidframe/rf_acctrace.c +++ b/sys/dev/raidframe/rf_acctrace.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_acctrace.c,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_acctrace.c,v 1.2 1999/01/26 02:33:49 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,95 +32,12 @@ * *****************************************************************************/ -/* : - * Log: rf_acctrace.c,v - * Revision 1.29 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.28 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.27 1996/06/14 14:35:24 jimz - * clean up dfstrace protection - * - * Revision 1.26 1996/06/13 19:09:04 jimz - * remove trace.dat file before beginning - * - * Revision 1.25 1996/06/12 04:41:26 jimz - * tweaks to make genplot work with user-level driver - * (mainly change stat collection) - * - * Revision 1.24 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.23 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.22 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.21 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.20 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.19 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.18 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.17 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.16 1996/05/20 16:15:49 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.15 1996/05/18 20:10:00 jimz - * bit of cleanup to compile cleanly in kernel, once again - * - * Revision 1.14 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.13 1995/11/30 16:26:43 wvcii - * added copyright info - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif -#include "rf_threadstuff.h" -#include "rf_types.h" #include <sys/stat.h> #include <sys/types.h> -#ifdef KERNEL -#ifndef __NetBSD__ -#include <dfstrace.h> -#endif /* !__NetBSD__ */ -#if DFSTRACE > 0 -#include <sys/dfs_log.h> -#include <sys/dfstracebuf.h> -#endif /* DFSTRACE > 0 */ -#endif /* KERNEL */ - +#include "rf_threadstuff.h" +#include "rf_types.h" #include "rf_debugMem.h" #include "rf_acctrace.h" #include "rf_general.h" @@ -146,15 +63,9 @@ static void rf_ShutdownAccessTrace(ignored) { if (rf_accessTraceBufSize) { if (accessTraceBufCount) rf_FlushAccessTraceBuf(); -#ifndef KERNEL - close(rf_trace_fd); -#endif /* !KERNEL */ RF_Free(access_tracebuf, rf_accessTraceBufSize * sizeof(RF_AccTraceEntry_t)); } rf_mutex_destroy(&rf_tracing_mutex); -#if defined(KERNEL) && DFSTRACE > 0 - printf("RAIDFRAME: %d trace entries were sent to dfstrace\n",traceCount); -#endif /* KERNEL && DFSTRACE > 0 */ } int rf_ConfigureAccessTrace(listp) @@ -166,18 +77,6 @@ int rf_ConfigureAccessTrace(listp) if (rf_accessTraceBufSize) { RF_Malloc(access_tracebuf, rf_accessTraceBufSize * sizeof(RF_AccTraceEntry_t), (RF_AccTraceEntry_t *)); accessTraceBufCount = 0; -#ifndef KERNEL - rc = unlink("trace.dat"); - if (rc && (errno != ENOENT)) { - perror("unlink"); - RF_ERRORMSG("Unable to remove existing trace.dat\n"); - return(errno); - } - if ((rf_trace_fd = open("trace.dat",O_WRONLY|O_CREAT|O_TRUNC, S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) < 0 ) { - perror("Unable to open trace.dat for output"); - return(errno); - } -#endif /* !KERNEL */ } traceCount = 0; numTracesSoFar = 0; @@ -192,9 +91,6 @@ int rf_ConfigureAccessTrace(listp) __LINE__, rc); if (rf_accessTraceBufSize) { RF_Free(access_tracebuf, rf_accessTraceBufSize * sizeof(RF_AccTraceEntry_t)); -#ifndef KERNEL - close(rf_trace_fd); -#endif /* !KERNEL */ rf_mutex_destroy(&rf_tracing_mutex); } } @@ -217,22 +113,6 @@ void rf_LogTraceRec(raid, rec) if (rf_stopCollectingTraces || ((rf_maxNumTraces >= 0) && (numTracesSoFar >= rf_maxNumTraces))) return; -#ifndef KERNEL - if (rf_accessTraceBufSize) { - RF_LOCK_MUTEX(rf_tracing_mutex); - numTracesSoFar++; - bcopy((char *)rec, (char *)&access_tracebuf[ accessTraceBufCount++ ], sizeof(RF_AccTraceEntry_t)); - if (accessTraceBufCount == rf_accessTraceBufSize) - rf_FlushAccessTraceBuf(); - RF_UNLOCK_MUTEX(rf_tracing_mutex); - } -#endif /* !KERNEL */ -#if defined(KERNEL) && DFSTRACE > 0 - rec->index = traceCount++; - if (traceon & DFS_TRACE_RAIDFRAME) { - dfs_log(DFS_NOTE, (char *) rec, (int) sizeof(*rec), 0); - } -#endif /* KERNEL && DFSTRACE > 0 */ /* update AccTotals for this device */ if (!raid->keep_acc_totals) return; @@ -280,15 +160,5 @@ void rf_LogTraceRec(raid, rec) */ void rf_FlushAccessTraceBuf() { -#ifndef KERNEL - int size = accessTraceBufCount * sizeof(RF_AccTraceEntry_t); - - if (write(rf_trace_fd, (char *) access_tracebuf, size) < size ) { - fprintf(stderr, "Unable to write traces to file. tracing disabled\n"); - RF_Free(access_tracebuf, rf_accessTraceBufSize * sizeof(RF_AccTraceEntry_t)); - rf_accessTraceBufSize = 0; - close(rf_trace_fd); - } -#endif /* !KERNEL */ accessTraceBufCount = 0; } diff --git a/sys/dev/raidframe/rf_acctrace.h b/sys/dev/raidframe/rf_acctrace.h index f23bce46f2d..f47236ab76c 100644 --- a/sys/dev/raidframe/rf_acctrace.h +++ b/sys/dev/raidframe/rf_acctrace.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_acctrace.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_acctrace.h,v 1.2 1999/01/26 02:33:49 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,76 +32,6 @@ * *****************************************************************************/ -/* : - * - * Log: rf_acctrace.h,v - * Revision 1.32 1996/08/02 15:12:38 jimz - * remove dead code - * - * Revision 1.31 1996/07/27 14:34:39 jimz - * remove bogus semicolon - * - * Revision 1.30 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.29 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.28 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.27 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * / - * - * Revision 1.26 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.25 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.24 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.23 1996/05/28 12:34:30 jimz - * nail down size of reconacc - * - * Revision 1.22 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.21 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.20 1996/05/02 14:57:24 jimz - * change to boolean_t - * - * Revision 1.19 1995/12/14 18:37:06 jimz - * convert to rf_types.h types - * - * Revision 1.18 1995/11/30 16:26:49 wvcii - * added copyright info - * - * Revision 1.17 1995/09/30 19:49:23 jimz - * add AccTotals structure, for capturing totals in kernel - * - * Revision 1.16 1995/09/12 00:20:55 wvcii - * added support for tracing disk queue time - * - * Revision 1.15 95/09/06 19:23:12 wvcii - * increased MAX_IOS_PER_TRACE_ENTRY from 1 to 4 - * - */ #ifndef _RF__RF_ACCTRACE_H_ #define _RF__RF_ACCTRACE_H_ diff --git a/sys/dev/raidframe/rf_alloclist.c b/sys/dev/raidframe/rf_alloclist.c index a09030703fa..03273df06f7 100644 --- a/sys/dev/raidframe/rf_alloclist.c +++ b/sys/dev/raidframe/rf_alloclist.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_alloclist.c,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_alloclist.c,v 1.2 1999/01/26 02:33:49 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,106 +26,6 @@ * rights to redistribute these changes. */ -/* - * Log: rf_alloclist.c,v - * Revision 1.28 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.27 1996/06/12 03:29:54 jimz - * don't barf just because we can't create an alloclist - * - * Revision 1.26 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.25 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.24 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.23 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.22 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.21 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.20 1996/05/20 16:15:59 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.19 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.18 1996/05/16 22:27:45 jimz - * get rid of surreal_MakeAllocList (what was that, anyway?) - * - * Revision 1.17 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.16 1995/11/30 16:27:07 wvcii - * added copyright info - * - * Revision 1.15 1995/10/05 20:37:56 jimz - * assert non-NULLness of pointer to FREE in FreeAllocList() - * - * Revision 1.14 1995/06/11 20:11:24 holland - * changed fl_hist,miss_count from long to int to get around weird kernel bug - * - * Revision 1.13 1995/05/01 13:28:00 holland - * parity range locks, locking disk requests, recon+parityscan in kernel, etc. - * - * Revision 1.12 1995/04/21 19:13:04 holland - * minor change to avoid a syntax error on DO_FREE - * - * Revision 1.11 1995/02/17 19:39:56 holland - * added size param to all calls to Free(). - * this is ignored at user level, but necessary in the kernel. - * - * Revision 1.10 1995/02/10 18:08:07 holland - * added DO_FREE macro to fix what I broke during kernelization - * - * Revision 1.9 1995/02/10 17:34:10 holland - * kernelization changes - * - * Revision 1.8 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.7 1995/02/01 15:13:05 holland - * moved #include of general.h out of raid.h and into each file - * - * Revision 1.6 1995/01/11 19:27:02 holland - * many changes related to performance tuning - * - * Revision 1.5 1994/11/29 20:53:10 danner - * Marks mods - * - * Revision 1.3 1994/11/19 21:01:07 danner - * First merge with mark - * - * Revision 1.1.1.1 1994/11/19 20:23:38 danner - * First PQ checkin - * - * Revision 1.2 1994/11/16 15:45:35 danner - * fixed free bug in FreeAllocList - * - * - */ - /**************************************************************************** * * Alloclist.c -- code to manipulate allocation lists @@ -153,11 +53,7 @@ static int al_free_list_count; #define RF_AL_FREELIST_MAX 256 -#ifndef KERNEL -#define DO_FREE(_p,_sz) free((_p)) -#else /* !KERNEL */ #define DO_FREE(_p,_sz) RF_Free((_p),(_sz)) -#endif /* !KERNEL */ static void rf_ShutdownAllocList(void *); @@ -251,18 +147,12 @@ void rf_FreeAllocList(l) RF_Free(p->pointers[i], p->sizes[i]); } } -#ifndef KERNEL - RF_LOCK_MUTEX(rf_debug_mem_mutex); -#endif /* !KERNEL */ while (l) { temp = l; l = l->next; if (al_free_list_count > RF_AL_FREELIST_MAX) {DO_FREE(temp, sizeof(*temp));} else {temp->next = al_free_list; al_free_list = temp; al_free_list_count++;} } -#ifndef KERNEL - RF_UNLOCK_MUTEX(rf_debug_mem_mutex); -#endif /* !KERNEL */ } RF_AllocListElem_t *rf_real_MakeAllocList(lockflag) @@ -270,21 +160,11 @@ RF_AllocListElem_t *rf_real_MakeAllocList(lockflag) { RF_AllocListElem_t *p; -#ifndef KERNEL - if (lockflag) { RF_LOCK_MUTEX(rf_debug_mem_mutex); } -#endif /* !KERNEL */ if (al_free_list) {fl_hit_count++; p = al_free_list; al_free_list = p->next; al_free_list_count--;} else { fl_miss_count++; -#ifndef KERNEL - p = (RF_AllocListElem_t *) malloc(sizeof(RF_AllocListElem_t)); /* can't use Malloc at user level b/c we already locked the mutex */ -#else /* !KERNEL */ RF_Malloc(p, sizeof(RF_AllocListElem_t), (RF_AllocListElem_t *)); /* no allocation locking in kernel, so this is fine */ -#endif /* !KERNEL */ } -#ifndef KERNEL - if (lockflag) { RF_UNLOCK_MUTEX(rf_debug_mem_mutex); } -#endif /* !KERNEL */ if (p == NULL) { return(NULL); } diff --git a/sys/dev/raidframe/rf_alloclist.h b/sys/dev/raidframe/rf_alloclist.h index 49642438a46..dddaf7d7c84 100644 --- a/sys/dev/raidframe/rf_alloclist.h +++ b/sys/dev/raidframe/rf_alloclist.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_alloclist.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_alloclist.h,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,29 +32,6 @@ * ***************************************************************************/ -/* : - * Log: rf_alloclist.h,v - * Revision 1.11 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.10 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.9 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.8 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.7 1995/11/30 16:27:13 wvcii - * added copyright info - * - */ - #ifndef _RF__RF_ALLOCLIST_H_ #define _RF__RF_ALLOCLIST_H_ diff --git a/sys/dev/raidframe/rf_archs.h b/sys/dev/raidframe/rf_archs.h index bdaf948914e..0d7d344e82e 100644 --- a/sys/dev/raidframe/rf_archs.h +++ b/sys/dev/raidframe/rf_archs.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_archs.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_archs.h,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -43,112 +43,6 @@ * the list below includes all the modules that can be compiled * out. * - * : - * Log: rf_archs.h,v - * Revision 1.32 1996/08/20 23:05:40 jimz - * define RF_KEEP_DISKSTATS to 1 - * - * Revision 1.31 1996/07/31 15:34:04 jimz - * include evenodd - * - * Revision 1.30 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.29 1996/07/26 20:11:46 jimz - * only define RF_DEMO for CMU_PDL - * - * Revision 1.28 1996/07/26 20:10:57 jimz - * define RF_CMU_PDL only if it isn't already defined - * - * Revision 1.27 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.26 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.25 1996/06/14 21:24:59 jimz - * turn on RF_CMU_PDL by default - * - * Revision 1.24 1996/06/13 20:41:57 jimz - * add RF_INCLUDE_QUEUE_RANDOM (0) - * - * Revision 1.23 1996/06/11 18:12:36 jimz - * get rid of JOIN operations - * use ThreadGroup stuff instead - * fix some allocation/deallocation and sync bugs - * - * Revision 1.22 1996/06/10 22:24:55 wvcii - * added symbols for enabling forward or backward error - * recovery experiments - * - * Revision 1.21 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.20 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.19 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.18 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.17 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.16 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.15 1996/05/15 22:32:59 jimz - * remove cache and vs stuff - * - * Revision 1.14 1995/11/30 16:27:34 wvcii - * added copyright info - * - * Revision 1.13 1995/11/28 21:23:44 amiri - * added the interleaved declustering architecture - * ('I'), with distributed sparing. - * - * Revision 1.12 1995/11/17 16:59:45 amiri - * don't INCLUDE_CHAINDECLUSTER in the kernel - * source. - * - * Revision 1.11 1995/11/16 16:15:21 amiri - * don't include RAID5 with rotated sparing (INCLUDE_RAID5_RS) in kernel - * - * Revision 1.10 1995/10/12 17:40:47 jimz - * define INCLUDE_LS - * - * Revision 1.9 1995/10/11 06:56:47 jimz - * define INCLUDE_VS (sanity check for compilation) - * - * Revision 1.8 1995/10/05 18:56:24 jimz - * don't INCLUDE_VS - * - * Revision 1.7 1995/10/04 03:51:20 wvcii - * added raid 1 - * - * Revision 1.6 1995/09/07 09:59:29 wvcii - * unstable archs conditionally defined for !KERNEL makes - * - * */ #ifndef _RF__RF_ARCHS_H_ diff --git a/sys/dev/raidframe/rf_aselect.c b/sys/dev/raidframe/rf_aselect.c index 07257ab0aaf..2bf9fe9db9d 100644 --- a/sys/dev/raidframe/rf_aselect.c +++ b/sys/dev/raidframe/rf_aselect.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_aselect.c,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_aselect.c,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,108 +31,7 @@ * aselect.c -- algorithm selection code * *****************************************************************************/ -/* - * : - * Log: rf_aselect.c,v - * Revision 1.35 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.34 1996/07/27 18:39:39 jimz - * cleanup sweep - * - * Revision 1.33 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.32 1996/06/12 03:29:40 jimz - * Note: things that call InitHdrNode should check - * for successful return. - * - * Revision 1.31 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.30 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.29 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.28 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.27 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.26 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.25 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.24 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.23 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.22 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.21 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.20 1996/05/03 19:45:35 wvcii - * removed includes of old deg creation files - * updated SelectAlgorithm comments - * - * Revision 1.19 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.18 1995/11/30 16:27:48 wvcii - * added copyright info - * - * Revision 1.17 1995/11/19 16:25:55 wvcii - * SelectAlgorithm now creates an array, returned in desc->dagArray - * return value is now int (1 = FAIL) - * - * Revision 1.16 1995/11/17 15:09:58 wvcii - * fixed bug in SelectAlgorithm in which multiple graphs per stripe are required - * - * Revision 1.15 1995/11/07 17:12:42 wvcii - * changed SelectAlgorithm as follows: - * - * dag creation funcs now create term nodes - * dag selection funcs no longer return numHdrSucc, numTermAnt - * there is now one dag hdr for each dag in a request, implying - * that SelectAlgorithm now returns a linked list of dag hdrs - * - */ + #include "rf_archs.h" #include "rf_types.h" diff --git a/sys/dev/raidframe/rf_aselect.h b/sys/dev/raidframe/rf_aselect.h index cc98a2b484e..6186a06e72e 100644 --- a/sys/dev/raidframe/rf_aselect.h +++ b/sys/dev/raidframe/rf_aselect.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_aselect.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_aselect.h,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,23 +31,6 @@ * aselect.h -- header file for algorithm selection code * *****************************************************************************/ -/* : - * Log: rf_aselect.h,v - * Revision 1.5 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 1995/11/30 16:28:00 wvcii - * added copyright info - * - * Revision 1.2 1995/11/19 16:20:46 wvcii - * changed SelectAlgorithm prototype - * - */ #ifndef _RF__RF_ASELECT_H_ #define _RF__RF_ASELECT_H_ diff --git a/sys/dev/raidframe/rf_callback.c b/sys/dev/raidframe/rf_callback.c index bfca35909f5..6d74a3a000a 100644 --- a/sys/dev/raidframe/rf_callback.c +++ b/sys/dev/raidframe/rf_callback.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_callback.c,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_callback.c,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,37 +32,6 @@ * ****************************************************************************************/ -/* : - * Log: rf_callback.c,v - * Revision 1.11 1996/06/17 03:18:04 jimz - * include shutdown.h for macroized ShutdownCreate - * - * Revision 1.10 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.9 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.8 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.7 1996/05/17 16:30:41 jimz - * convert to RF_FREELIST stuff - * - * Revision 1.6 1995/12/01 15:16:04 root - * added copyright info - * - */ - -#ifndef _KERNEL -#ifdef __NetBSD__ -#include <unistd.h> -#endif /* __NetBSD__ */ -#endif #include "rf_types.h" #include "rf_threadstuff.h" diff --git a/sys/dev/raidframe/rf_callback.h b/sys/dev/raidframe/rf_callback.h index 6ca4554ac2f..a4f5689ec2b 100644 --- a/sys/dev/raidframe/rf_callback.h +++ b/sys/dev/raidframe/rf_callback.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_callback.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_callback.h,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -41,35 +41,6 @@ * ****************************************************************************************/ -/* : - * Log: rf_callback.h,v - * Revision 1.8 1996/08/01 15:57:28 jimz - * minor cleanup - * - * Revision 1.7 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.6 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.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 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.3 1996/05/17 16:30:46 jimz - * add prototypes - * - * Revision 1.2 1995/12/01 15:15:55 root - * added copyright info - * - */ - #ifndef _RF__RF_CALLBACK_H_ #define _RF__RF_CALLBACK_H_ diff --git a/sys/dev/raidframe/rf_ccmn.h b/sys/dev/raidframe/rf_ccmn.h index c2952ca6e10..fb966654b6d 100644 --- a/sys/dev/raidframe/rf_ccmn.h +++ b/sys/dev/raidframe/rf_ccmn.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_ccmn.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_ccmn.h,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,19 +31,6 @@ * the files needed to use them. */ -/* : - * Log: rf_ccmn.h,v - * Revision 1.4 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.3 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.2 1995/12/01 15:16:45 root - * added copyright info - * - */ #ifndef _RF__RF_CCMN_H_ #define _RF__RF_CCMN_H_ diff --git a/sys/dev/raidframe/rf_chaindecluster.c b/sys/dev/raidframe/rf_chaindecluster.c index ce54bd4f794..bf8674bbc8c 100644 --- a/sys/dev/raidframe/rf_chaindecluster.c +++ b/sys/dev/raidframe/rf_chaindecluster.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_chaindecluster.c,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_chaindecluster.c,v 1.2 1999/01/26 02:33:50 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,107 +32,6 @@ * *****************************************************************************/ -/* : - * Log: rf_chaindecluster.c,v - * Revision 1.33 1996/08/02 13:20:34 jimz - * get rid of bogus (long) casts - * - * Revision 1.32 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.31 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.30 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.29 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.28 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.27 1996/06/11 15:19:57 wvcii - * added include of rf_chaindecluster.h - * fixed parameter list of rf_ConfigureChainDecluster - * - * Revision 1.26 1996/06/11 08:55:15 jimz - * improved error-checking at configuration time - * - * Revision 1.25 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.24 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.23 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.22 1996/06/06 17:31:30 jimz - * use CreateMirrorPartitionReadDAG for mirrored reads - * - * Revision 1.21 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.20 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.19 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.18 1996/05/31 16:13:28 amiri - * removed/added some commnets. - * - * Revision 1.17 1996/05/31 05:01:52 amiri - * fixed a bug related to sparing layout. - * - * Revision 1.16 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.15 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.14 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.13 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.12 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.11 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.10 1996/05/03 19:53:56 wvcii - * removed include of rf_redstripe.h - * moved dag creation routines to new dag library - * - */ - #include "rf_archs.h" #include "rf_types.h" #include "rf_raid.h" diff --git a/sys/dev/raidframe/rf_chaindecluster.h b/sys/dev/raidframe/rf_chaindecluster.h index 4d38e5b888e..aaa1f9404b4 100644 --- a/sys/dev/raidframe/rf_chaindecluster.h +++ b/sys/dev/raidframe/rf_chaindecluster.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_chaindecluster.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_chaindecluster.h,v 1.2 1999/01/26 02:33:51 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,66 +30,6 @@ * header file for Chained Declustering */ -/* - * : - * Log: rf_chaindecluster.h,v - * Revision 1.14 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.13 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.12 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.11 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.10 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.9 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.8 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.7 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.6 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.5 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.4 1996/02/22 16:45:59 amiri - * added declaration of dag selection function - * - * Revision 1.3 1995/12/01 15:16:56 root - * added copyright info - * - * Revision 1.2 1995/11/17 19:55:21 amiri - * prototyped MapParityChainDecluster - */ #ifndef _RF__RF_CHAINDECLUSTER_H_ #define _RF__RF_CHAINDECLUSTER_H_ diff --git a/sys/dev/raidframe/rf_configure.h b/sys/dev/raidframe/rf_configure.h index e7d6c45d294..840f3b518e7 100644 --- a/sys/dev/raidframe/rf_configure.h +++ b/sys/dev/raidframe/rf_configure.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_configure.h,v 1.1 1998/11/13 04:20:26 oster Exp $ */ +/* $NetBSD: rf_configure.h,v 1.2 1999/01/26 02:33:51 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -35,54 +35,6 @@ * *******************************/ -/* : - * Log: rf_configure.h,v - * Revision 1.16 1996/06/19 14:57:53 jimz - * move layout-specific config parsing hooks into RF_LayoutSW_t - * table in rf_layout.c - * - * Revision 1.15 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.14 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.13 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.12 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.11 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.10 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.9 1996/05/18 20:09:51 jimz - * bit of cleanup to compile cleanly in kernel, once again - * - * Revision 1.8 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.7 1995/12/01 15:16:26 root - * added copyright info - * - */ #ifndef _RF__RF_CONFIGURE_H_ #define _RF__RF_CONFIGURE_H_ @@ -116,11 +68,11 @@ struct RF_Config_s { void *layoutSpecific; /* a pointer to a layout-specific structure to be copied in */ }; -#ifndef KERNEL +#ifndef _KERNEL int rf_MakeConfig(char *configname, RF_Config_t *cfgPtr); int rf_MakeLayoutSpecificNULL(FILE *fp, RF_Config_t *cfgPtr, void *arg); int rf_MakeLayoutSpecificDeclustered(FILE *configfp, RF_Config_t *cfgPtr, void *arg); void *rf_ReadSpareTable(RF_SparetWait_t *req, char *fname); -#endif /* !KERNEL */ +#endif /* !_KERNEL */ #endif /* !_RF__RF_CONFIGURE_H_ */ diff --git a/sys/dev/raidframe/rf_copyback.c b/sys/dev/raidframe/rf_copyback.c index eb8337c8f90..6a56f798d19 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.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_copyback.c,v 1.2 1999/01/26 02:33:51 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,117 +37,10 @@ * ****************************************************************************************/ -/* - * : - * Log: rf_copyback.c,v - * Revision 1.26 1996/08/06 22:26:00 jimz - * don't include sys/buf.h on linux - * - * Revision 1.25 1996/07/30 03:30:40 jimz - * include rf_types.h first - * - * Revision 1.24 1996/07/27 18:39:52 jimz - * cleanup sweep - * - * Revision 1.23 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.22 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.21 1996/07/11 16:03:47 jimz - * fixed hanging bug in rf_CopybackWriteDoneProc() - * - * Revision 1.20 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.19 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 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.15 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.14 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.13 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.12 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.11 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.10 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.9 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.8 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.7 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.6 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.5 1995/12/01 15:15:31 root - * added copyright info - * - * Revision 1.4 1995/06/23 13:41:36 robby - * updeated to prototypes in rf_layout.h - * - */ - #include "rf_types.h" + #include <sys/time.h> -#ifndef LINUX #include <sys/buf.h> -#endif /* !LINUX */ #include "rf_raid.h" #include "rf_threadid.h" #include "rf_mcpair.h" @@ -156,9 +49,6 @@ #include "rf_general.h" #include "rf_utils.h" #include "rf_copyback.h" -#if !defined(__NetBSD__) -#include "rf_camlayer.h" -#endif #include "rf_decluster.h" #include "rf_driver.h" #include "rf_shutdown.h" @@ -183,7 +73,6 @@ int rf_ConfigureCopyback(listp) return(0); } -#if defined(__NetBSD__) && defined(_KERNEL) #include <sys/types.h> #include <sys/param.h> #include <sys/systm.h> @@ -193,13 +82,11 @@ int rf_ConfigureCopyback(listp) #include <sys/vnode.h> int raidlookup __P((char *, struct proc *, struct vnode **)); -#endif /* do a complete copyback */ void rf_CopybackReconstructedData(raidPtr) RF_Raid_t *raidPtr; { -#if defined(__NetBSD__) && defined(_KERNEL) int done,retcode; RF_CopybackDesc_t *desc; RF_RowCol_t frow, fcol; @@ -211,15 +98,6 @@ void rf_CopybackReconstructedData(raidPtr) struct vattr va; struct proc *proc; -#else - int bus, targ, lun, done, retcode; - RF_CopybackDesc_t *desc; - RF_RowCol_t frow, fcol; - RF_RaidDisk_t *badDisk; - RF_DiskOp_t *tur_op; - char *databuf; -#endif - done = 0; fcol = 0; for (frow=0; frow<raidPtr->numRow; frow++) { @@ -241,16 +119,9 @@ void rf_CopybackReconstructedData(raidPtr) } badDisk = &raidPtr->Disks[frow][fcol]; -#ifndef SIMULATE -#if defined(__NetBSD__) && defined(_KERNEL) proc = raidPtr->proc; /* XXX Yes, this is not nice.. */ -#if 0 - printf("Pretending the disk is happy...\n"); - retcode = 0; /* XXX this should be set to something more realistic. */ -#endif - /* This device may have been opened successfully the first time. Close it before trying to open it again.. */ @@ -306,7 +177,9 @@ void rf_CopybackReconstructedData(raidPtr) raidPtr->Disks[frow][fcol].numBlocks * rf_sizePercentage / 100; } -#else +#if 0 + /* This is the way it was done before the CAM stuff was removed */ + if (rf_extract_ids(badDisk->devname, &bus, &targ, &lun)) { printf("COPYBACK: unable to extract bus, target, lun from devname %s\n", badDisk->devname); @@ -323,7 +196,6 @@ void rf_CopybackReconstructedData(raidPtr) printf("COPYBACK: target disk failed TUR\n"); return; } -#endif /* !SIMULATE */ /* get a buffer to hold one SU */ RF_Malloc(databuf, rf_RaidAddressToByte(raidPtr, raidPtr->Layout.sectorsPerStripeUnit), (char *)); @@ -340,9 +212,7 @@ void rf_CopybackReconstructedData(raidPtr) desc->sectPerSU = raidPtr->Layout.sectorsPerStripeUnit; desc->sectPerStripe = raidPtr->Layout.sectorsPerStripeUnit * raidPtr->Layout.numDataCol; desc->databuf = databuf; -#ifndef SIMULATE desc->mcpair = rf_AllocMCPair(); -#endif /* !SIMULATE */ printf("COPYBACK: Quiescing the array\n"); /* quiesce the array, since we don't want to code support for user accs here */ @@ -404,12 +274,8 @@ void rf_ContinueCopyback(desc) if (testRow == desc->frow && testCol == desc->fcol) { rf_CopybackOne(desc, RF_COPYBACK_DATA, addr, testRow, testCol, testOffs); -#ifdef SIMULATE - return; -#else /* SIMULATE */ done = 1; break; -#endif /* SIMULATE */ } } @@ -421,9 +287,6 @@ void rf_ContinueCopyback(desc) if (testRow == desc->frow && testCol == desc->fcol) { rf_CopybackOne(desc, RF_COPYBACK_PARITY, stripeAddr, testRow, testCol, testOffs); -#ifdef SIMULATE - return; -#endif /* SIMULATE */ } } @@ -479,21 +342,19 @@ static void rf_CopybackOne(desc, typ, addr, testRow, testCol, testOffs) * at user-level & in the kernel, wait for the read-write pair to complete. * in the simulator, just return, since everything will happen as callbacks */ -#ifndef SIMULATE + RF_LOCK_MUTEX(desc->mcpair->mutex); desc->mcpair->flag = 0; -#endif /* !SIMULATE */ rf_DiskIOEnqueue(&raidPtr->Queues[spRow][spCol], desc->readreq, RF_IO_NORMAL_PRIORITY); -#ifndef SIMULATE while (!desc->mcpair->flag) { RF_WAIT_MCPAIR(desc->mcpair); } RF_UNLOCK_MUTEX(desc->mcpair->mutex); rf_FreeDiskQueueData(desc->readreq); rf_FreeDiskQueueData(desc->writereq); -#endif /* !SIMULATE */ + } @@ -525,17 +386,8 @@ static int rf_CopybackWriteDoneProc(desc, status) printf("COPYBACK: copyback write failed. Aborting.\n"); } -#ifdef SIMULATE - rf_FreeDiskQueueData(desc->readreq); - rf_FreeDiskQueueData(desc->writereq); - if (!status) - rf_ContinueCopyback(desc); - else - rf_CopybackComplete(desc, 1); -#else /* SIMULATE */ desc->status = status; rf_MCPairWakeupFunc(desc->mcpair); -#endif /* SIMULATE */ return(0); } @@ -564,9 +416,7 @@ static void rf_CopybackComplete(desc, status) } else printf("COPYBACK: Failure.\n"); RF_Free(desc->databuf, rf_RaidAddressToByte(raidPtr, desc->sectPerSU)); -#ifndef SIMULATE rf_FreeMCPair(desc->mcpair); -#endif /* !SIMULATE */ RF_Free(desc, sizeof(*desc)); rf_copyback_in_progress = 0; diff --git a/sys/dev/raidframe/rf_copyback.h b/sys/dev/raidframe/rf_copyback.h index 277408757e2..b6a5e52bd9e 100644 --- a/sys/dev/raidframe/rf_copyback.h +++ b/sys/dev/raidframe/rf_copyback.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_copyback.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_copyback.h,v 1.2 1999/01/26 02:33:51 oster Exp $ */ /* * rf_copyback.h */ @@ -28,31 +28,6 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_copyback.h,v - * Revision 1.5 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.4 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.3 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:55:02 jimz - * Initial revision - * - */ #ifndef _RF__RF_COPYBACK_H_ #define _RF__RF_COPYBACK_H_ @@ -73,9 +48,7 @@ typedef struct RF_CopybackDesc_s { RF_DiskQueueData_t *readreq; RF_DiskQueueData_t *writereq; struct timeval starttime; -#ifndef SIMULATE RF_MCPair_t *mcpair; -#endif /* !SIMULATE */ } RF_CopybackDesc_t; extern int rf_copyback_in_progress; diff --git a/sys/dev/raidframe/rf_cpuutil.c b/sys/dev/raidframe/rf_cpuutil.c index 945da8d8143..4b368f701f2 100644 --- a/sys/dev/raidframe/rf_cpuutil.c +++ b/sys/dev/raidframe/rf_cpuutil.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_cpuutil.c,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_cpuutil.c,v 1.2 1999/01/26 02:33:51 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,55 +31,13 @@ * track cpu utilization */ -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_cpuutil.h" -#ifndef KERNEL -#include <errno.h> -#endif /* !KERNEL */ #include "rf_types.h" #include "rf_general.h" #include "rf_shutdown.h" #include "rf_sys.h" -#ifdef __osf__ -#include <sys/table.h> -#endif /* __osf__ */ -#ifdef AIX -#include <nlist.h> -#include <sys/sysinfo.h> -#endif /* AIX */ -#ifdef KERNEL -#ifndef __NetBSD__ -#include <sys/dk.h> -#endif /* __NetBSD__ */ -#else /* KERNEL */ -extern int table(int id, int index, void *addr, int nel, u_int lel); -#endif /* KERNEL */ - -#ifdef __osf__ -static struct tbl_sysinfo start, stop; -#endif /* __osf__ */ - -#ifdef AIX -static int kmem_fd; -static off_t sysinfo_offset; -static struct sysinfo sysinfo_start, sysinfo_stop; -static struct nlist namelist[] = { - {{"sysinfo"}}, - {{""}}, -}; -#endif /* AIX */ -#ifdef AIX -static void rf_ShutdownCpuMonitor(ignored) - void *ignored; -{ - close(kmem_fd); -} -#endif /* AIX */ int rf_ConfigureCpuMonitor(listp) RF_ShutdownList_t **listp; @@ -115,20 +73,6 @@ int rf_ConfigureCpuMonitor(listp) void rf_start_cpu_monitor() { -#ifdef __osf__ -#ifndef KERNEL - if (table(TBL_SYSINFO, 0, &start, 1, sizeof(start)) != 1) { - printf("Unable to get sysinfo for cpu utilization monitor\n"); - perror("start_cpu_monitor"); - } -#else /* !KERNEL */ - /* start.si_user = cp_time[CP_USER]; - start.si_nice = cp_time[CP_NICE]; - start.si_sys = cp_time[CP_SYS]; - start.si_idle = cp_time[CP_IDLE]; - start.wait = cp_time[CP_WAIT]; */ -#endif /* !KERNEL */ -#endif /* __osf__ */ #ifdef AIX off_t off; int rc; @@ -145,20 +89,6 @@ void rf_start_cpu_monitor() void rf_stop_cpu_monitor() { -#ifdef __osf__ -#ifndef KERNEL - if (table(TBL_SYSINFO, 0, &stop, 1, sizeof(stop)) != 1) { - printf("Unable to get sysinfo for cpu utilization monitor\n"); - perror("stop_cpu_monitor"); - } -#else /* !KERNEL */ - /* stop.si_user = cp_time[CP_USER]; - stop.si_nice = cp_time[CP_NICE]; - stop.si_sys = cp_time[CP_SYS]; - stop.si_idle = cp_time[CP_IDLE]; - stop.wait = cp_time[CP_WAIT]; */ -#endif /* !KERNEL */ -#endif /* __osf__ */ #ifdef AIX off_t off; int rc; @@ -176,14 +106,6 @@ void rf_stop_cpu_monitor() void rf_print_cpu_util(s) char *s; { -#ifdef __osf__ - long totalticks, idleticks; - - idleticks = stop.si_idle - start.si_idle + stop.wait - start.wait; - totalticks = stop.si_user - start.si_user + stop.si_nice - start.si_nice + - stop.si_sys - start.si_sys + idleticks; - printf("CPU utilization during %s was %d %%\n", s, 100 - 100*idleticks/totalticks); -#endif /* __osf__ */ #ifdef AIX long idle; diff --git a/sys/dev/raidframe/rf_cvscan.c b/sys/dev/raidframe/rf_cvscan.c index efe30f0b4b1..cdc2f16b08e 100644 --- a/sys/dev/raidframe/rf_cvscan.c +++ b/sys/dev/raidframe/rf_cvscan.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_cvscan.c,v 1.2 1998/11/18 15:13:51 oster Exp $ */ +/* $NetBSD: rf_cvscan.c,v 1.3 1999/01/26 02:33:51 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,33 +34,6 @@ * ******************************************************************************/ -/* - * : - * Log: rf_cvscan.c,v - * Revision 1.6 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.5 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.4 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.3 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.2 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.1 1996/06/05 19:17:40 jimz - * Initial revision - * - */ - #include "rf_types.h" #include "rf_alloclist.h" #include "rf_stripelocks.h" diff --git a/sys/dev/raidframe/rf_cvscan.h b/sys/dev/raidframe/rf_cvscan.h index 30cd5ce80f6..53ff61505db 100644 --- a/sys/dev/raidframe/rf_cvscan.h +++ b/sys/dev/raidframe/rf_cvscan.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_cvscan.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_cvscan.h,v 1.2 1999/01/26 02:33:51 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -47,20 +47,6 @@ ** share the same, highest priority level. */ -/* : - * Log: rf_cvscan.h,v - * Revision 1.3 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.2 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.1 1996/06/05 19:17:40 jimz - * Initial revision - * - */ - #ifndef _RF__RF_CVSCAN_H_ #define _RF__RF_CVSCAN_H_ diff --git a/sys/dev/raidframe/rf_dag.h b/sys/dev/raidframe/rf_dag.h index 88aeae52ec7..f31c1d6b626 100644 --- a/sys/dev/raidframe/rf_dag.h +++ b/sys/dev/raidframe/rf_dag.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dag.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dag.h,v 1.2 1999/01/26 02:33:52 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,106 +31,6 @@ * dag.h -- header file for DAG-related data structures * * * ****************************************************************************/ -/* - * - * : - * Log: rf_dag.h,v - * Revision 1.35 1996/11/05 18:38:37 jimz - * add patch from galvarez@cs.ucsd.edu (Guillermo Alvarez) - * to fix dag_params memory-sizing problem (should be an array - * of the type, not an array of pointers to the type) - * - * Revision 1.34 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.33 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.32 1996/06/10 22:22:13 wvcii - * added two node status types for use in backward error - * recovery experiments. - * - * Revision 1.31 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.30 1996/06/07 22:49:18 jimz - * fix up raidPtr typing - * - * Revision 1.29 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.28 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.27 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.26 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.25 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.24 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.23 1996/05/16 23:05:20 jimz - * Added dag_ptrs field, RF_DAG_PTRCACHESIZE - * - * The dag_ptrs field of the node is basically some scribble - * space to be used here. We could get rid of it, and always - * allocate the range of pointers, but that's expensive. So, - * we pick a "common case" size for the pointer cache. Hopefully, - * we'll find that: - * (1) Generally, nptrs doesn't exceed RF_DAG_PTRCACHESIZE by - * only a little bit (least efficient case) - * (2) Generally, ntprs isn't a lot less than RF_DAG_PTRCACHESIZE - * (wasted memory) - * - * Revision 1.22 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.21 1996/05/08 15:23:47 wvcii - * added new node states: undone, recover, panic - * - * Revision 1.20 1995/12/01 14:59:19 root - * increased MAX_ANTECEDENTS from 10 to 20 - * should consider getting rid of this (eliminate static array) - * - * Revision 1.19 1995/11/30 15:58:59 wvcii - * added copyright info - * - * Revision 1.18 1995/11/19 16:27:03 wvcii - * created struct dagList - * - * Revision 1.17 1995/11/07 15:43:01 wvcii - * added static array to DAGnode: antType - * added commitNode type - * added commit node counts to dag header - * added ptr (firstDag) to support multi-dag requests - * added succedent done/fired counts to nodes to support rollback - * added node status type "skipped" - * added hdr status types "rollForward, rollBackward" - * deleted hdr status type "disable" - * updated ResetNode & ResetDAGHeader to zero new fields - * - */ #ifndef _RF__RF_DAG_H_ #define _RF__RF_DAG_H_ @@ -148,9 +48,7 @@ #define RF_INTR_CONTEXT 1 /* we were invoked from interrupt context */ #define RF_MAX_ANTECEDENTS 20 /* max num of antecedents a node may posses */ -#ifdef KERNEL #include <sys/buf.h> -#endif /* KERNEL */ struct RF_PropHeader_s { /* structure for propagation of results */ int resultNum; /* bind result # resultNum */ @@ -266,9 +164,6 @@ struct RF_DagHeader_s { int xtraChunkIndex; /* number of ptrs to valid chunks */ int xtraChunkCnt; /* number of ptrs to chunks allocated */ -#ifdef SIMULATE - int done; /* Tag to tell if termination node has been fired */ -#endif /* SIMULATE */ }; struct RF_DagList_s { @@ -290,20 +185,11 @@ struct RF_DagList_s { (_n_)->next = NULL; \ } -#ifdef SIMULATE -#define RF_ResetDagHeader(_h_) { \ - (_h_)->done = RF_FALSE; \ - (_h_)->numNodesCompleted = 0; \ - (_h_)->numCommits = 0; \ - (_h_)->status = rf_enable; \ -} -#else /* SIMULATE */ #define RF_ResetDagHeader(_h_) { \ (_h_)->numNodesCompleted = 0; \ (_h_)->numCommits = 0; \ (_h_)->status = rf_enable; \ } -#endif /* SIMULATE */ /* convience macro for declaring a create dag function */ diff --git a/sys/dev/raidframe/rf_dagdegrd.c b/sys/dev/raidframe/rf_dagdegrd.c index 477fd146ddc..5de55ede6e3 100644 --- a/sys/dev/raidframe/rf_dagdegrd.c +++ b/sys/dev/raidframe/rf_dagdegrd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagdegrd.c,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagdegrd.c,v 1.2 1999/01/26 02:33:52 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,96 +30,6 @@ * rf_dagdegrd.c * * code for creating degraded read DAGs - * - * : - * Log: rf_dagdegrd.c,v - * Revision 1.20 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.19 1996/08/19 23:30:36 jimz - * fix chained declustered accesses in degraded mode when mirror copy is failed - * (workload shifting not allowed when there are no duplicate copies extant) - * - * Revision 1.18 1996/07/31 16:29:01 jimz - * asm/asmap re-fix (EO merge) - * - * Revision 1.17 1996/07/31 15:34:34 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.16 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.15 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.14 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.13 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.12 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.9 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.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.6 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 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.3 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.2 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.1 1996/05/03 19:22:23 wvcii - * Initial revision - * */ #include "rf_types.h" diff --git a/sys/dev/raidframe/rf_dagdegrd.h b/sys/dev/raidframe/rf_dagdegrd.h index 19879b303e2..510c4368d1e 100644 --- a/sys/dev/raidframe/rf_dagdegrd.h +++ b/sys/dev/raidframe/rf_dagdegrd.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagdegrd.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagdegrd.h,v 1.2 1999/01/26 02:33:52 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,36 +26,6 @@ * rights to redistribute these changes. */ -/* - * : - * Log: rf_dagdegrd.h,v - * Revision 1.6 1996/07/31 16:29:06 jimz - * asm/asmap re-fix (EO merge) - * - * Revision 1.5 1996/07/31 15:34:40 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.4 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.3 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/03 19:22:06 wvcii - * Initial revision - * - */ - #ifndef _RF__RF_DAGDEGRD_H_ #define _RF__RF_DAGDEGRD_H_ diff --git a/sys/dev/raidframe/rf_dagdegwr.c b/sys/dev/raidframe/rf_dagdegwr.c index 8805ce4d8b9..ecd84d5da8a 100644 --- a/sys/dev/raidframe/rf_dagdegwr.c +++ b/sys/dev/raidframe/rf_dagdegwr.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagdegwr.c,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagdegwr.c,v 1.2 1999/01/26 02:33:52 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,108 +31,6 @@ * * code for creating degraded write DAGs * - * : - * Log: rf_dagdegwr.c,v - * Revision 1.23 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.22 1996/08/23 14:49:48 jimz - * remove bogus assert from small write double deg DAG generator - * - * Revision 1.21 1996/08/21 05:09:44 jimz - * get rid of bogus fakery in DoubleDegSmallWrite - * - * Revision 1.20 1996/08/21 04:14:35 jimz - * cleanup doubledegsmallwrite - * NOTE: we need doubledeglargewrite - * - * Revision 1.19 1996/08/19 21:39:38 jimz - * CommonCreateSimpleDegradedWriteDAG() was unable to correctly create DAGs for - * complete stripe overwrite accesses- it assumed the necessity to read old - * data. Rather than do the "right" thing, and risk breaking a critical DAG so - * close to release, I made a no-op read node to stick in and link up in this - * case. Seems to work. - * - * Revision 1.18 1996/07/31 15:35:34 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.17 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.16 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.15 1996/07/27 16:30:19 jimz - * cleanup sweep - * - * Revision 1.14 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.13 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.12 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.9 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.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.6 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 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.3 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.2 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.1 1996/05/03 19:21:50 wvcii - * Initial revision - * */ #include "rf_types.h" diff --git a/sys/dev/raidframe/rf_dagdegwr.h b/sys/dev/raidframe/rf_dagdegwr.h index c79ec9ea350..c0932ec01fd 100644 --- a/sys/dev/raidframe/rf_dagdegwr.h +++ b/sys/dev/raidframe/rf_dagdegwr.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagdegwr.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagdegwr.h,v 1.2 1999/01/26 02:33:52 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,35 +26,6 @@ * rights to redistribute these changes. */ -/* - * : - * Log: rf_dagdegwr.h,v - * Revision 1.6 1996/07/31 16:30:28 jimz - * asm/asmap fix (EO merge) - * - * Revision 1.5 1996/07/31 15:35:38 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.4 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.3 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/03 19:21:28 wvcii - * Initial revision - * - */ #ifndef _RF__RF_DAGDEGWR_H_ #define _RF__RF_DAGDEGWR_H_ diff --git a/sys/dev/raidframe/rf_dagffrd.c b/sys/dev/raidframe/rf_dagffrd.c index 02992060df3..a00bb534819 100644 --- a/sys/dev/raidframe/rf_dagffrd.c +++ b/sys/dev/raidframe/rf_dagffrd.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagffrd.c,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagffrd.c,v 1.2 1999/01/26 02:33:52 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,78 +31,6 @@ * * code for creating fault-free read DAGs * - * : - * Log: rf_dagffrd.c,v - * Revision 1.14 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.13 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.12 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.11 1996/06/06 17:30:44 jimz - * turn old Raid1 mirror read creation into a more generic function - * parameterized by an addtional parameter: type of mirrored read - * this is now used by other dag creation routines so chained declustering - * and raid1 can share dag creation code, but have different mirroring - * policies - * - * Revision 1.10 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.9 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.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.6 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 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.3 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.2 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.1 1996/05/03 19:19:20 wvcii - * Initial revision - * */ #include "rf_types.h" diff --git a/sys/dev/raidframe/rf_dagffrd.h b/sys/dev/raidframe/rf_dagffrd.h index e280a7f7799..880ea04fb5a 100644 --- a/sys/dev/raidframe/rf_dagffrd.h +++ b/sys/dev/raidframe/rf_dagffrd.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagffrd.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagffrd.h,v 1.2 1999/01/26 02:33:53 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,32 +26,6 @@ * rights to redistribute these changes. */ -/* - * : - * Log: rf_dagffrd.h,v - * Revision 1.5 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.4 1996/06/06 17:31:13 jimz - * new mirror read creation dags - * - * Revision 1.3 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/03 19:19:53 wvcii - * Initial revision - * - */ - #ifndef _RF__RF_DAGFFRD_H_ #define _RF__RF_DAGFFRD_H_ diff --git a/sys/dev/raidframe/rf_dagffwr.c b/sys/dev/raidframe/rf_dagffwr.c index e4e2dbe5037..7d47c8fb759 100644 --- a/sys/dev/raidframe/rf_dagffwr.c +++ b/sys/dev/raidframe/rf_dagffwr.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagffwr.c,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagffwr.c,v 1.2 1999/01/26 02:33:53 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,100 +31,6 @@ * * code for creating fault-free DAGs * - * : - * Log: rf_dagffwr.c,v - * Revision 1.19 1996/07/31 15:35:24 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.18 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.17 1996/07/27 18:40:24 jimz - * cleanup sweep - * - * Revision 1.16 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.15 1996/06/11 01:27:50 jimz - * Fixed bug where diskthread shutdown would crash or hang. This - * turned out to be two distinct bugs: - * (1) [crash] The thread shutdown code wasn't properly waiting for - * all the diskthreads to complete. This caused diskthreads that were - * exiting+cleaning up to unlock a destroyed mutex. - * (2) [hang] TerminateDiskQueues wasn't locking, and DiskIODequeue - * only checked for termination _after_ a wakeup if the queues were - * empty. This was a race where the termination wakeup could be lost - * by the dequeueing thread, and the system would hang waiting for the - * thread to exit, while the thread waited for an I/O or a signal to - * check the termination flag. - * - * Revision 1.14 1996/06/10 22:24:01 wvcii - * added write dags which do not have a commit node and are - * used in forward and backward error recovery experiments. - * - * Revision 1.13 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.12 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.11 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.10 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.9 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.8 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.7 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.6 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.5 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.4 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.3 1996/05/15 23:23:12 wvcii - * fixed bug in small write read old q node succedent initialization - * - * Revision 1.2 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.1 1996/05/03 19:20:45 wvcii - * Initial revision - * */ #include "rf_types.h" diff --git a/sys/dev/raidframe/rf_dagffwr.h b/sys/dev/raidframe/rf_dagffwr.h index f883ee7624e..3c999abf7e7 100644 --- a/sys/dev/raidframe/rf_dagffwr.h +++ b/sys/dev/raidframe/rf_dagffwr.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagffwr.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagffwr.h,v 1.2 1999/01/26 02:33:53 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,37 +26,6 @@ * rights to redistribute these changes. */ -/* - * : - * Log: rf_dagffwr.h,v - * Revision 1.6 1996/07/31 15:35:29 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.5 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.4 1996/06/10 22:25:28 wvcii - * added write dags which do not have a commit node and are - * used in forward and backward error recovery experiments. - * - * Revision 1.3 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/03 19:20:18 wvcii - * Initial revision - * - */ - #ifndef _RF__RF_DAGFFWR_H_ #define _RF__RF_DAGFFWR_H_ diff --git a/sys/dev/raidframe/rf_dagflags.h b/sys/dev/raidframe/rf_dagflags.h index cdb4f0d5f15..b36527bbb7e 100644 --- a/sys/dev/raidframe/rf_dagflags.h +++ b/sys/dev/raidframe/rf_dagflags.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagflags.h,v 1.1 1998/11/13 04:20:27 oster Exp $ */ +/* $NetBSD: rf_dagflags.h,v 1.2 1999/01/26 02:33:53 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,32 +34,6 @@ * **************************************************************************************/ -/* : - * Log: rf_dagflags.h,v - * Revision 1.10 1996/06/13 19:08:23 jimz - * remove unused BD flag - * - * Revision 1.9 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.8 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.7 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.6 1995/12/01 15:59:40 root - * added copyright info - * - */ #ifndef _RF__RF_DAGFLAGS_H_ #define _RF__RF_DAGFLAGS_H_ diff --git a/sys/dev/raidframe/rf_dagfuncs.c b/sys/dev/raidframe/rf_dagfuncs.c index 78a2acd2014..0d62e7bf5b5 100644 --- a/sys/dev/raidframe/rf_dagfuncs.c +++ b/sys/dev/raidframe/rf_dagfuncs.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagfuncs.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_dagfuncs.c,v 1.2 1999/01/26 02:33:53 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -47,172 +47,6 @@ * to check to find out whether or not the acquire was suppressed. */ -/* : - * Log: rf_dagfuncs.c,v - * Revision 1.64 1996/07/31 16:29:26 jimz - * LONGSHIFT -> RF_LONGSHIFT, defined in rf_types.h - * - * Revision 1.63 1996/07/30 04:00:20 jimz - * define LONGSHIFT for mips - * - * Revision 1.62 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.61 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.60 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.59 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.58 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.57 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.56 1996/06/11 01:27:50 jimz - * Fixed bug where diskthread shutdown would crash or hang. This - * turned out to be two distinct bugs: - * (1) [crash] The thread shutdown code wasn't properly waiting for - * all the diskthreads to complete. This caused diskthreads that were - * exiting+cleaning up to unlock a destroyed mutex. - * (2) [hang] TerminateDiskQueues wasn't locking, and DiskIODequeue - * only checked for termination _after_ a wakeup if the queues were - * empty. This was a race where the termination wakeup could be lost - * by the dequeueing thread, and the system would hang waiting for the - * thread to exit, while the thread waited for an I/O or a signal to - * check the termination flag. - * - * Revision 1.55 1996/06/10 22:23:18 wvcii - * disk and xor funcs now optionally support undo logging - * for backward error recovery experiments - * - * Revision 1.54 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.53 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.52 1996/06/06 17:28:44 jimz - * add new read mirror partition func, rename old read mirror - * to rf_DiskReadMirrorIdleFunc - * - * Revision 1.51 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.50 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.49 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.48 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.47 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.46 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.45 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.44 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.43 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.42 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.41 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.40 1996/05/08 15:24:14 wvcii - * modified GenericWakeupFunc to use recover, undone, and panic node states - * - * Revision 1.39 1996/05/02 17:18:01 jimz - * fix up headers for user-land, following ccmn cleanup - * - * Revision 1.38 1996/05/01 16:26:51 jimz - * don't include rf_ccmn.h (get ready to phase out) - * - * Revision 1.37 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.36 1995/12/04 19:19:09 wvcii - * modified DiskReadMirrorFunc - * - added fifth parameter, physical disk address of mirror copy - * - SelectIdleDisk conditionally swaps parameters 0 & 4 - * - * Revision 1.35 1995/12/01 15:58:33 root - * added copyright info - * - * Revision 1.34 1995/11/17 18:12:17 amiri - * Changed DiskReadMirrorFunc to use the generic mapping routines - * to find the mirror of the data, function was assuming RAID level 1. - * - * Revision 1.33 1995/11/17 15:15:59 wvcii - * changes in DiskReadMirrorFunc - * - added ASSERTs - * - added call to MapParityRAID1 - * - * Revision 1.32 1995/11/07 16:25:50 wvcii - * added DiskUnlockFuncForThreads - * general debugging of undo functions (first time they were used) - * - * Revision 1.31 1995/09/06 19:23:36 wvcii - * fixed tracing for parity logging nodes - * - * Revision 1.30 95/07/07 00:13:01 wvcii - * added 4th parameter to ParityLogAppend - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif - -#ifndef KERNEL -#include <errno.h> -#endif /* !KERNEL */ - #include <sys/ioctl.h> #include <sys/param.h> @@ -228,9 +62,7 @@ #include "rf_engine.h" #include "rf_dagutils.h" -#ifdef KERNEL #include "rf_kintf.h" -#endif /* KERNEL */ #if RF_INCLUDE_PARITYLOGGING > 0 #include "rf_paritylog.h" @@ -453,9 +285,7 @@ int rf_DiskReadFuncForThreads(node) caddr_t undoBuf; #endif -#ifdef KERNEL if (node->dagHdr->bp) b_proc = (void *) ((struct buf *) node->dagHdr->bp)->b_proc; -#endif /* KERNEL */ RF_ASSERT( !(lock && unlock) ); flags |= (lock) ? RF_LOCK_DISK_QUEUE : 0; @@ -507,9 +337,7 @@ int rf_DiskWriteFuncForThreads(node) caddr_t undoBuf; #endif -#ifdef KERNEL if (node->dagHdr->bp) b_proc = (void *) ((struct buf *) node->dagHdr->bp)->b_proc; -#endif /* KERNEL */ #if RF_BACKWARD > 0 /* This area is used only for backward error recovery experiments @@ -868,16 +696,7 @@ int rf_bxor(src, dest, len, bp) } /* map a user buffer into kernel space, if necessary */ -#ifdef KERNEL -#ifdef __NetBSD__ -/* XXX Not a clue if this is even close.. */ -#define REMAP_VA(_bp,x,y) (y) = (x) -#else -#define REMAP_VA(_bp,x,y) (y) = (unsigned long *) ((IS_SYS_VA(x)) ? (unsigned long *)(x) : (unsigned long *) rf_MapToKernelSpace((struct buf *) (_bp), (caddr_t)(x))) -#endif /* __NetBSD__ */ -#else /* KERNEL */ #define REMAP_VA(_bp,x,y) (y) = (x) -#endif /* KERNEL */ /* When XORing in kernel mode, we need to map each user page to kernel space before we can access it. * We don't want to assume anything about which input buffers are in kernel/user diff --git a/sys/dev/raidframe/rf_dagfuncs.h b/sys/dev/raidframe/rf_dagfuncs.h index 63cff7b6292..06084360ede 100644 --- a/sys/dev/raidframe/rf_dagfuncs.h +++ b/sys/dev/raidframe/rf_dagfuncs.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagfuncs.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_dagfuncs.h,v 1.2 1999/01/26 02:33:53 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,57 +32,6 @@ * ****************************************************************************************/ -/* - * : - * Log: rf_dagfuncs.h,v - * Revision 1.17 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.16 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.15 1996/06/06 17:27:20 jimz - * added another read mirror func (partitioning), changed names so dag - * creation routines can use the appropriate one - * - * Revision 1.14 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.13 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.12 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.11 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.10 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.9 1995/12/01 15:56:46 root - * added copyright info - * - * Revision 1.8 1995/11/07 16:25:23 wvcii - * added DiskUnlockFuncForThreads - * - */ - #ifndef _RF__RF_DAGFUNCS_H_ #define _RF__RF_DAGFUNCS_H_ diff --git a/sys/dev/raidframe/rf_dagutils.c b/sys/dev/raidframe/rf_dagutils.c index 2574e4d7cea..a405f2161d8 100644 --- a/sys/dev/raidframe/rf_dagutils.c +++ b/sys/dev/raidframe/rf_dagutils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagutils.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_dagutils.c,v 1.2 1999/01/26 02:33:54 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,157 +32,6 @@ * *****************************************************************************/ -/* - * : - * Log: rf_dagutils.c,v - * Revision 1.55 1996/08/22 14:39:47 jimz - * reduce v/k fraction (better load balancing) - * - * Revision 1.54 1996/08/21 04:14:12 jimz - * minor workload shift tweaking - * - * Revision 1.53 1996/08/20 23:41:16 jimz - * fix up workload shift computation - * - * Revision 1.52 1996/08/20 22:34:16 jimz - * first cut at fixing workload shift - * needs work - * - * Revision 1.51 1996/08/20 16:51:16 jimz - * comment more verbosely compute_workload_shift() - * - * Revision 1.50 1996/08/11 00:40:50 jimz - * fix up broken comment - * - * Revision 1.49 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.48 1996/07/27 18:40:01 jimz - * cleanup sweep - * - * Revision 1.47 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.46 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.45 1996/06/17 03:24:59 jimz - * include shutdown.h for define of now-macroized ShutdownCreate - * - * Revision 1.44 1996/06/10 12:50:57 jimz - * Add counters to freelists to track number of allocations, frees, - * grows, max size, etc. Adjust a couple sets of PRIME params based - * on the results. - * - * Revision 1.43 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.42 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.41 1996/06/06 17:28:58 jimz - * make PrintNodeInfoString aware of new mirroring funcs - * - * Revision 1.40 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.39 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.38 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.37 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.36 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.35 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.34 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.33 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.32 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.31 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.30 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.29 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.28 1996/05/16 23:05:52 jimz - * changed InitNode() to use dag_ptrs field of node when appropriate - * (see rf_dag.h or comments within InitNode() for details) - * - * Revision 1.27 1996/05/16 15:37:19 jimz - * convert to RF_FREELIST stuff for dag headers - * - * 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/03 19:56:15 wvcii - * added misc routines from old dag creation files - * - * Revision 1.24 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.23 1995/12/01 15:59:50 root - * added copyright info - * - * Revision 1.22 1995/11/17 15:14:12 wvcii - * PrintDAG now processes DiskReadMirrorFunc nodes - * - * Revision 1.21 1995/11/07 16:22:38 wvcii - * InitNode and InitNodeFromBuf now initialize commit fields - * beefed up ValidateDag - * prettied up PrintDAGList - * - */ - #include "rf_archs.h" #include "rf_types.h" #include "rf_threadstuff.h" diff --git a/sys/dev/raidframe/rf_dagutils.h b/sys/dev/raidframe/rf_dagutils.h index d33c95a86dd..f0466e88923 100644 --- a/sys/dev/raidframe/rf_dagutils.h +++ b/sys/dev/raidframe/rf_dagutils.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_dagutils.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_dagutils.h,v 1.2 1999/01/26 02:33:54 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,78 +32,6 @@ * *************************************************************************/ -/* - * : - * Log: rf_dagutils.h,v - * Revision 1.19 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.18 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.17 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.16 1996/06/06 17:27:46 jimz - * added another select mirror func (partitioning), changed names so dag - * creation routines can use the appropriate one - * - * fixed old idle mirror func to pick closest arm if queue lengths are equal - * - * Revision 1.15 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.14 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.13 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.12 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.11 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.10 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.9 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.8 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.7 1996/05/03 19:55:27 wvcii - * added misc routines from old dag creation files - * - * Revision 1.6 1995/12/01 15:57:28 root - * added copyright info - * - * Revision 1.5 1995/11/07 16:21:36 wvcii - * modified InitNode and InitNodeFromBuf prototypes - * - */ #include "rf_types.h" #include "rf_dagfuncs.h" diff --git a/sys/dev/raidframe/rf_debugMem.c b/sys/dev/raidframe/rf_debugMem.c index 8b34812e28f..f71ad2f8a2d 100644 --- a/sys/dev/raidframe/rf_debugMem.c +++ b/sys/dev/raidframe/rf_debugMem.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_debugMem.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_debugMem.c,v 1.2 1999/01/26 02:33:54 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -36,109 +36,6 @@ * and to the allocation list stuff. */ -/* : - * Log: rf_debugMem.c,v - * Revision 1.38 1996/08/20 14:45:43 jimz - * add debugging to track memory allocated (amount only, w/out - * excessive sanity checking) - * - * Revision 1.37 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.36 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.35 1996/06/13 08:55:38 jimz - * make error messages refer to file, line of original - * allocation - * - * Revision 1.34 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.33 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.32 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.31 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.30 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.29 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.28 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.27 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.26 1996/05/21 18:53:46 jimz - * return NULL for failed allocations, not panic - * - * Revision 1.25 1996/05/20 16:14:19 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.24 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.23 1996/05/17 12:42:35 jimz - * wrap get_threadid stuff in #ifndef UTILITY for utils which use - * redzone allocation stuff - * - * Revision 1.22 1996/05/16 23:06:09 jimz - * don't warn about NULL alists - * - * Revision 1.21 1996/05/16 22:25:02 jimz - * show allocations for [MC]allocAndAdd - * - * Revision 1.20 1996/05/15 18:30:22 jimz - * print memory allocation as well as frees if memDebug > 1 - * - * Revision 1.19 1996/05/07 17:41:17 jimz - * add "level 2" for memDebug, which will print freed address ranges - * - * Revision 1.18 1996/05/02 20:41:53 jimz - * really fix malloc problem out-of-kernel in memory_hash_insert() - * - * Revision 1.17 1996/05/02 20:04:29 jimz - * fixed malloc deadlock previous change introduced - * - * Revision 1.16 1996/05/01 16:27:26 jimz - * get rid of ALLOCMH - * stop using ccmn_ memory management - * - * Revision 1.15 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.14 1995/12/01 15:56:17 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_sys.h" @@ -150,10 +47,6 @@ #include "rf_utility.h" #endif /* RF_UTILITY == 0 */ -#ifndef KERNEL -#include <stdio.h> -#include <assert.h> -#endif /* !KERNEL */ #include "rf_debugMem.h" #include "rf_general.h" @@ -177,7 +70,7 @@ static int mh_table_initialized=0; static void memory_hash_insert(void *addr, int size, int line, char *filen); static int memory_hash_remove(void *addr, int sz); -#ifndef KERNEL /* no redzones or "real_" routines in the kernel */ +#ifndef _KERNEL /* no redzones or "real_" routines in the kernel */ static void rf_redzone_free_failed(void *ptr, int size, int line, char *file); @@ -436,7 +329,7 @@ static void rf_redzone_free_failed(ptr,size,line,file) RF_ASSERT(0); } -#endif /* !KERNEL */ +#endif /* !_KERNEL */ void rf_record_malloc(p, size, line, filen) void *p; @@ -521,11 +414,7 @@ char *filen; /* search for this address in the hash table */ for (p=mh_table[bucket]; p && (p->address != addr); p=p->next); if (!p) { -#ifdef KERNEL RF_Malloc(p,sizeof(struct mh_struct),(struct mh_struct *)); -#else /* KERNEL */ - p = (struct mh_struct *)malloc(sizeof(struct mh_struct)); -#endif /* KERNEL */ RF_ASSERT(p); p->next = mh_table[bucket]; mh_table[bucket] = p; @@ -569,9 +458,4 @@ int sz; void rf_ReportMaxMem() { printf("Max memory used: %d bytes\n",(int)max_mem); -#ifndef KERNEL - fflush(stdout); - fprintf(stderr,"Max memory used: %d bytes\n",max_mem); - fflush(stderr); -#endif /* !KERNEL */ } diff --git a/sys/dev/raidframe/rf_debugMem.h b/sys/dev/raidframe/rf_debugMem.h index f7b35152f7f..be0670be020 100644 --- a/sys/dev/raidframe/rf_debugMem.h +++ b/sys/dev/raidframe/rf_debugMem.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_debugMem.h,v 1.2 1999/01/14 22:49:05 thorpej Exp $ */ +/* $NetBSD: rf_debugMem.h,v 1.3 1999/01/26 02:33:54 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,106 +32,6 @@ * IMPORTANT: if you put the lock/unlock mutex stuff back in here, you * need to take it out of the routines in debugMem.c * - * Log: rf_debugMem.h,v - * Revision 1.27 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.26 1996/06/11 13:46:43 jimz - * make bracing consistent around memory allocation macros - * - * Revision 1.25 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.24 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.23 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.22 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.21 1996/05/23 22:17:40 jimz - * fix alloclist macro names for kernel - * - * Revision 1.20 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.19 1996/05/23 13:18:23 jimz - * include rf_options.h - * - * Revision 1.18 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.17 1996/05/21 18:51:54 jimz - * cleaned up macro args - * - * Revision 1.16 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.15 1996/05/01 16:26:22 jimz - * get rid of old ccmn stuff - * - * Revision 1.14 1995/12/01 15:58:09 root - * added copyright info - * - * Revision 1.13 1995/10/11 15:26:03 jimz - * zero memory after allocation in kernel (hide effects - * of uninitialized structs) - * - * Revision 1.12 1995/10/06 17:04:15 jimz - * make Malloc and Free in kernel use kernel malloc package, not cam - * dbufs (which is gross, and was exhausting cam zalloc limit) - * - * Revision 1.11 1995/05/01 13:28:00 holland - * parity range locks, locking disk requests, recon+parityscan in kernel, etc. - * - * Revision 1.10 1995/04/24 13:25:51 holland - * rewrite to move disk queues, recon, & atomic RMW to kernel - * - * Revision 1.9 1995/02/17 19:39:56 holland - * added size param to all calls to Free(). - * this is ignored at user level, but necessary in the kernel. - * - * Revision 1.8 1995/02/10 17:34:10 holland - * kernelization changes - * - * Revision 1.7 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.6 1995/02/01 15:13:05 holland - * moved #include of general.h out of raid.h and into each file - * - * Revision 1.5 1995/02/01 14:25:19 holland - * began changes for kernelization: - * changed all instances of mutex_t and cond_t to DECLARE macros - * converted configuration code to use config structure - * - * Revision 1.4 1995/01/11 19:27:02 holland - * many changes related to performance tuning - * - * Revision 1.3 1994/11/29 21:34:56 danner - * Changed type of redzone_calloc and malloc to void *. - * - * Revision 1.2 1994/11/28 22:13:23 danner - * Many macros converted to functions. - * */ #ifndef _RF__RF_DEBUGMEM_H_ @@ -141,7 +41,7 @@ #include "rf_alloclist.h" #include "rf_options.h" -#ifndef KERNEL +#ifndef _KERNEL #ifndef __NetBSD__ void *malloc(), *calloc(); @@ -186,15 +86,10 @@ RF_DECLARE_EXTERN_MUTEX(rf_debug_mem_mutex) #else /* KERNEL */ #include <sys/types.h> -#ifdef __NetBSD__ typedef u_int32_t U32; -#else -#include <io/common/iotypes.h> /* just to get defn of U32 */ -#endif /* __NetBSD__ */ #include <sys/malloc.h> -#ifdef __NetBSD__ #define RF_Malloc(_p_, _size_, _cast_) \ { \ @@ -203,16 +98,6 @@ typedef u_int32_t U32; if (rf_memDebug) rf_record_malloc(_p_, _size_, __LINE__, __FILE__); \ } -#else - -#define RF_Malloc(_p_, _size_, _cast_) \ - { \ - _p_ = _cast_ malloc((u_long)_size_, BUCKETINDEX(_size_), M_DEVBUF, M_WAITOK); \ - bzero((char *)_p_, _size_); \ - if (rf_memDebug) rf_record_malloc(_p_, _size_, __LINE__, __FILE__); \ - } -#endif /* __NetBSD__ */ - #define RF_MallocAndAdd(__p_, __size_, __cast_, __alist_) \ { \ RF_Malloc(__p_, __size_, __cast_); \ @@ -231,23 +116,15 @@ typedef u_int32_t U32; if (__alist) rf_AddToAllocList(__alist, __p, (__nel)*(__elsz)); \ } -#ifdef __NetBSD__ #define RF_Free(_p_, _sz_) \ { \ free((void *)(_p_), M_RAIDFRAME); \ if (rf_memDebug) rf_unrecord_malloc(_p_, (U32) (_sz_)); \ } -#else -#define RF_Free(_p_, _sz_) \ - { \ - free((void *)(_p_), M_DEVBUF); \ - if (rf_memDebug) rf_unrecord_malloc(_p_, (U32) (_sz_)); \ - } -#endif /* __NetBSD__ */ -#endif /* KERNEL */ +#endif /* _KERNEL */ -#ifndef KERNEL +#ifndef _KERNEL void *rf_real_redzone_malloc(int size); void *rf_real_redzone_calloc(int n, int size); void rf_real_redzone_free(char *p, int line, char *filen); diff --git a/sys/dev/raidframe/rf_debugprint.c b/sys/dev/raidframe/rf_debugprint.c index 470b838edd7..ad64fdb8fd2 100644 --- a/sys/dev/raidframe/rf_debugprint.c +++ b/sys/dev/raidframe/rf_debugprint.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_debugprint.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_debugprint.c,v 1.2 1999/01/26 02:33:54 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,47 +33,6 @@ * printfs, and to capture only the printf's immediately preceding a failure. */ -/* : - * Log: rf_debugprint.c,v - * Revision 1.13 1996/08/07 21:08:31 jimz - * remove bogus ; from mutex decl - * - * Revision 1.12 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.11 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.10 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.9 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.8 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.7 1996/05/20 16:16:06 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.6 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.5 1995/12/01 16:00:45 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_threadstuff.h" #include "rf_debugprint.h" @@ -157,29 +116,16 @@ void rf_spill_debug_buffer(fname) char *fname; { int i; -#ifndef KERNEL - FILE *fp; -#endif /* !KERNEL */ if (!rf_debugPrintUseBuffer) return; RF_LOCK_MUTEX(rf_debug_print_mutex); -#ifndef KERNEL - fp = (fname) ? fopen(fname,"w") : stdout; - if (!fp) {printf("Unable to open file %s for writing\n",fname); return;} - for (i=rf_debugprint_index+1; i != rf_debugprint_index; i = (i+1)&BUFMASK) if (rf_debugprint_buf[i].cstring) - fprintf(fp,rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3, - rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8); - fprintf(fp,rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3, - rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8); - fclose(fp); -#else /* !KERNEL */ + for (i=rf_debugprint_index+1; i != rf_debugprint_index; i = (i+1)&BUFMASK) if (rf_debugprint_buf[i].cstring) printf(rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3, rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8); printf(rf_debugprint_buf[i].cstring,rf_debugprint_buf[i].a1,rf_debugprint_buf[i].a2,rf_debugprint_buf[i].a3, rf_debugprint_buf[i].a4,rf_debugprint_buf[i].a5,rf_debugprint_buf[i].a6,rf_debugprint_buf[i].a7,rf_debugprint_buf[i].a8); -#endif /* !KERNEL */ RF_UNLOCK_MUTEX(rf_debug_print_mutex); } diff --git a/sys/dev/raidframe/rf_debugprint.h b/sys/dev/raidframe/rf_debugprint.h index 29672b6cf2e..5f1785cd23d 100644 --- a/sys/dev/raidframe/rf_debugprint.h +++ b/sys/dev/raidframe/rf_debugprint.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_debugprint.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_debugprint.h,v 1.2 1999/01/26 02:33:54 oster Exp $ */ /* * rf_debugprint.h */ @@ -28,27 +28,6 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_debugprint.h,v - * Revision 1.4 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.3 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:55:43 jimz - * Initial revision - * - */ #ifndef _RF__RF_DEBUGPRINT_H_ #define _RF__RF_DEBUGPRINT_H_ diff --git a/sys/dev/raidframe/rf_decluster.c b/sys/dev/raidframe/rf_decluster.c index 6ab34f3cc0d..efa6b87f528 100644 --- a/sys/dev/raidframe/rf_decluster.c +++ b/sys/dev/raidframe/rf_decluster.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_decluster.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_decluster.c,v 1.2 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -47,139 +47,6 @@ * *--------------------------------------------------------------------*/ -/* - * : - * Log: rf_decluster.c,v - * Revision 1.51 1996/08/21 19:47:10 jimz - * fix bogus return values from config - * - * Revision 1.50 1996/08/20 22:41:42 jimz - * better diagnostics for bad blockdesigns - * - * Revision 1.49 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.48 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.47 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.46 1996/07/27 18:40:11 jimz - * cleanup sweep - * - * Revision 1.45 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.44 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.43 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.42 1996/06/17 03:23:48 jimz - * switch DeclusteredDS typing - * - * Revision 1.41 1996/06/11 08:55:15 jimz - * improved error-checking at configuration time - * - * Revision 1.40 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.39 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.38 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.37 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.36 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.35 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.34 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.33 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.32 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.31 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.30 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.29 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.28 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.27 1995/12/01 16:00:08 root - * added copyright info - * - * Revision 1.26 1995/11/28 21:35:12 amiri - * set the RF_BD_DECLUSTERED flag - * - * Revision 1.25 1995/11/17 18:56:00 wvcii - * added prototyping to MapParity - * - * Revision 1.24 1995/07/04 22:25:33 holland - * increased default num bufs - * - * Revision 1.23 1995/07/03 20:23:51 holland - * changed floating recon bufs & head sep yet again - * - * Revision 1.22 1995/07/03 18:12:14 holland - * changed the way the number of floating recon bufs & the head sep - * limit are set - * - * Revision 1.21 1995/07/02 15:07:42 holland - * bug fixes related to getting distributed sparing numbers - * - * Revision 1.20 1995/06/23 13:41:28 robby - * updeated to prototypes in rf_layout.h - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif - - #include "rf_types.h" #include "rf_raid.h" #include "rf_raidframe.h" @@ -773,19 +640,11 @@ int rf_InstallSpareTable( req->TableDepthInPUs = info->TableDepthInPUs; req->SpareSpaceDepthPerRegionInSUs = info->SpareSpaceDepthPerRegionInSUs; -#ifndef KERNEL - info->SpareTable = rf_ReadSpareTable(req, info->sparemap_fname); - RF_Free(req, sizeof(*req)); - retcode = (info->SpareTable) ? 0 : 1; -#else /* !KERNEL */ retcode = rf_GetSpareTableFromDaemon(req); RF_ASSERT(!retcode); /* XXX -- fix this to recover gracefully -- XXX */ -#endif /* !KERNEL */ - return(retcode); } -#ifdef KERNEL /* * Invoked via ioctl to install a spare table in the kernel. */ @@ -821,7 +680,6 @@ int rf_SetSpareTable(raidPtr, data) return(0); } -#endif /* KERNEL */ RF_ReconUnitCount_t rf_GetNumSpareRUsDeclustered(raidPtr) RF_Raid_t *raidPtr; diff --git a/sys/dev/raidframe/rf_decluster.h b/sys/dev/raidframe/rf_decluster.h index 25aada1cb2e..8c573409878 100644 --- a/sys/dev/raidframe/rf_decluster.h +++ b/sys/dev/raidframe/rf_decluster.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_decluster.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_decluster.h,v 1.2 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -35,68 +35,6 @@ * *--------------------------------------------------------------------*/ -/* - * : - * Log: rf_decluster.h,v - * Revision 1.20 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.19 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.18 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.17 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.16 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.15 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.14 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.13 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.12 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.11 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.10 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.9 1995/12/01 15:58:23 root - * added copyright info - * - * Revision 1.8 1995/11/17 18:57:02 wvcii - * added prototyping to MapParity - * - * Revision 1.7 1995/07/02 15:08:31 holland - * bug fixes related to getting distributed sparing numbers - * - * Revision 1.6 1995/06/23 13:41:18 robby - * updeated to prototypes in rf_layout.h - * - */ - #ifndef _RF__RF_DECLUSTER_H_ #define _RF__RF_DECLUSTER_H_ diff --git a/sys/dev/raidframe/rf_declusterPQ.c b/sys/dev/raidframe/rf_declusterPQ.c index 2617fd3ee24..c7732e09009 100644 --- a/sys/dev/raidframe/rf_declusterPQ.c +++ b/sys/dev/raidframe/rf_declusterPQ.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_declusterPQ.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_declusterPQ.c,v 1.2 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,130 +34,6 @@ * *--------------------------------------------------*/ -/* - * $Header: /cvsroot/src/sys/dev/raidframe/rf_declusterPQ.c,v 1.1 1998/11/13 04:20:28 oster Exp $ - * - * Log: rf_declusterPQ.c,v - * Revision 1.34 1996/08/21 19:47:14 jimz - * fix bogus return values from config - * - * Revision 1.33 1996/08/21 15:09:16 jimz - * cleanup debugging spoo - * - * Revision 1.32 1996/08/21 04:13:36 jimz - * debug with EvenOdd - * - * Revision 1.31 1996/08/20 22:41:54 jimz - * 2 parity disks, not 1 - * - * Revision 1.30 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.29 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.28 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.27 1996/06/11 08:45:12 jimz - * improved error-checking on array configuration - * - * Revision 1.26 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.25 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.24 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.23 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.22 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.21 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.20 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.19 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.18 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.17 1996/05/17 00:52:56 jimz - * RepIndex was not being initialized before the computation of - * RepIndexQ in MapQDeclusteredPQ(). I copied the initialization - * from MapParityDeclusteredPQ(). Hope that was right. - * - * Revision 1.16 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.15 1995/12/01 15:57:46 root - * added copyright info - * - * Revision 1.14 1995/11/17 19:00:13 wvcii - * added prototyping to MapParity - * created MapQ - * - * Revision 1.13 1995/10/05 22:20:48 jimz - * free_1d_array() takes two args; provide them both - * - * Revision 1.12 1995/09/06 19:26:33 wvcii - * offset cfgBuf by sparemap length (ConfigureDeclusteredPQ) - * - * Revision 1.11 95/06/23 13:41:11 robby - * updeated to prototypes in rf_layout.h - * - * Revision 1.10 1995/05/02 22:46:53 holland - * minor code cleanups. - * - * Revision 1.9 1995/03/15 20:45:23 holland - * distr sparing changes. - * - * Revision 1.8 1995/03/01 20:25:48 holland - * kernelization changes - * - * Revision 1.7 1995/02/17 19:39:56 holland - * added size param to all calls to Free(). - * this is ignored at user level, but necessary in the kernel. - * - * Revision 1.6 1995/02/10 17:34:10 holland - * kernelization changes - * - * Revision 1.5 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.4 1995/02/01 15:13:05 holland - * moved #include of general.h out of raid.h and into each file - * - * Revision 1.3 1995/02/01 14:25:19 holland - * began changes for kernelization: - * changed all instances of mutex_t and cond_t to DECLARE macros - * converted configuration code to use config structure - * - * Revision 1.2 1994/11/28 22:13:56 danner - * corrected some mapping bugs. - * - */ #include "rf_types.h" #include "rf_raid.h" diff --git a/sys/dev/raidframe/rf_declusterPQ.h b/sys/dev/raidframe/rf_declusterPQ.h index 05b39688396..f486a49f787 100644 --- a/sys/dev/raidframe/rf_declusterPQ.h +++ b/sys/dev/raidframe/rf_declusterPQ.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_declusterPQ.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_declusterPQ.h,v 1.2 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,59 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_declusterPQ.h,v - * Revision 1.13 1996/08/20 22:42:08 jimz - * missing prototype of IdentifyStripeDeclusteredPQ added - * - * Revision 1.12 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.11 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.10 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.9 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.8 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.7 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.6 1995/12/01 15:59:20 root - * added copyright info - * - * Revision 1.5 1995/11/17 19:08:23 wvcii - * added prototyping to MapParity - * - * Revision 1.4 1995/11/07 15:30:33 wvcii - * changed PQDagSelect prototype - * function no longer generates numHdrSucc, numTermAnt - * removed ParityLoggingDagSelect prototype - * - * Revision 1.3 1995/06/23 13:40:57 robby - * updeated to prototypes in rf_layout.h - * - * Revision 1.2 1995/05/02 22:46:53 holland - * minor code cleanups. - * - * Revision 1.1 1994/11/19 20:26:57 danner - * Initial revision - * - */ - #ifndef _RF__RF_DECLUSTERPQ_H_ #define _RF__RF_DECLUSTERPQ_H_ diff --git a/sys/dev/raidframe/rf_demo.c b/sys/dev/raidframe/rf_demo.c index 0771e62129e..fa673858cb3 100644 --- a/sys/dev/raidframe/rf_demo.c +++ b/sys/dev/raidframe/rf_demo.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_demo.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_demo.c,v 1.2 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,66 +32,6 @@ * **********************************************************************************/ -/* : - * Log: rf_demo.c,v - * Revision 1.24 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.23 1996/06/17 03:23:09 jimz - * explicitly do pthread stuff (for join) - * NOTE: this should be changed! - * - * Revision 1.22 1996/06/14 23:15:38 jimz - * attempt to deal with thread GC problem - * - * Revision 1.21 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.20 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.19 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.18 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.17 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.16 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.15 1996/05/20 16:14:08 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.14 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.13 1995/12/01 15:56:07 root - * added copyright info - * - */ - #include "rf_archs.h" #if RF_DEMO > 0 @@ -110,9 +50,6 @@ #include "rf_general.h" #include "rf_options.h" -#ifdef SIMULATE -#include "rf_diskevent.h" -#endif /* SIMULATE */ static int doMax = 0; /* currently no way to set this */ diff --git a/sys/dev/raidframe/rf_demo.h b/sys/dev/raidframe/rf_demo.h index 4a940f1b0e3..68ee422335b 100644 --- a/sys/dev/raidframe/rf_demo.h +++ b/sys/dev/raidframe/rf_demo.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_demo.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_demo.h,v 1.2 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,30 +30,6 @@ * some constants for demo'ing software */ -/* : - * Log: rf_demo.h,v - * Revision 1.8 1996/06/14 23:15:38 jimz - * attempt to deal with thread GC problem - * - * Revision 1.7 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.6 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.5 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.4 1995/12/01 15:58:53 root - * added copyright info - * - */ - #ifndef _RF__RF_DEMO_H_ #define _RF__RF_DEMO_H_ diff --git a/sys/dev/raidframe/rf_desc.h b/sys/dev/raidframe/rf_desc.h index 94efc7476ab..07b76ae7fe5 100644 --- a/sys/dev/raidframe/rf_desc.h +++ b/sys/dev/raidframe/rf_desc.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_desc.h,v 1.2 1999/01/15 17:55:52 explorer Exp $ */ +/* $NetBSD: rf_desc.h,v 1.3 1999/01/26 02:33:55 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,78 +26,6 @@ * rights to redistribute these changes. */ -/* - * : - * Log: rf_desc.h,v - * Revision 1.29 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.28 1996/06/07 22:49:22 jimz - * fix up raidPtr typing - * - * Revision 1.27 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.26 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.25 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.24 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.23 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.22 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.21 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.20 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.19 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.18 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.17 1995/12/01 15:58:43 root - * added copyright info - * - * Revision 1.16 1995/11/19 16:31:30 wvcii - * descriptors now contain an array of dag lists as opposed to a dag header - * - * Revision 1.15 1995/11/07 16:24:17 wvcii - * updated def of _AccessState - * - */ - #ifndef _RF__RF_DESC_H_ #define _RF__RF_DESC_H_ @@ -115,7 +43,6 @@ struct RF_RaidReconDesc_s { int numDisksDone; /* the number of surviving disks that have completed their work */ RF_RowCol_t srow; /* row ID of the spare disk (not used in dist sparing) */ RF_RowCol_t scol; /* col ID of the spare disk (not used in dist sparing) */ -#ifdef KERNEL /* * Prevent recon from hogging CPU */ @@ -123,7 +50,6 @@ struct RF_RaidReconDesc_s { RF_uint64 reconExecTimerRunning; RF_uint64 reconExecTicks; RF_uint64 maxReconExecTicks; -#endif /* KERNEL */ #if RF_RECON_STATS > 0 RF_uint64 hsStallCount; /* head sep stall count */ @@ -140,11 +66,6 @@ struct RF_RaidAccessDesc_s { RF_SectorCount_t numBlocks; /* number of blocks (sectors) to transfer */ RF_StripeCount_t numStripes; /* number of stripes involved in access */ caddr_t bufPtr; /* pointer to data buffer */ - -#if !defined(KERNEL) && !defined(SIMULATE) - caddr_t obufPtr; /* real pointer to data buffer */ -#endif /* !KERNEL && !SIMULATE */ - RF_RaidAccessFlags_t flags; /* flags controlling operation */ int state; /* index into states telling how far along the RAID operation has gotten */ RF_AccessState_t *states; /* array of states to be run */ @@ -169,9 +90,6 @@ struct RF_RaidAccessDesc_s { RF_DECLARE_MUTEX(mutex) /* these are used to implement blocking I/O */ RF_DECLARE_COND(cond) -#ifdef SIMULATE - RF_Owner_t owner; -#endif /* SIMULATE */ int async_flag; RF_Etimer_t timer; /* used for timing this access */ diff --git a/sys/dev/raidframe/rf_diskevent.c b/sys/dev/raidframe/rf_diskevent.c index c9657bf2de6..23e2fd1adba 100644 --- a/sys/dev/raidframe/rf_diskevent.c +++ b/sys/dev/raidframe/rf_diskevent.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskevent.c,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_diskevent.c,v 1.2 1999/01/26 02:33:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,62 +31,6 @@ * adapted from original code by David Kotz, Song Bac Toh (1994) */ -/* : - * Log: rf_diskevent.c,v - * Revision 1.18 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.17 1996/07/27 16:05:19 jimz - * return ENOMEM if DDEventInit fails its call to InitHeap - * - * Revision 1.16 1996/06/10 12:06:24 jimz - * fix spelling errors - * - * Revision 1.15 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.14 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.13 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.12 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.11 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.10 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.9 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.8 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.7 1995/12/01 15:57:56 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_heap.h" #include "rf_diskevent.h" diff --git a/sys/dev/raidframe/rf_diskevent.h b/sys/dev/raidframe/rf_diskevent.h index 83a0fd5e4ad..502243bb918 100644 --- a/sys/dev/raidframe/rf_diskevent.h +++ b/sys/dev/raidframe/rf_diskevent.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskevent.h,v 1.1 1998/11/13 04:20:28 oster Exp $ */ +/* $NetBSD: rf_diskevent.h,v 1.2 1999/01/26 02:33:56 oster Exp $ */ /* * rf_diskevent.h * Adapted from original code by David Kotz (1994) @@ -14,53 +14,11 @@ * DDEventCancel */ -/* : - * Log: rf_diskevent.h,v - * Revision 1.10 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.9 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.8 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.7 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.6 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.5 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.4 1995/12/01 15:57:16 root - * added copyright info - * - */ - #ifndef _RF__RF_DISKEVENT_H_ #define _RF__RF_DISKEVENT_H_ #include "rf_types.h" #include "rf_heap.h" -#ifndef __NetBSD__ -#include "time.h" -#endif #define RF_DD_NOTHING_THERE (-1) #define RF_DD_DAGEVENT_ROW (-3) diff --git a/sys/dev/raidframe/rf_diskqueue.c b/sys/dev/raidframe/rf_diskqueue.c index 1788708c796..5caf6fd5729 100644 --- a/sys/dev/raidframe/rf_diskqueue.c +++ b/sys/dev/raidframe/rf_diskqueue.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.c,v 1.4 1999/01/14 22:49:05 thorpej Exp $ */ +/* $NetBSD: rf_diskqueue.c,v 1.5 1999/01/26 02:33:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -61,158 +61,6 @@ * ***************************************************************************************/ -/* - * : - * - * Log: rf_diskqueue.c,v - * Revision 1.50 1996/08/07 21:08:38 jimz - * b_proc -> kb_proc - * - * Revision 1.49 1996/07/05 20:36:14 jimz - * make rf_ConfigureDiskQueueSystem return 0 - * - * Revision 1.48 1996/06/18 20:53:11 jimz - * fix up disk queueing (remove configure routine, - * add shutdown list arg to create routines) - * - * Revision 1.47 1996/06/14 14:16:36 jimz - * fix handling of bogus queue type - * - * Revision 1.46 1996/06/13 20:41:44 jimz - * add scan, cscan, random queueing - * - * Revision 1.45 1996/06/11 01:27:50 jimz - * Fixed bug where diskthread shutdown would crash or hang. This - * turned out to be two distinct bugs: - * (1) [crash] The thread shutdown code wasn't properly waiting for - * all the diskthreads to complete. This caused diskthreads that were - * exiting+cleaning up to unlock a destroyed mutex. - * (2) [hang] TerminateDiskQueues wasn't locking, and DiskIODequeue - * only checked for termination _after_ a wakeup if the queues were - * empty. This was a race where the termination wakeup could be lost - * by the dequeueing thread, and the system would hang waiting for the - * thread to exit, while the thread waited for an I/O or a signal to - * check the termination flag. - * - * Revision 1.44 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.43 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.42 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.41 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.40 1996/06/06 17:28:04 jimz - * track sector number of last I/O dequeued - * - * Revision 1.39 1996/06/06 01:14:13 jimz - * fix crashing bug when tracerec is NULL (ie, from copyback) - * initialize req->queue - * - * Revision 1.38 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.37 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.36 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.35 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.34 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.33 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.32 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.31 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.30 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.29 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.28 1996/05/20 16:14:29 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * 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/16 19:21:49 wvcii - * fixed typo in init_dqd - * - * Revision 1.25 1996/05/16 16:02:51 jimz - * switch to RF_FREELIST stuff for DiskQueueData - * - * Revision 1.24 1996/05/10 16:24:14 jimz - * new cvscan function names - * - * Revision 1.23 1996/05/01 16:27:54 jimz - * don't use ccmn bp management - * - * Revision 1.22 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.21 1995/12/01 15:59:59 root - * added copyright info - * - * Revision 1.20 1995/11/07 16:27:20 wvcii - * added Peek() function to diskqueuesw - * non-locking accesses are never blocked (assume clients enforce proper - * respect for lock acquisition) - * - * Revision 1.19 1995/10/05 18:56:52 jimz - * fix req handling in IOComplete - * - * Revision 1.18 1995/10/04 20:13:50 wvcii - * added asserts to monitor numOutstanding queueLength - * - * Revision 1.17 1995/10/04 07:43:52 wvcii - * queue->numOutstanding now valid for user & sim - * added queue->queueLength - * user tested & verified, sim untested - * - * Revision 1.16 1995/09/12 00:21:19 wvcii - * added support for tracing disk queue time - * - */ - #include "rf_types.h" #include "rf_threadstuff.h" #include "rf_threadid.h" @@ -230,14 +78,6 @@ #include "rf_sstf.h" #include "rf_fifo.h" -#ifdef SIMULATE -#include "rf_diskevent.h" -#endif /* SIMULATE */ - -#if !defined(__NetBSD__) -extern struct buf *ubc_bufget(); -#endif - static int init_dqd(RF_DiskQueueData_t *); static void clean_dqd(RF_DiskQueueData_t *); static void rf_ShutdownDiskQueueSystem(void *); @@ -251,31 +91,10 @@ int rf_DispatchKernelIO(RF_DiskQueue_t *,RF_DiskQueueData_t *); #define Dprintf4(s,a,b,c,d) if (rf_queueDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),NULL,NULL,NULL,NULL) #define Dprintf5(s,a,b,c,d,e) if (rf_queueDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),(void *)((unsigned long)e),NULL,NULL,NULL) -#if !defined(KERNEL) && !defined(SIMULATE) - -/* queue must be locked before invoking this */ -#define SIGNAL_DISK_QUEUE(_q_,_wh_) \ -{ \ - if ( (_q_)->numWaiting > 0) { \ - (_q_)->numWaiting--; \ - RF_SIGNAL_COND( ((_q_)->cond) ); \ - } \ -} - -/* queue must be locked before invoking this */ -#define WAIT_DISK_QUEUE(_q_,_wh_) \ -{ \ - (_q_)->numWaiting++; \ - RF_WAIT_COND( ((_q_)->cond), ((_q_)->mutex) ); \ -} - -#else /* !defined(KERNEL) && !defined(SIMULATE) */ #define SIGNAL_DISK_QUEUE(_q_,_wh_) #define WAIT_DISK_QUEUE(_q_,_wh_) -#endif /* !defined(KERNEL) && !defined(SIMULATE) */ - /***************************************************************************************** * * the disk queue switch defines all the functions used in the different queueing @@ -320,7 +139,7 @@ static RF_DiskQueueSW_t diskqueuesw[] = { rf_CscanPeek, rf_SstfPromote}, -#if !defined(KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 +#if !defined(_KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 /* to make a point to Chris :-> */ {"random", /* random */ rf_FifoCreate, @@ -338,47 +157,24 @@ static RF_FreeList_t *rf_dqd_freelist; #define RF_DQD_INC 16 #define RF_DQD_INITIAL 64 -#ifdef __NetBSD__ -#ifdef _KERNEL #include <sys/buf.h> -#endif -#endif static int init_dqd(dqd) RF_DiskQueueData_t *dqd; { -#ifdef KERNEL -#ifdef __NetBSD__ /* XXX not sure if the following malloc is appropriate... probably not quite... */ dqd->bp = (struct buf *) malloc( sizeof(struct buf), M_RAIDFRAME, M_NOWAIT); - /* XXX */ - /* printf("NEED TO IMPLEMENT THIS BETTER!\n"); */ -#else - dqd->bp = ubc_bufget(); -#endif if (dqd->bp == NULL) { return(ENOMEM); } -#ifdef __NetBSD__ memset(dqd->bp,0,sizeof(struct buf)); /* if you don't do it, nobody else will.. */ -#endif -#endif /* KERNEL */ return(0); } static void clean_dqd(dqd) RF_DiskQueueData_t *dqd; { -#ifdef KERNEL -#ifdef __NetBSD__ - /* printf("NEED TO IMPLEMENT THIS BETTER(2)!\n"); */ - /* XXX ? */ free( dqd->bp, M_RAIDFRAME ); -#else - ubc_buffree(dqd->bp); -#endif - -#endif /* KERNEL */ } /* configures a single disk queue */ @@ -410,9 +206,7 @@ static int config_disk_queue( diskqueue->numWaiting=0; diskqueue->flags = 0; diskqueue->raidPtr = raidPtr; -#if defined(__NetBSD__) && defined(_KERNEL) diskqueue->rf_cinfo = &raidPtr->raid_cinfo[r][c]; -#endif rc = rf_create_managed_mutex(listp, &diskqueue->mutex); if (rc) { RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, @@ -455,26 +249,6 @@ int rf_ConfigureDiskQueueSystem(listp) return(0); } -#ifndef KERNEL -/* this is called prior to shutdown to wakeup everyone waiting on a disk queue - * and tell them to exit - */ -void rf_TerminateDiskQueues(raidPtr) - RF_Raid_t *raidPtr; -{ - RF_RowCol_t r, c; - - raidPtr->terminate_disk_queues = 1; - for (r=0; r<raidPtr->numRow; r++) { - for (c=0; c<raidPtr->numCol + ((r==0) ? raidPtr->numSpare : 0); c++) { - RF_LOCK_QUEUE_MUTEX(&raidPtr->Queues[r][c], "TerminateDiskQueues"); - RF_BROADCAST_COND(raidPtr->Queues[r][c].cond); - RF_UNLOCK_QUEUE_MUTEX(&raidPtr->Queues[r][c], "TerminateDiskQueues"); - } - } -} -#endif /* !KERNEL */ - int rf_ConfigureDiskQueues( RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, @@ -575,7 +349,6 @@ void rf_DiskIOEnqueue(queue, req, pri) printf("Warning: Enqueueing zero-sector access\n"); } -#ifdef KERNEL /* * kernel */ @@ -610,132 +383,8 @@ void rf_DiskIOEnqueue(queue, req, pri) (queue->qPtr->Enqueue)(queue->qHdr, req, pri); } RF_UNLOCK_QUEUE_MUTEX( queue, "DiskIOEnqueue" ); - -#else /* KERNEL */ - /* - * user-level - */ - RF_LOCK_QUEUE_MUTEX( queue, "DiskIOEnqueue" ); - queue->queueLength++; /* increment count of number of requests waiting in this queue */ - /* unlocking request */ - if (RF_UNLOCKING_REQ(req)) { - Dprintf4("[%d] enqueueing pri %d unlocking op & signalling r %d c %d\n", tid, pri, queue->row, queue->col); - RF_ASSERT(RF_QUEUE_LOCKED(queue) && queue->unlockingOp == NULL); - queue->unlockingOp = req; - } - /* locking and normal requests */ - else { - req->queue = (void *)queue; - Dprintf5("[%d] enqueueing pri %d %s op & signalling r %d c %d\n", tid, pri, - (RF_LOCKING_REQ(req)) ? "locking" : "regular",queue->row,queue->col); - (queue->qPtr->Enqueue)(queue->qHdr, req, pri); - } - SIGNAL_DISK_QUEUE( queue, "DiskIOEnqueue"); - RF_UNLOCK_QUEUE_MUTEX( queue, "DiskIOEnqueue" ); -#endif /* KERNEL */ } -#if !defined(KERNEL) && !defined(SIMULATE) -/* user-level only: tell all threads to wake up & recheck the queue */ -void rf_BroadcastOnQueue(queue) - RF_DiskQueue_t *queue; -{ - int i; - - if (queue->maxOutstanding > 1) for (i=0; i<queue->maxOutstanding; i++) { - SIGNAL_DISK_QUEUE(queue, "BroadcastOnQueue" ); - } -} -#endif /* !KERNEL && !SIMULATE */ - -#ifndef KERNEL /* not used in kernel */ - -RF_DiskQueueData_t *rf_DiskIODequeue(queue) - RF_DiskQueue_t *queue; -{ - RF_DiskQueueData_t *p, *headItem; - int tid; - - rf_get_threadid(tid); - RF_LOCK_QUEUE_MUTEX( queue, "DiskIODequeue" ); - for (p=NULL; !p; ) { - if (queue->unlockingOp) { - /* unlocking request */ - RF_ASSERT(RF_QUEUE_LOCKED(queue)); - p = queue->unlockingOp; - queue->unlockingOp = NULL; - Dprintf4("[%d] dequeueing pri %d unlocking op r %d c %d\n", tid, p->priority, queue->row,queue->col); - } - else { - headItem = (queue->qPtr->Peek)(queue->qHdr); - if (headItem) { - if (RF_LOCKING_REQ(headItem)) { - /* locking request */ - if (!RF_QUEUE_LOCKED(queue)) { - /* queue isn't locked, so dequeue the request & lock the queue */ - p = (queue->qPtr->Dequeue)( queue->qHdr ); - if (p) - Dprintf4("[%d] dequeueing pri %d locking op r %d c %d\n", tid, p->priority, queue->row, queue->col); - else - Dprintf3("[%d] no dequeue -- raw queue empty r %d c %d\n", tid, queue->row, queue->col); - } - else { - /* queue already locked, no dequeue occurs */ - Dprintf3("[%d] no dequeue -- queue is locked r %d c %d\n", tid, queue->row, queue->col); - p = NULL; - } - } - else { - /* normal request, always dequeue and assume caller already has lock (if needed) */ - p = (queue->qPtr->Dequeue)( queue->qHdr ); - if (p) - Dprintf4("[%d] dequeueing pri %d regular op r %d c %d\n", tid, p->priority, queue->row, queue->col); - else - Dprintf3("[%d] no dequeue -- raw queue empty r %d c %d\n", tid, queue->row, queue->col); - } - } - else { - Dprintf3("[%d] no dequeue -- raw queue empty r %d c %d\n", tid, queue->row, queue->col); - } - } - - if (queue->raidPtr->terminate_disk_queues) { - p = NULL; - break; - } -#ifdef SIMULATE - break; /* in simulator, return NULL on empty queue instead of blocking */ -#else /* SIMULATE */ - if (!p) { - Dprintf3("[%d] nothing to dequeue: waiting r %d c %d\n", tid, queue->row, queue->col); - WAIT_DISK_QUEUE( queue, "DiskIODequeue" ); - } -#endif /* SIMULATE */ - } - - if (p) { - queue->queueLength--; /* decrement count of number of requests waiting in this queue */ - RF_ASSERT(queue->queueLength >= 0); - queue->numOutstanding++; - queue->last_deq_sector = p->sectorOffset; - /* record the amount of time this request spent in the disk queue */ - RF_ETIMER_STOP(p->qtime); - RF_ETIMER_EVAL(p->qtime); - if (p->tracerec) - p->tracerec->diskqueue_us += RF_ETIMER_VAL_US(p->qtime); - } - - if (p && RF_LOCKING_REQ(p)) { - RF_ASSERT(!RF_QUEUE_LOCKED(queue)); - Dprintf3("[%d] locking queue r %d c %d\n",tid,queue->row,queue->col); - RF_LOCK_QUEUE(queue); - } - RF_UNLOCK_QUEUE_MUTEX( queue, "DiskIODequeue" ); - - return(p); -} - -#else /* !KERNEL */ /* get the next set of I/Os started, kernel version only */ void rf_DiskIOComplete(queue, req, status) @@ -812,7 +461,6 @@ void rf_DiskIOComplete(queue, req, status) RF_UNLOCK_QUEUE_MUTEX( queue, "DiskIOComplete" ); } -#endif /* !KERNEL */ /* promotes accesses tagged with the given parityStripeID from low priority * to normal priority. This promotion is optional, meaning that a queue @@ -866,14 +514,9 @@ RF_DiskQueueData_t *rf_CreateDiskQueueData( p->priority = RF_IO_NORMAL_PRIORITY; p->AuxFunc = NULL; p->buf2 = NULL; -#ifdef SIMULATE - p->owner = rf_GetCurrentOwner(); -#endif /* SIMULATE */ p->raidPtr = raidPtr; p->flags = flags; -#ifdef KERNEL p->b_proc = kb_proc; -#endif /* KERNEL */ return(p); } @@ -912,14 +555,9 @@ RF_DiskQueueData_t *rf_CreateDiskQueueDataFull( p->priority = priority; p->AuxFunc = AuxFunc; p->buf2 = buf2; -#ifdef SIMULATE - p->owner = rf_GetCurrentOwner(); -#endif /* SIMULATE */ p->raidPtr = raidPtr; p->flags = flags; -#ifdef KERNEL p->b_proc = kb_proc; -#endif /* KERNEL */ return(p); } diff --git a/sys/dev/raidframe/rf_diskqueue.h b/sys/dev/raidframe/rf_diskqueue.h index 0b13e33f111..27f44cb3e7e 100644 --- a/sys/dev/raidframe/rf_diskqueue.h +++ b/sys/dev/raidframe/rf_diskqueue.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskqueue.h,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_diskqueue.h,v 1.2 1999/01/26 02:33:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,131 +33,6 @@ * see comments in rf_diskqueue.c * ****************************************************************************************/ -/* - * - * : - * - * Log: rf_diskqueue.h,v - * Revision 1.31 1996/08/07 21:08:49 jimz - * b_proc -> kb_proc (IRIX complained) - * - * Revision 1.30 1996/06/18 20:53:11 jimz - * fix up disk queueing (remove configure routine, - * add shutdown list arg to create routines) - * - * Revision 1.29 1996/06/13 20:38:19 jimz - * fix queue type in DiskQueueData - * - * Revision 1.28 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.27 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.26 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.25 1996/06/06 17:29:12 jimz - * track arm position of last I/O dequeued - * - * Revision 1.24 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.23 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.22 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.21 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.20 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.19 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.18 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.17 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.16 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.15 1996/05/10 19:39:31 jimz - * add prev pointer to DiskQueueData - * - * Revision 1.14 1996/05/10 16:24:04 jimz - * mark old defines as deprecated, add RF_ defines - * - * Revision 1.13 1995/12/01 15:59:04 root - * added copyright info - * - * Revision 1.12 1995/11/07 16:26:44 wvcii - * added Peek() function to diskqueuesw - * - * Revision 1.11 1995/10/05 02:33:15 jimz - * made queue lens longs (less instructions to read :-) - * - * Revision 1.10 1995/10/04 07:07:07 wvcii - * queue->numOutstanding now valid for user & sim - * user tested & verified, sim untested - * - * Revision 1.9 1995/09/12 00:21:37 wvcii - * added support for tracing disk queue time - * - * Revision 1.8 95/04/24 13:25:51 holland - * rewrite to move disk queues, recon, & atomic RMW to kernel - * - * Revision 1.6.10.2 1995/04/03 20:13:56 holland - * added numOutstanding and maxOutstanding to support moving - * disk queues into kernel code - * - * Revision 1.6.10.1 1995/04/03 20:03:56 holland - * initial checkin on branch - * - * Revision 1.6 1995/03/03 18:34:33 rachad - * Simulator mechanism added - * - * Revision 1.5 1995/03/01 20:25:48 holland - * kernelization changes - * - * Revision 1.4 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.3 1995/02/01 14:25:19 holland - * began changes for kernelization: - * changed all instances of mutex_t and cond_t to DECLARE macros - * converted configuration code to use config structure - * - * Revision 1.2 1994/11/29 20:36:02 danner - * Added symbolic constants for io_type (e.g,IO_TYPE_READ) - * and support for READ_OP_WRITE - * - */ #ifndef _RF__RF_DISKQUEUE_H_ @@ -170,9 +45,7 @@ #include "rf_etimer.h" -#if defined(__NetBSD__) && defined(_KERNEL) #include "rf_netbsd.h" -#endif #define RF_IO_NORMAL_PRIORITY 1 @@ -190,9 +63,6 @@ struct RF_DiskQueueData_s { int (*CompleteFunc)(void *,int);/* function to be called upon completion */ int (*AuxFunc)(void *,...); /* function called upon completion of the first I/O of a Read_Op_Write pair*/ void *argument; /* argument to be passed to CompleteFunc */ -#ifdef SIMULATE - RF_Owner_t owner; /* which task is responsible for this request */ -#endif /* SIMULATE */ void *raidPtr; /* needed for simulation */ RF_AccTraceEntry_t *tracerec; /* perf mon only */ RF_Etimer_t qtime; /* perf mon only - time request is in queue */ @@ -204,10 +74,8 @@ struct RF_DiskQueueData_s { RF_DiskQueue_t *queue; /* the disk queue to which this req is targeted */ RF_DiskQueueDataFlags_t flags; /* flags controlling operation */ -#ifdef KERNEL struct proc *b_proc; /* the b_proc from the original bp passed into the driver for this I/O */ struct buf *bp; /* a bp to use to get this I/O done */ -#endif /* KERNEL */ }; #define RF_LOCK_DISK_QUEUE 0x01 @@ -242,9 +110,7 @@ struct RF_DiskQueue_s { dev_t dev; /* device number for kernel version */ RF_SectorNum_t last_deq_sector; /* last sector number dequeued or dispatched */ int row, col; /* debug only */ -#if defined(__NetBSD__) && defined(_KERNEL) struct raidcinfo *rf_cinfo; /* disks component info.. */ -#endif }; #define RF_DQ_LOCKED 0x02 /* no new accs allowed until queue is explicitly unlocked */ @@ -277,15 +143,8 @@ int rf_ConfigureDiskQueues(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, void rf_DiskIOEnqueue(RF_DiskQueue_t *queue, RF_DiskQueueData_t *req, int pri); -#if !defined(KERNEL) && !defined(SIMULATE) -void rf_BroadcastOnQueue(RF_DiskQueue_t *queue); -#endif /* !KERNEL && !SIMULATE */ -#ifndef KERNEL -RF_DiskQueueData_t *rf_DiskIODequeue(RF_DiskQueue_t *queue); -#else /* !KERNEL */ void rf_DiskIOComplete(RF_DiskQueue_t *queue, RF_DiskQueueData_t *req, int status); -#endif /* !KERNEL */ int rf_DiskIOPromote(RF_DiskQueue_t *queue, RF_StripeNum_t parityStripeID, RF_ReconUnitNum_t which_ru); diff --git a/sys/dev/raidframe/rf_disks.c b/sys/dev/raidframe/rf_disks.c index fe211c72c22..fe326f81190 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.2 1998/12/03 15:06:25 oster Exp $ */ +/* $NetBSD: rf_disks.c,v 1.3 1999/01/26 02:33:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,102 +30,6 @@ * rf_disks.c -- code to perform operations on the actual disks ***************************************************************/ -/* : - * Log: rf_disks.c,v - * Revision 1.32 1996/07/27 18:40:24 jimz - * cleanup sweep - * - * Revision 1.31 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.30 1996/07/19 16:11:21 jimz - * pass devname to DoReadCapacity - * - * Revision 1.29 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.28 1996/07/10 22:28:38 jimz - * get rid of obsolete row statuses (dead,degraded2) - * - * Revision 1.27 1996/06/10 12:06:14 jimz - * don't do any SCSI op stuff in simulator at all - * - * Revision 1.26 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.25 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.24 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.23 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.22 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.21 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.20 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.19 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.18 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.17 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.16 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.15 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.14 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.13 1996/05/02 14:57:43 jimz - * initialize sectorMask - * - * Revision 1.12 1995/12/01 15:57:04 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_raid.h" #include "rf_alloclist.h" @@ -138,7 +42,6 @@ #include "rf_options.h" #include "rf_sys.h" -#if defined(__NetBSD__) && defined(_KERNEL) #include <sys/types.h> #include <sys/param.h> #include <sys/systm.h> @@ -148,12 +51,7 @@ #include <sys/vnode.h> int raidlookup __P((char *, struct proc *p, struct vnode **)); -#endif -#ifdef SIMULATE -static char disk_db_file_name[120], disk_type_name[120]; -static double init_offset; -#endif /* SIMULATE */ #define DPRINTF6(a,b,c,d,e,f) if (rf_diskDebug) printf(a,b,c,d,e,f) #define DPRINTF7(a,b,c,d,e,f,g) if (rf_diskDebug) printf(a,b,c,d,e,f,g) @@ -185,10 +83,7 @@ int rf_ConfigureDisks( RF_DiskOp_t *rdcap_op = NULL, *tur_op = NULL; int num_rows_done,num_cols_done; -#if defined(__NetBSD__) && defined(_KERNEL) struct proc *proc = 0; -#endif -#ifndef SIMULATE #ifndef __NetBSD__ ret = rf_SCSI_AllocReadCapacity(&rdcap_op); if (ret) @@ -197,7 +92,6 @@ int rf_ConfigureDisks( if (ret) goto fail; #endif /* !__NetBSD__ */ -#endif /* !SIMULATE */ num_rows_done = 0; num_cols_done = 0; @@ -210,7 +104,6 @@ int rf_ConfigureDisks( } raidPtr->Disks = disks; -#if defined(__NetBSD__) && defined(_KERNEL) proc = raidPtr->proc; /* Blah XXX */ @@ -222,7 +115,6 @@ int rf_ConfigureDisks( ret = ENOMEM; goto fail; } -#endif for (r=0; r<raidPtr->numRow; r++) { numFailuresThisRow = 0; @@ -268,14 +160,12 @@ int rf_ConfigureDisks( raidPtr->status[r] = rf_rs_degraded; num_rows_done++; } -#ifndef SIMULATE #if defined(__NetBSD__) && defined(_KERNEL) /* we do nothing */ #else rf_SCSI_FreeDiskOp(rdcap_op, 1); rdcap_op = NULL; rf_SCSI_FreeDiskOp(tur_op, 0); tur_op = NULL; #endif -#endif /* !SIMULATE */ /* all disks must be the same size & have the same block size, bs must be a power of 2 */ bs = 0; for (foundone=r=0; !foundone && r<raidPtr->numRow; r++) { @@ -323,7 +213,6 @@ int rf_ConfigureDisks( fail: -#ifndef SIMULATE #if defined(__NetBSD__) && defined(_KERNEL) for(r=0;r<raidPtr->numRow;r++) { @@ -347,7 +236,6 @@ fail: if (tur_op) rf_SCSI_FreeDiskOp(tur_op, 0); #endif -#endif /* !SIMULATE */ return(ret); } @@ -369,11 +257,8 @@ int rf_ConfigureSpareDisks( RF_RaidDisk_t *disks; int num_spares_done; -#if defined(__NetBSD__) && defined(_KERNEL) struct proc *proc; -#endif -#ifndef SIMULATE #ifndef __NetBSD__ ret = rf_SCSI_AllocReadCapacity(&rdcap_op); if (ret) @@ -382,15 +267,12 @@ int rf_ConfigureSpareDisks( if (ret) goto fail; #endif /* !__NetBSD__ */ -#endif /* !SIMULATE */ num_spares_done = 0; -#if defined(__NetBSD__) && defined(_KERNEL) proc = raidPtr->proc; /* The space for the spares should have already been allocated by ConfigureDisks() */ -#endif disks = &raidPtr->Disks[0][raidPtr->numCol]; for (i=0; i<raidPtr->numSpare; i++) { @@ -410,14 +292,12 @@ int rf_ConfigureSpareDisks( } num_spares_done++; } -#ifndef SIMULATE #if defined(__NetBSD__) && (_KERNEL) #else rf_SCSI_FreeDiskOp(rdcap_op, 1); rdcap_op = NULL; rf_SCSI_FreeDiskOp(tur_op, 0); tur_op = NULL; #endif -#endif /* !SIMULATE */ /* check sizes and block sizes on spare disks */ bs = 1 << raidPtr->logBytesPerSector; @@ -442,7 +322,6 @@ int rf_ConfigureSpareDisks( return(0); fail: -#ifndef SIMULATE #if defined(__NetBSD__) && defined(_KERNEL) /* Release the hold on the main components. We've failed to allocate a @@ -479,7 +358,6 @@ fail: #endif -#endif /* !SIMULATE */ return(ret); } @@ -497,23 +375,13 @@ int rf_ConfigureDisk(raidPtr, buf, diskPtr, rdcap_op, tur_op, dev, row, col) RF_RowCol_t col; { char *p; -#ifdef SIMULATE - double init_offset; -#else /* SIMULATE */ -#if defined(__NetBSD__) && defined(_KERNEL) int retcode; -#else - int busid, targid, lun, retcode; -#endif -#endif /* SIMULATE */ -#if defined(__NetBSD__) && defined(_KERNEL) struct partinfo dpart; struct vnode *vp; struct vattr va; struct proc *proc; int error; -#endif retcode = 0; p = rf_find_non_white(buf); @@ -523,18 +391,6 @@ retcode = 0; } (void) strcpy(diskPtr->devname, p); -#ifdef SIMULATE - - init_offset = 0.0; - rf_InitDisk(&diskPtr->diskState, disk_db_file_name,diskPtr->devname,0,0,init_offset,row,col); - rf_GeometryDoReadCapacity(&diskPtr->diskState, &diskPtr->numBlocks, &diskPtr->blockSize); - diskPtr->numBlocks = diskPtr->numBlocks * rf_sizePercentage / 100; - - /* we allow the user to specify that only a fraction of the disks should be used - * this is just for debug: it speeds up the parity scan - */ - -#else /* SIMULATE */ #ifndef __NetBSD__ /* get bus, target, lun */ retcode = rf_extract_ids(p, &busid, &targid, &lun); @@ -563,7 +419,6 @@ retcode = 0; diskPtr->numBlocks = diskPtr->numBlocks * rf_sizePercentage / 100; } #endif -#if defined(__NetBSD__) && defined(_KERNEL) proc = raidPtr->proc; /* XXX Yes, this is not nice.. */ @@ -619,30 +474,6 @@ retcode = 0; } -#endif /* !__NetBSD__ */ -#endif /* SIMULATE */ - return(0); } -#ifdef SIMULATE - -void rf_default_disk_names() -{ - sprintf(disk_db_file_name,"disk.db"); - sprintf(disk_type_name,"HP2247"); -} - -void rf_set_disk_db_name(s) - char *s; -{ - strcpy(disk_db_file_name,s); -} - -void rf_set_disk_type_name(s) - char *s; -{ - strcpy(disk_type_name,s); -} - -#endif /* SIMULATE */ diff --git a/sys/dev/raidframe/rf_disks.h b/sys/dev/raidframe/rf_disks.h index 145acd97edb..05e367ee9de 100644 --- a/sys/dev/raidframe/rf_disks.h +++ b/sys/dev/raidframe/rf_disks.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_disks.h,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_disks.h,v 1.2 1999/01/26 02:33:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,58 +30,6 @@ * rf_disks.h -- header file for code related to physical disks */ -/* : - * Log: rf_disks.h,v - * Revision 1.15 1996/08/20 23:05:13 jimz - * add nreads, nwrites to RaidDisk - * - * Revision 1.14 1996/06/17 03:20:15 jimz - * increase devname len to 56 - * - * Revision 1.13 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.12 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 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.9 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.8 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.7 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.6 1996/05/02 22:06:57 jimz - * add RF_RaidDisk_t - * - * Revision 1.5 1995/12/01 15:56:53 root - * added copyright info - * - */ - #ifndef _RF__RF_DISKS_H_ #define _RF__RF_DISKS_H_ @@ -89,9 +37,6 @@ #include "rf_archs.h" #include "rf_types.h" -#ifdef SIMULATE -#include "rf_geometry.h" -#endif /* SIMULATE */ /* * A physical disk can be in one of several states: @@ -121,9 +66,6 @@ struct RF_RaidDisk_s { kernel doesn't know about it!! (and it messes up the size of the structure, so there is a communication problem between the kernel and the userland utils :-( GO */ -#if defined(SIMULATE) && !defined(RF_UTILITY) - RF_DiskState_t diskState; /* the name of the disk as used in the disk module */ -#endif /* SIMULATE */ #if RF_KEEP_DISKSTATS > 0 RF_uint64 nreads; RF_uint64 nwrites; @@ -151,10 +93,4 @@ int rf_ConfigureDisk(RF_Raid_t *raidPtr, char *buf, RF_RaidDisk_t *diskPtr, RF_DiskOp_t *rdcap_op, RF_DiskOp_t *tur_op, dev_t dev, RF_RowCol_t row, RF_RowCol_t col); -#ifdef SIMULATE -void rf_default_disk_names(void); -void rf_set_disk_db_name(char *s); -void rf_set_disk_type_name(char *s); -#endif /* SIMULATE */ - #endif /* !_RF__RF_DISKS_H_ */ diff --git a/sys/dev/raidframe/rf_diskthreads.h b/sys/dev/raidframe/rf_diskthreads.h index b5ee54652d7..db18000ee75 100644 --- a/sys/dev/raidframe/rf_diskthreads.h +++ b/sys/dev/raidframe/rf_diskthreads.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_diskthreads.h,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_diskthreads.h,v 1.2 1999/01/26 02:33:56 oster Exp $ */ /* * rf_diskthreads.h */ @@ -28,44 +28,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_diskthreads.h,v - * Revision 1.7 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.6 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.5 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.4 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.3 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.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:55:58 jimz - * Initial revision - * - */ + /* * rf_diskthreads.h -- types and prototypes for disk thread system */ @@ -82,21 +45,11 @@ struct RF_DiskId_s { RF_RaidDisk_t *disk; int fd; /* file descriptor */ RF_RowCol_t row, col; /* debug only */ -#ifdef SIMULATE - int state; -#endif /* SIMULATE */ }; int rf_ConfigureDiskThreads(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, RF_Config_t *cfgPtr); -#ifdef SIMULATE -int rf_SetDiskIdle(RF_Raid_t *raidPtr, RF_RowCol_t r, RF_RowCol_t c); -int rf_ScanDiskQueues(RF_Raid_t *raidPtr); -void rf_simulator_complete_io(RF_DiskId_t *id); -void rf_PrintDiskStat(RF_Raid_t *raidPtr); -#else /* SIMULATE */ int rf_ShutdownDiskThreads(RF_Raid_t *raidPtr); -#endif /* SIMULATE */ #endif /* !_RF__RF_DISKTHREADS_H_ */ diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c index 5266010ea1a..170e22f376e 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.3 1999/01/15 17:55:52 explorer Exp $ */ +/* $NetBSD: rf_driver.c,v 1.4 1999/01/26 02:33:56 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -35,581 +35,18 @@ * ******************************************************************************/ -/* - * : - * Log: rf_driver.c,v - * Revision 1.147 1996/08/21 04:12:46 jimz - * added hook for starting out req_hist w/ more distributed values - * (currently not done) - * - * Revision 1.146 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.145 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.144 1996/07/27 18:40:24 jimz - * cleanup sweep - * - * Revision 1.143 1996/07/22 21:11:53 jimz - * fix formatting on DoAccess error msg - * - * Revision 1.142 1996/07/19 16:10:06 jimz - * added call to rf_ResetDebugOptions() in rf_ConfigureDebug() - * - * Revision 1.141 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.140 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.139 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.138 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.137 1996/07/10 22:28:00 jimz - * get rid of obsolete row statuses (dead,degraded2) - * - * Revision 1.136 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.135 1996/06/17 03:20:32 jimz - * move out raidframe_attr_default - * don't monkey with stack sizes - * - * Revision 1.134 1996/06/14 23:15:38 jimz - * attempt to deal with thread GC problem - * - * Revision 1.133 1996/06/14 21:24:08 jimz - * new ConfigureEtimer init - * moved out timer vars - * - * Revision 1.132 1996/06/14 16:19:03 jimz - * remove include of pdllib.h (beginning of PDL cleanup) - * - * Revision 1.131 1996/06/14 14:35:24 jimz - * clean up dfstrace protection - * - * Revision 1.130 1996/06/14 14:16:09 jimz - * engine config is now array-specific - * - * Revision 1.129 1996/06/13 19:08:10 jimz - * add debug var to force keep_acc_totals on - * - * Revision 1.128 1996/06/11 10:57:08 jimz - * init recon_done_proc_mutex - * - * Revision 1.127 1996/06/10 14:18:58 jimz - * move user, throughput stats into per-array structure - * - * Revision 1.126 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.125 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.124 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.123 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.122 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.121 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.120 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.119 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.118 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.117 1996/05/30 16:28:33 jimz - * typo in rf_SignalQuiescenceLock() fixed - * - * Revision 1.116 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.115 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.114 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.113 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.112 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.111 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.110 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.109 1996/05/23 00:39:56 jimz - * demoMode -> rf_demoMode - * - * Revision 1.108 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.107 1996/05/21 14:30:04 jimz - * idler_desc_mutex should be ifndef SIMULATE - * - * Revision 1.106 1996/05/20 19:31:12 jimz - * add atomic debug (mutex and cond leak finder) stuff - * - * Revision 1.105 1996/05/20 16:12:45 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.104 1996/05/18 20:09:41 jimz - * bit of cleanup to compile cleanly in kernel, once again - * - * Revision 1.103 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.102 1996/05/16 21:20:51 jimz - * use FREELIST stuff to manage access descriptors - * - * Revision 1.101 1996/05/16 14:21:10 jimz - * remove bogus copies from write path on user - * - * Revision 1.100 1996/05/15 22:33:54 jimz - * appropriately #ifdef cache stuff - * - * Revision 1.99 1996/05/08 21:34:41 jimz - * #if 0 ShutdownCache() and ConfigureCache() - * - * Revision 1.98 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.97 1996/05/07 19:02:58 wvcii - * corrected header comment of rf_DoAccess() - * reordered free of desc in FreeRaidAccDesc() The desc is now - * freed last. - * - * Revision 1.96 1996/05/07 17:40:50 jimz - * add doDebug - * - * Revision 1.95 1996/05/06 21:35:23 jimz - * fixed ordering of cleanup and removed extra decrement of configureCount - * - * Revision 1.94 1996/05/06 18:44:14 jimz - * reorder cleanup to not blow alloclist out from under various modules - * zero raidPtr contents on config - * - * Revision 1.93 1996/05/04 17:06:53 jimz - * Fail the I/O with ENOSPC if reading past end of the array in the kernel. - * - * Revision 1.92 1996/05/03 19:44:22 wvcii - * debug vars degDagDebug and enableAtomicRMW now defined - * in this file. - * - * Revision 1.91 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.90 1995/12/08 15:07:03 arw - * cache code cleanup - * - * Revision 1.89 1995/12/06 20:53:58 wvcii - * created debug var forceParityLogReint - * this variable forces reintegration of all parity logs at shutdown - * - * Revision 1.88 1995/12/01 15:59:10 root - * added copyright info - * - * Revision 1.87 1995/11/28 21:34:02 amiri - * modified SetReconfiguredMode so that it installs the - * spare table only if arch is declustered based on block designs - * - * Revision 1.86 1995/11/21 23:06:11 amiri - * added division by zero check in printing - * throughput stats. - * - * Revision 1.85 1995/11/19 16:27:25 wvcii - * disableParityVerify now defined locally, only read from config - * file for !KERNEL compiles - * - * Revision 1.84 1995/11/17 15:08:31 wvcii - * added debug var disableParityVerify - * used in RealLoopTest to disable parity verification - * - * Revision 1.83 1995/11/07 15:48:43 wvcii - * deleted debug vars: suppressAtomicRMW, enableRollAway, concatDagDebug - * deleted debug vars: debugSelectUnit, debugSelectBlock - * added debug var: enableAtomicRMW - * - * Revision 1.82 1995/10/18 19:28:45 amiri - * added support for reconstruction demos in the - * simulator, by updating some simulator - * variables in Faildisk. - * - * Revision 1.81 1995/10/09 18:36:33 jimz - * move rf_StopThroughputStats() into FreeAccDesc() - * changed throughput output print format - * added user-level copy to write path to emulate kernel hack - * - * Revision 1.80 1995/10/09 18:07:47 wvcii - * moved call to rf_StopThroughputStats to rf_states.c - * - * Revision 1.79 1995/10/09 17:38:53 jimz - * quiesce an array for user-level testing before shutting it down - * (should this also be done in the kernel?) - * - * Revision 1.78 1995/10/09 15:35:43 wvcii - * added code to measure throughput in user mode - * - * Revision 1.77 1995/10/05 06:18:59 jimz - * Changed DDEventRequest() to take additional arg, used by simulator - * to cache diskid so queue length can be decremented on io complete - * (this is a hack to get around the fact that the event mechanism - * assumes it can dereference arbitrary handles on enqueued events) - * - * Revision 1.76 1995/10/04 07:25:10 jimz - * turn off bigstacks by default - * - * Revision 1.75 1995/10/04 07:24:34 jimz - * code for bigstacks in user process - * - * Revision 1.74 1995/09/26 21:42:51 wvcii - * removed calls to ConfigureCache, ShutdownCache when building kernel - * kernel currently does not support any cached architectures - * - * Revision 1.73 1995/09/20 21:05:35 jimz - * add missing unit arg to IO_BUF_ERR() in non-kernel case - * - * Revision 1.72 1995/09/19 23:02:44 jimz - * call RF_DKU_END_IO in the appropriate places - * - * Revision 1.71 1995/09/07 19:02:31 jimz - * mods to get raidframe to compile and link - * in kernel environment - * - * Revision 1.70 1995/09/06 19:24:01 wvcii - * added debug vars enableRollAway and debugRecovery - * - * Revision 1.69 1995/08/24 19:25:36 rachad - * Fixes to LSS GC in the simulater - * - * Revision 1.68 1995/07/28 21:43:42 robby - * checkin after leaving for Rice. Bye - * - * Revision 1.67 1995/07/26 18:06:52 cfb - * *** empty log message *** - * - * Revision 1.66 1995/07/26 03:25:24 robby - * fixed accesses mutex and updated call to ConfigureCache - * - * Revision 1.65 1995/07/25 14:36:52 rachad - * *** empty log message *** - * - * Revision 1.64 1995/07/21 19:29:05 robby - * added total_accesses - * - * Revision 1.63 1995/07/20 19:43:35 cfb - * *** empty log message *** - * - * Revision 1.62 1995/07/20 16:10:24 rachad - * *** empty log message *** - * - * Revision 1.61 1995/07/20 03:36:53 rachad - * Added suport for cache warming - * - * Revision 1.60 1995/07/17 22:31:31 cfb - * *** empty log message *** - * - * Revision 1.59 1995/07/16 17:02:23 cfb - * *** empty log message *** - * - * Revision 1.58 1995/07/16 15:19:27 cfb - * *** empty log message *** - * - * Revision 1.57 1995/07/16 03:17:01 cfb - * *** empty log message *** - * - * Revision 1.56 1995/07/13 16:11:59 cfb - * *** empty log message *** - * - * Revision 1.55 1995/07/13 15:42:40 cfb - * added cacheDebug variable ... - * - * Revision 1.54 1995/07/13 14:28:27 rachad - * *** empty log message *** - * - * Revision 1.53 1995/07/10 21:48:52 robby - * added virtualStripingWarnings - * - * Revision 1.52 1995/07/10 20:41:13 rachad - * *** empty log message *** - * - * Revision 1.51 1995/07/09 19:46:49 cfb - * Added cache Shutdown - * - * Revision 1.50 1995/07/08 21:38:53 rachad - * Added support for interactive traces - * in the simulator - * - * Revision 1.49 1995/07/08 18:05:39 rachad - * Linked up Claudsons code with the real cache - * - * Revision 1.48 1995/07/07 16:00:22 cfb - * Added initialization of cacheDesc to AllocRaidAccDesc - * - * Revision 1.47 1995/07/06 14:22:37 rachad - * Merge complete - * - * Revision 1.46.50.2 1995/06/21 17:48:30 robby - * test - * - * Revision 1.46.50.1 1995/06/21 17:34:49 robby - * branching to work on "meta-dag" capabilities - * - * Revision 1.46.10.5 1995/07/03 21:58:34 holland - * added support for suppressing both stripe locks & large writes - * - * Revision 1.46.10.4 1995/06/27 03:42:48 holland - * typo fix - * - * Revision 1.46.10.3 1995/06/27 03:31:42 holland - * prototypes - * - * Revision 1.46.10.2 1995/06/27 03:17:57 holland - * fixed callback bug in kernel rf_DoAccess - * - * Revision 1.46.10.1 1995/06/25 14:32:44 holland - * initial checkin on new branch - * - * Revision 1.46 1995/06/13 17:52:41 holland - * added UserStats stuff - * - * Revision 1.45 1995/06/13 16:03:41 rachad - * *** empty log message *** - * - * Revision 1.44 1995/06/12 15:54:40 rachad - * Added garbege collection for log structured storage - * - * Revision 1.43 1995/06/09 18:01:09 holland - * various changes related to in-kernel recon, multiple-row arrays, - * trace extraction from kernel, etc. - * - * Revision 1.42 1995/06/08 19:52:28 rachad - * *** empty log message *** - * - * Revision 1.41 1995/06/08 00:11:49 robby - * added a debug variable -- showVirtualSizeRequirements - * - * Revision 1.40 1995/06/05 00:33:30 holland - * protectedSectors bug fix - * - * Revision 1.39 1995/06/01 22:45:03 holland - * made compilation of parity logging and virtual striping - * stuff conditional on some constants defined in rf_archs.h - * - * Revision 1.38 1995/06/01 21:52:37 holland - * replaced NULL sizes in calls to Free() by -1, and caused this - * to suppress the size-mismatch error - * - * Revision 1.37 1995/05/26 20:04:54 wvcii - * modified parity logging debug vars - * - * Revision 1.36 95/05/21 15:32:41 wvcii - * added debug vars: parityLogDebug, numParityRegions, numParityLogs, - * numReintegrationThreads - * - * Revision 1.35 95/05/19 20:58:21 holland - * cleanups on error cases in rf_DoAccess - * - * Revision 1.34 1995/05/16 17:35:53 holland - * added rf_copyback_in_progress. this is debug-only. - * - * Revision 1.33 1995/05/15 12:25:35 holland - * bug fix in test code: no stripe locks were getting acquired in RAID0 mode - * - * Revision 1.32 1995/05/10 18:54:12 holland - * bug fixes related to deadlock problem at time of disk failure - * eliminated read-op-write code - * beefed up parity checking in loop test - * various small changes & new ASSERTs - * - * Revision 1.31 1995/05/02 22:49:02 holland - * add shutdown calls for each architecture - * - * Revision 1.30 1995/05/01 14:43:37 holland - * merged changes from Bill - * - * Revision 1.29 1995/05/01 13:28:00 holland - * parity range locks, locking disk requests, recon+parityscan in kernel, etc. - * - * Revision 1.28 1995/04/24 13:25:51 holland - * rewrite to move disk queues, recon, & atomic RMW to kernel - * - * Revision 1.27 1995/04/06 14:47:56 rachad - * merge completed - * - * Revision 1.26 1995/04/03 20:32:35 rachad - * added reconstruction to simulator - * - * Revision 1.25.10.2 1995/04/03 20:41:00 holland - * misc changes related to distributed sparing - * - * Revision 1.25.10.1 1995/03/17 20:04:01 holland - * initial checkin on new branch - * - * Revision 1.25 1995/03/15 20:34:30 holland - * changes for distributed sparing. - * - * Revision 1.24 1995/03/09 19:53:05 rachad - * *** empty log message *** - * - * Revision 1.23 1995/03/03 18:36:16 rachad - * Simulator mechanism added - * - * Revision 1.22 1995/03/01 20:25:48 holland - * kernelization changes - * - * Revision 1.21 1995/02/17 19:39:56 holland - * added size param to all calls to Free(). - * this is ignored at user level, but necessary in the kernel. - * - * Revision 1.20 1995/02/17 13:37:49 holland - * kernelization changes -- not yet complete - * - * Revision 1.19 1995/02/10 18:08:07 holland - * fixed a few things I broke during kernelization - * - * Revision 1.18 1995/02/10 17:34:10 holland - * kernelization changes - * - * Revision 1.17 1995/02/04 15:51:35 holland - * kernelization changes - * - * Revision 1.16 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.15 1995/02/01 15:13:05 holland - * moved #include of general.h out of raid.h and into each file - * - * Revision 1.14 1995/02/01 14:25:19 holland - * began changes for kernelization: - * changed all instances of mutex_t and cond_t to DECLARE macros - * converted configuration code to use config structure - * - * Revision 1.13 1995/01/30 14:53:46 holland - * extensive changes related to making DoIO non-blocking - * - * Revision 1.12 1995/01/25 00:26:21 holland - * eliminated support for aio - * - * Revision 1.11 1995/01/24 23:58:46 holland - * multi-way recon XOR, plus various small changes - * - * Revision 1.10 1995/01/11 19:27:02 holland - * various changes related to performance tuning - * - * Revision 1.9 1994/12/05 15:29:09 holland - * added trace run time limitation (maxTraceRunTimeSec) - * - * Revision 1.8 1994/12/05 04:18:12 holland - * various new control vars in the config file - * - * Revision 1.7 1994/11/29 23:11:36 holland - * tracerec bug on dag retry fixed - * - * Revision 1.6 1994/11/29 22:11:38 danner - * holland updates - * - * Revision 1.5 1994/11/29 21:09:47 danner - * Detailed tracing support (holland). - * - * Revision 1.4 1994/11/29 20:36:02 danner - * Added suppressAtomicRMW option. - * - * Revision 1.3 1994/11/21 15:34:06 danner - * Added ConfigureAllocList() call. - * - */ -#ifdef _KERNEL -#define KERNEL -#endif - -#if defined(__NetBSD__) && defined(_KERNEL) #include <sys/types.h> #include <sys/param.h> #include <sys/systm.h> #include <sys/ioctl.h> #include <sys/fcntl.h> #include <sys/vnode.h> -#endif -#ifdef KERNEL -#ifndef __NetBSD__ -#include <dkusage.h> -#include <dfstrace.h> -#endif /* !__NetBSD__ */ -#endif /* KERNEL */ #include "rf_archs.h" #include "rf_threadstuff.h" -#ifndef KERNEL -#include <stdio.h> -#include <stdlib.h> -#endif /* KERNEL */ - #include <sys/errno.h> #include "rf_raid.h" @@ -648,20 +85,7 @@ #include "rf_sys.h" #include "rf_cpuutil.h" -#ifdef SIMULATE -#include "rf_diskevent.h" -#endif /* SIMULATE */ - -#ifdef KERNEL #include <sys/buf.h> -#ifndef __NetBSD__ -#include <io/common/devdriver.h> -#endif /* !__NetBSD__ */ - -#if DFSTRACE > 0 -#include <sys/dfs_log.h> -#include <sys/dfstracebuf.h> -#endif /* DFSTRACE > 0 */ #if DKUSAGE > 0 #include <sys/dkusage.h> @@ -670,7 +94,6 @@ #include <io/cam/cam.h> #include <io/cam/pdrv.h> #endif /* DKUSAGE > 0 */ -#endif /* KERNEL */ #if RF_DEMO > 0 #include "rf_demo.h" @@ -700,23 +123,11 @@ static int rf_ConfigureRDFreeList(RF_ShutdownList_t **); RF_DECLARE_MUTEX(rf_printf_mutex) /* debug only: avoids interleaved printfs by different stripes */ RF_DECLARE_GLOBAL_THREADID /* declarations for threadid.h */ -#if !defined(KERNEL) && !defined(SIMULATE) -static int rf_InitThroughputStats(RF_ShutdownList_t **listp, RF_Raid_t *raidPtr, RF_Config_t *cfgPtr); -static void rf_StopThroughputStats(RF_Raid_t *raidPtr); -static void rf_PrintThroughputStats(RF_Raid_t *raidPtr); -#endif /* !KERNEL && !SIMULATE */ -#ifdef KERNEL #define SIGNAL_QUIESCENT_COND(_raid_) wakeup(&((_raid_)->accesses_suspended)) -#ifndef __NetBSD__ -#define WAIT_FOR_QUIESCENCE(_raid_) \ - mpsleep(&((_raid_)->accesses_suspended), PZERO, "raidframe quiesce", 0, \ - (void *) simple_lock_addr((_raid_)->access_suspend_mutex), MS_LOCK_SIMPLE) -#else #define WAIT_FOR_QUIESCENCE(_raid_) \ tsleep(&((_raid_)->accesses_suspended),PRIBIO|PCATCH,"raidframe quiesce", 0); -#endif #if DKUSAGE > 0 #define IO_BUF_ERR(bp, err, unit) { \ bp->b_flags |= B_ERROR; \ @@ -734,13 +145,6 @@ static void rf_PrintThroughputStats(RF_Raid_t *raidPtr); biodone(bp); \ } #endif /* DKUSAGE > 0 */ -#else /* KERNEL */ - -#define SIGNAL_QUIESCENT_COND(_raid_) RF_SIGNAL_COND((_raid_)->quiescent_cond) -#define WAIT_FOR_QUIESCENCE(_raid_) RF_WAIT_COND((_raid_)->quiescent_cond, (_raid_)->access_suspend_mutex) -#define IO_BUF_ERR(bp, err, unit) - -#endif /* KERNEL */ static int configureCount=0; /* number of active configurations */ static int isconfigged=0; /* is basic raidframe (non per-array) stuff configged */ @@ -753,9 +157,6 @@ static int rf_ConfigureRDFreeList(RF_ShutdownList_t **listp); /* called at system boot time */ int rf_BootRaidframe() { -#if 0 - long stacksize; -#endif int rc; if (raidframe_booted) @@ -769,25 +170,6 @@ int rf_BootRaidframe() rf_setup_threadid(); rf_assign_threadid(); -#if !defined(KERNEL) && !defined(SIMULATE) - if (RF_THREAD_ATTR_CREATE(raidframe_attr_default)) { - fprintf(stderr, "Unable to create default thread attr\n"); - exit(1); - } -#if 0 - stacksize = RF_THREAD_ATTR_GETSTACKSIZE(raidframe_attr_default); - if (stacksize < 0) { - fprintf(stderr, "Unable to get stack size of default thread attr\n"); - exit(1); - } - stacksize += 16384; - rc = RF_THREAD_ATTR_SETSTACKSIZE(raidframe_attr_default, stacksize); - if (rc) { - fprintf(stderr, "Unable to set stack size of default thread attr\n"); - exit(1); - } -#endif /* 0 */ -#endif /* !KERNEL && !SIMULATE */ rc = rf_mutex_init(&configureMutex); if (rc) { RF_ERRORMSG3("Unable to init mutex file %s line %d rc=%d\n", __FILE__, @@ -863,14 +245,9 @@ static void rf_UnconfigureArray() int rf_Shutdown(raidPtr) RF_Raid_t *raidPtr; { -#if !defined(__NetBSD) && !defined(_KERNEL) - int rc; -#endif int r,c; -#if defined(__NetBSD__) && defined(_KERNEL) struct proc *p; -#endif if (!raidPtr->valid) { RF_ERRORMSG("Attempt to shut down unconfigured RAIDframe driver. Aborting shutdown\n"); @@ -896,18 +273,9 @@ int rf_Shutdown(raidPtr) } RF_FREELIST_DO_UNLOCK(rf_rad_freelist); -#if !defined(KERNEL) && !defined(SIMULATE) - rf_PrintThroughputStats(raidPtr); -#endif /* !KERNEL && !SIMULATE */ - raidPtr->valid = 0; -#if !defined(KERNEL) && !defined(SIMULATE) - rf_TerminateDiskQueues(raidPtr); /* tell all disk queues to release any waiting threads */ - rf_ShutdownDiskThreads(raidPtr); /* wait for all threads to exit */ -#endif /* !KERNEL && !SIMULATE */ -#if defined(__NetBSD__) && defined(_KERNEL) /* We take this opportunity to close the vnodes like we should.. */ p = raidPtr->proc; /* XXX */ @@ -935,7 +303,6 @@ int rf_Shutdown(raidPtr) } -#endif rf_ShutdownList(&raidPtr->shutdownList); @@ -1027,10 +394,6 @@ int rf_Configure(raidPtr, cfgPtr) */ rf_ConfigureDebug(cfgPtr); DO_INIT_CONFIGURE(rf_ConfigureDebugMem); -#ifdef SIMULATE - rf_default_disk_names(); - DO_INIT_CONFIGURE(rf_DDEventInit); -#endif /* SIMULATE */ DO_INIT_CONFIGURE(rf_ConfigureAccessTrace); DO_INIT_CONFIGURE(rf_ConfigureMapModule); DO_INIT_CONFIGURE(rf_ConfigureReconEvent); @@ -1040,11 +403,9 @@ int rf_Configure(raidPtr, cfgPtr) DO_INIT_CONFIGURE(rf_ConfigureNWayXor); DO_INIT_CONFIGURE(rf_ConfigureStripeLockFreeList); DO_INIT_CONFIGURE(rf_ConfigureMCPair); -#ifndef SIMULATE #if !defined(__NetBSD__) DO_INIT_CONFIGURE(rf_ConfigureCamLayer); #endif -#endif /* !SIMULATE */ DO_INIT_CONFIGURE(rf_ConfigureDAGs); DO_INIT_CONFIGURE(rf_ConfigureDAGFuncs); DO_INIT_CONFIGURE(rf_ConfigureDebugPrint); @@ -1062,15 +423,11 @@ int 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 */ -#if defined(__NetBSD__) && defined(_KERNEL) unit = raidPtr->raidid; p = raidPtr->proc; /* XXX save these... */ -#endif bzero((char *)raidPtr, sizeof(RF_Raid_t)); -#if defined(__NetBSD__) && defined(_KERNEL) raidPtr->raidid = unit; raidPtr->proc = p; /* XXX and then recover them..*/ -#endif DO_RAID_MUTEX(&raidPtr->mutex); /* set up the cleanup list. Do this after ConfigureDebug so that value of memDebug will be set */ @@ -1094,7 +451,6 @@ int rf_Configure(raidPtr, cfgPtr) raidPtr->numCol = cfgPtr->numCol; raidPtr->numSpare = cfgPtr->numSpare; -#if defined(__NetBSD__) && defined(_KERNEL) /* XXX we don't even pretend to support more than one row in the kernel... */ if (raidPtr->numRow != 1) { @@ -1102,7 +458,6 @@ int rf_Configure(raidPtr, cfgPtr) DO_RAID_FAIL(); return(EINVAL); } -#endif @@ -1125,10 +480,6 @@ int rf_Configure(raidPtr, cfgPtr) } DO_RAID_INIT_CONFIGURE(rf_ConfigureEngine); -#if !defined(KERNEL) && !defined(SIMULATE) - DO_RAID_INIT_CONFIGURE(rf_InitThroughputStats); -#endif /* !KERNEL && !SIMULATE */ - DO_RAID_INIT_CONFIGURE(rf_ConfigureStripeLocks); DO_RAID_COND(&raidPtr->outstandingCond); @@ -1146,9 +497,6 @@ int rf_Configure(raidPtr, cfgPtr) DO_RAID_INIT_CONFIGURE(rf_ConfigureSpareDisks); /* do this after ConfigureDisks & ConfigureSpareDisks to be sure dev no. is set */ DO_RAID_INIT_CONFIGURE(rf_ConfigureDiskQueues); -#ifndef KERNEL - DO_RAID_INIT_CONFIGURE(rf_ConfigureDiskThreads); -#endif /* !KERNEL */ DO_RAID_INIT_CONFIGURE(rf_ConfigureLayout); @@ -1280,9 +628,6 @@ RF_RaidAccessDesc_t *rf_AllocRaidAccDesc( desc->cleanupList = NULL; rf_MakeAllocList(desc->cleanupList); rf_get_threadid(desc->tid); -#ifdef SIMULATE - desc->owner = rf_GetCurrentOwner(); -#endif /* SIMULATE */ return(desc); } @@ -1292,10 +637,6 @@ void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *desc) RF_ASSERT(desc); -#if !defined(KERNEL) && !defined(SIMULATE) - rf_StopThroughputStats(raidPtr); -#endif /* !KERNEL && !SIMULATE */ - rf_FreeAllocList(desc->cleanupList); RF_FREELIST_FREE_CLEAN_NOUNLOCK(rf_rad_freelist,desc,next,clean_rad); raidPtr->nAccOutstanding--; @@ -1305,13 +646,6 @@ void rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *desc) RF_FREELIST_DO_UNLOCK(rf_rad_freelist); } -#ifdef JIMZ -#define THREAD_NUMDESC 1024 -#define THREAD_NUM 600 -static RF_RaidAccessDesc_t *dest_hist[THREAD_NUM*THREAD_NUMDESC]; -int jimz_access_num[THREAD_NUM]; -#endif /* JIMZ */ - /********************************************************************* * Main routine for performing an access. * Accesses are retried until a DAG can not be selected. This occurs @@ -1341,14 +675,10 @@ bp_in is a buf pointer. void * to facilitate ignoring it outside the kernel int tid; RF_RaidAccessDesc_t *desc; caddr_t lbufPtr = bufPtr; -#ifdef KERNEL struct buf *bp = (struct buf *) bp_in; #if DFSTRACE > 0 struct { RF_uint64 raidAddr; int numBlocks; char type;} dfsrecord; #endif /* DFSTRACE > 0 */ -#else /* KERNEL */ - void *bp = bp_in; -#endif /* KERNEL */ raidAddress += rf_raidSectorOffset; @@ -1387,7 +717,6 @@ bp_in is a buf pointer. void * to facilitate ignoring it outside the kernel printf("DoAccess: raid addr %lu too large to access %lu sectors. Max legal addr is %lu\n", (u_long)raidAddress,(u_long)numBlocks,(u_long)raidPtr->totalSectors); -#ifdef KERNEL if (type == RF_IO_TYPE_READ) { IO_BUF_ERR(bp, ENOSPC, raidPtr->raidid); return(ENOSPC); @@ -1395,17 +724,8 @@ bp_in is a buf pointer. void * to facilitate ignoring it outside the kernel IO_BUF_ERR(bp, ENOSPC, raidPtr->raidid); return(ENOSPC); } -#elif defined(SIMULATE) - RF_PANIC(); -#else /* SIMULATE */ - return(EIO); -#endif /* SIMULATE */ } -#if !defined(KERNEL) && !defined(SIMULATE) - rf_StartThroughputStats(raidPtr); -#endif /* !KERNEL && !SIMULATE */ - desc = rf_AllocRaidAccDesc(raidPtr, type, raidAddress, numBlocks, lbufPtr, bp, paramDAG, paramASM, flags, cbF, cbA, raidPtr->Layout.map->states); @@ -1413,35 +733,13 @@ bp_in is a buf pointer. void * to facilitate ignoring it outside the kernel if (desc == NULL) { return(ENOMEM); } -#ifdef JIMZ - dest_hist[(tid*THREAD_NUMDESC)+jimz_access_num[tid]]; jimz_access_num[tid]++; -#endif /* JIMZ */ RF_ETIMER_START(desc->tracerec.tot_timer); desc->async_flag = async_flag; -#ifdef SIMULATE - /* simulator uses paramDesc to continue dag from test function */ - - *paramDesc=desc; - - return(0); -#endif /* SIMULATE */ - rf_ContinueRaidAccess(desc); -#ifndef KERNEL - if (!(flags & RF_DAG_NONBLOCKING_IO)) { - RF_LOCK_MUTEX(desc->mutex); - while (!(desc->flags & RF_DAG_ACCESS_COMPLETE)) { - RF_WAIT_COND(desc->cond, desc->mutex); - } - RF_UNLOCK_MUTEX(desc->mutex); - rf_FreeRaidAccDesc(desc); - } -#endif /* !KERNEL */ - return(0); } @@ -1484,41 +782,11 @@ int rf_FailDisk( raidPtr->Disks[frow][fcol].status = rf_ds_failed; raidPtr->status[frow] = rf_rs_degraded; RF_UNLOCK_MUTEX(raidPtr->mutex); -#ifdef SIMULATE -#if RF_DEMO > 0 - if (rf_demoMode) { - rf_demo_update_mode (RF_DEMO_DEGRADED); - fail_col = fcol; fail_row = frow; - fail_time = rf_CurTime(); /* XXX */ - if (initRecon) - delayed_recon = RF_TRUE; - } - else { - if (initRecon) - rf_ReconstructFailedDisk(raidPtr, frow, fcol); - } -#else /* RF_DEMO > 0 */ - if (initRecon) - rf_ReconstructFailedDisk(raidPtr, frow, fcol); -#endif /* RF_DEMO > 0 */ -#else /* SIMULATE */ if (initRecon) rf_ReconstructFailedDisk(raidPtr, frow, fcol); -#endif /* SIMULATE */ return(0); } -#ifdef SIMULATE -extern RF_Owner_t recon_owner; - -void rf_ScheduleContinueReconstructFailedDisk(reconDesc) - RF_RaidReconDesc_t *reconDesc; -{ - rf_DDEventRequest(rf_CurTime(), rf_ContinueReconstructFailedDisk, - (void *) reconDesc, recon_owner, -4, -4, reconDesc->raidPtr, NULL); -} -#endif /* SIMULATE */ - /* releases a thread that is waiting for the array to become quiesced. * access_suspend_mutex should be locked upon calling this */ @@ -1535,13 +803,7 @@ void rf_SignalQuiescenceLock(raidPtr, reconDesc) raidPtr->access_suspend_release = 1; if (raidPtr->waiting_for_quiescence) { -#ifndef SIMULATE SIGNAL_QUIESCENT_COND(raidPtr); -#else /* !SIMULATE */ - if (reconDesc) { - rf_ScheduleContinueReconstructFailedDisk(reconDesc); - } -#endif /* !SIMULATE */ } } @@ -1556,7 +818,6 @@ int rf_SuspendNewRequestsAndWait(raidPtr) raidPtr->accesses_suspended++; raidPtr->waiting_for_quiescence = (raidPtr->accs_in_flight == 0) ? 0 : 1; -#ifndef SIMULATE if (raidPtr->waiting_for_quiescence) { raidPtr->access_suspend_release=0; while (!raidPtr->access_suspend_release) { @@ -1566,7 +827,6 @@ int rf_SuspendNewRequestsAndWait(raidPtr) } } printf("Quiesence reached..\n"); -#endif /* !SIMULATE */ RF_UNLOCK_MUTEX(raidPtr->access_suspend_mutex); return (raidPtr->waiting_for_quiescence); @@ -1646,7 +906,7 @@ static void rf_ConfigureDebug(cfgPtr) #define TIMEVAL_TO_US(t) (((long) t.tv_sec) * 1000000L + (long) t.tv_usec) -#if !defined(KERNEL) && !defined(SIMULATE) +#if !defined(_KERNEL) && !defined(SIMULATE) /* * Throughput stats currently only used in user-level RAIDframe diff --git a/sys/dev/raidframe/rf_driver.h b/sys/dev/raidframe/rf_driver.h index 72db6ad49b7..0c8e7175d55 100644 --- a/sys/dev/raidframe/rf_driver.h +++ b/sys/dev/raidframe/rf_driver.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_driver.h,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_driver.h,v 1.2 1999/01/26 02:33:57 oster Exp $ */ /* * rf_driver.h */ @@ -28,60 +28,6 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_driver.h,v - * Revision 1.11 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.10 1996/06/10 14:18:58 jimz - * move user, throughput stats into per-array structure - * - * Revision 1.9 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.8 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.7 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.6 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.5 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.4 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.3 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:56:10 jimz - * Initial revision - * - */ #ifndef _RF__RF_DRIVER_H_ #define _RF__RF_DRIVER_H_ @@ -110,9 +56,6 @@ int rf_SetReconfiguredMode(RF_Raid_t *raidPtr, RF_RowCol_t row, RF_RowCol_t col); int rf_FailDisk(RF_Raid_t *raidPtr, RF_RowCol_t frow, RF_RowCol_t fcol, int initRecon); -#ifdef SIMULATE -void rf_ScheduleContinueReconstructFailedDisk(RF_RaidReconDesc_t *reconDesc); -#endif /* SIMULATE */ void rf_SignalQuiescenceLock(RF_Raid_t *raidPtr, RF_RaidReconDesc_t *reconDesc); int rf_SuspendNewRequestsAndWait(RF_Raid_t *raidPtr); void rf_ResumeNewRequests(RF_Raid_t *raidPtr); diff --git a/sys/dev/raidframe/rf_engine.c b/sys/dev/raidframe/rf_engine.c index 77c24bb5eb5..772743dc82c 100644 --- a/sys/dev/raidframe/rf_engine.c +++ b/sys/dev/raidframe/rf_engine.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_engine.c,v 1.2 1998/11/13 11:48:26 simonb Exp $ */ +/* $NetBSD: rf_engine.c,v 1.3 1999/01/26 02:33:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -54,163 +54,8 @@ * * ****************************************************************************/ -/* - * : - * - * Log: rf_engine.c,v - * Revision 1.56 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.55 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.54 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.53 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.52 1996/06/17 03:17:08 jimz - * correctly shut down engine thread in kernel - * - * Revision 1.51 1996/06/14 15:02:10 jimz - * make new engine code happy in simulator - * - * Revision 1.50 1996/06/14 14:19:48 jimz - * use diskgroup to control engine thread, make all engine-thread-related - * stuff per-array - * - * Revision 1.49 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.48 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.47 1996/06/06 01:23:23 jimz - * fix bug in node traversal when firing multiple nodes simultaneously - * - * Revision 1.46 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.45 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.44 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.43 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.42 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.41 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.40 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.39 1996/05/20 16:15:17 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.38 1996/05/18 20:09:54 jimz - * bit of cleanup to compile cleanly in kernel, once again - * - * Revision 1.37 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.36 1996/05/15 20:24:19 wvcii - * fixed syntax bug in SIMULATE clause above ProcessNode - * - * Revision 1.35 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.34 1996/05/08 15:25:28 wvcii - * eliminated dead code - * merged common cases (sim/user/kernel) - * entire node lists (arrays) now fired atomically - * reordered source code for readability - * beefed-up & corrected comments - * - * Revision 1.33 1996/05/07 19:39:40 jimz - * 1. fixed problems in PropogateResults() with nodes being referenced - * after they were no longer valid - * 2. fixed problems in PropogateResults() with the node list being - * incorrectly threaded - * - * Revision 1.32 1996/05/07 19:03:56 wvcii - * in PropagateResults, fixed a bug in the rollBackward case: - * node data is copied before the call to FinishNode which - * frees the node and destroys its data. - * - * Revision 1.31 1996/05/07 17:45:17 jimz - * remove old #if 0 code from PropogateResults() (was kept in - * previous version for archival purposes (rcsdiff)) - * - * Revision 1.30 1996/05/07 17:44:19 jimz - * fix threading of nodes to be fired in PropagateResults() - * fix iteration through skiplist in PropagateResults() - * fix incorrect accesses to freed memory (dereferencing a - * node that was freed by the action of calling FinishNode() - * on it, which in turn completed its DAG) in PropagateResults() - * - * Revision 1.29 1996/05/02 15:04:15 wvcii - * fixed bad array index in PropagateResults - * - * Revision 1.28 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.27 1995/12/08 15:07:03 arw - * cache code cleanup - * - * Revision 1.26 1995/11/07 16:18:01 wvcii - * numerous changes associated with roll-away error recovery - * when a node fails, dag enters rollForward or rollBackward state - * - * Revision 1.25 1995/09/06 19:27:17 wvcii - * added debug vars enableRollAway and debugRecovery - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_threadstuff.h" -#ifndef KERNEL -#include <stdio.h> -#include <stdlib.h> -#endif /* !KERNEL */ - #include <sys/errno.h> #include "rf_dag.h" @@ -222,9 +67,7 @@ #include "rf_shutdown.h" #include "rf_raid.h" -#ifndef SIMULATE static void DAGExecutionThread(RF_ThreadArg_t arg); -#endif /* !SIMULATE */ #define DO_INIT(_l_,_r_) { \ int _rc; \ @@ -239,29 +82,15 @@ static void DAGExecutionThread(RF_ThreadArg_t arg); } /* synchronization primitives for this file. DO_WAIT should be enclosed in a while loop. */ -#ifndef KERNEL - -#define DO_LOCK(_r_) RF_LOCK_MUTEX((_r_)->node_queue_mutex) -#define DO_UNLOCK(_r_) RF_UNLOCK_MUTEX((_r_)->node_queue_mutex) -#define DO_WAIT(_r_) RF_WAIT_COND((_r_)->node_queue_cond, (_r_)->node_queue_mutex) -#define DO_SIGNAL(_r_) RF_SIGNAL_COND((_r_)->node_queue_cond) - -#else /* !KERNEL */ /* * XXX Is this spl-ing really necessary? */ #define DO_LOCK(_r_) { ks = splbio(); RF_LOCK_MUTEX((_r_)->node_queue_mutex); } #define DO_UNLOCK(_r_) { RF_UNLOCK_MUTEX((_r_)->node_queue_mutex); splx(ks); } -#ifndef __NetBSD__ -#define DO_WAIT(_r_) mpsleep(&(_r_)->node_queue, PZERO, "raidframe nq", 0, (void *) simple_lock_addr((_r_)->node_queue_mutex), MS_LOCK_SIMPLE) -#else #define DO_WAIT(_r_) tsleep(&(_r_)->node_queue, PRIBIO | PCATCH, "raidframe nq",0) -#endif #define DO_SIGNAL(_r_) wakeup(&(_r_)->node_queue) -#endif /* !KERNEL */ - static void rf_ShutdownEngine(void *); static void rf_ShutdownEngine(arg) @@ -270,17 +99,12 @@ static void rf_ShutdownEngine(arg) RF_Raid_t *raidPtr; raidPtr = (RF_Raid_t *)arg; -#ifndef SIMULATE raidPtr->shutdown_engine = 1; DO_SIGNAL(raidPtr); /* XXX something is missing here... */ #ifdef DEBUG printf("IGNORING WAIT_STOP\n"); #endif -#if 0 - RF_THREADGROUP_WAIT_STOP(&raidPtr->engine_tg); -#endif -#endif /* !SIMULATE */ } int rf_ConfigureEngine( @@ -299,7 +123,6 @@ int rf_ConfigureEngine( raidPtr->node_queue = NULL; raidPtr->dags_in_flight = 0; -#ifndef SIMULATE rc = rf_init_managed_threadgroup(listp, &raidPtr->engine_tg); if (rc) return(rc); @@ -330,7 +153,6 @@ int rf_ConfigureEngine( if (rf_engineDebug) { printf("[%d] Engine thread running and waiting for events\n", tid); } -#endif /* !SIMULATE */ rc = rf_ShutdownCreate(listp, rf_ShutdownEngine, raidPtr); if (rc) { @@ -381,20 +203,6 @@ static int BranchDone(RF_DagNode_t *node) } } -#ifdef SIMULATE -/* this is only ifdef SIMULATE because nothing else needs it */ -/* recursively determine if a DAG has completed execution */ -static int DAGDone(RF_DagHeader_t *dag) -{ - int i; - - for (i = 0; i < dag->numSuccedents; i++) - if (!BranchDone(dag->succedents[i])) - return RF_FALSE; - return RF_TRUE; -} -#endif /* SIMULATE */ - static int NodeReady(RF_DagNode_t *node) { int ready; @@ -444,7 +252,6 @@ static void FireNode(RF_DagNode_t *node) rf_get_threadid(tid); printf("[%d] Firing node 0x%lx (%s)\n",tid,(unsigned long) node, node->name); } -#ifdef KERNEL if (node->flags & RF_DAGNODE_FLAG_YIELD) { #if defined(__NetBSD__) && defined(_KERNEL) /* thread_block(); */ @@ -455,7 +262,6 @@ static void FireNode(RF_DagNode_t *node) thread_block(); #endif } -#endif /* KERNEL */ (*(node->doFunc)) (node); break; case rf_recover : @@ -464,7 +270,6 @@ static void FireNode(RF_DagNode_t *node) rf_get_threadid(tid); printf("[%d] Firing (undo) node 0x%lx (%s)\n",tid,(unsigned long) node, node->name); } -#ifdef KERNEL if (node->flags & RF_DAGNODE_FLAG_YIELD) #if defined(__NetBSD__) && defined(_KERNEL) /* thread_block(); */ @@ -474,7 +279,6 @@ static void FireNode(RF_DagNode_t *node) #else thread_block(); #endif -#endif /* KERNEL */ (*(node->undoFunc)) (node); break; default : @@ -527,7 +331,6 @@ static void FireNodeArray( } -#ifndef SIMULATE /* user context: * Attempt to fire each node in a linked list. * The entire list is fired atomically. @@ -569,9 +372,6 @@ static void FireNodeList(RF_DagNode_t *nodeList) } } } -#endif /* !SIMULATE */ - - /* interrupt context: * for each succedent @@ -596,15 +396,11 @@ static void PropagateResults( RF_DagNode_t *s, *a; RF_Raid_t *raidPtr; int tid, i, ks; -#ifdef SIMULATE - RF_PropHeader_t *p; /* prop list for succedent i */ -#else /* SIMULATE */ RF_DagNode_t *finishlist = NULL; /* a list of NIL nodes to be finished */ RF_DagNode_t *skiplist = NULL; /* list of nodes with failed truedata antecedents */ RF_DagNode_t *firelist = NULL; /* a list of nodes to be fired */ RF_DagNode_t *q = NULL, *qh = NULL, *next; int j, skipNode; -#endif /* SIMULATE */ rf_get_threadid(tid); @@ -623,29 +419,6 @@ static void PropagateResults( switch (node->dagHdr->status) { case rf_enable : case rf_rollForward : -#ifdef SIMULATE - /* currently we never propagate results unless in simulation */ - for (i = 0; i < node->numSuccedents; i++) { - s = *(node->succedents + i); - RF_ASSERT(s->status == rf_wait); - (s->numAntDone)++; - if (node->propList == NULL) - /* null propList implies no results to be propagated */ - p = NULL; - else - /* p=head of prop list for succedent i */ - p = *(node->propList + i); - while (p != NULL) { - /* bind node results to succedent's parameters */ -#if 0 - *(s->params + p->paramNum) = *(node->results + p->resultNum); -#else - s->params[p->paramNum].p = node->results[p->resultNum]; -#endif - p = p->next; - } - } -#else /* SIMULATE */ for (i = 0; i < node->numSuccedents; i++) { s = *(node->succedents + i); RF_ASSERT(s->status == rf_wait); @@ -729,12 +502,9 @@ static void PropagateResults( } /* fire all nodes in firelist */ FireNodeList(firelist); -#endif /* SIMULATE */ break; case rf_rollBackward : -#ifdef SIMULATE -#else /* SIMULATE */ for (i = 0; i < node->numAntecedents; i++) { a = *(node->antecedents + i); RF_ASSERT(a->status == rf_good); @@ -788,7 +558,6 @@ static void PropagateResults( } /* fire all nodes in firelist */ FireNodeList(firelist); -#endif /* SIMULATE */ break; default : @@ -845,60 +614,8 @@ static void ProcessNode( break; } -#ifdef SIMULATE - /* simulator fires nodes here. - * user/kernel rely upon PropagateResults to do this. - * XXX seems like this code should be merged so that the same thing happens for - * both sim, user, and kernel. -wvcii - */ - switch (node->dagHdr->status) { - case rf_enable : - case rf_rollForward : - if (node->numSuccedents == 0) { - /* process terminal node */ - if (rf_engineDebug) if (!DAGDone(node->dagHdr)) { - rf_get_threadid(tid); - printf("[%d] ProcessNode: !!!done but dag still in flight\n",tid); - RF_PANIC(); - } - if (rf_engineDebug) printf("[%d] ProcessNode: !!!done will return true\n",tid); - /* Mark dag as done */ - (node->dagHdr)->done=RF_TRUE; - raidPtr->dags_in_flight--; - } - else { - PropagateResults(node, context); - FireNodeArray(node->numSuccedents, node->succedents); - } - break; - case rf_rollBackward : - if (node->numAntecedents == 0) { - /* reached head of dag, we're done */ - if (rf_engineDebug) if (!DAGDone(node->dagHdr)) { - rf_get_threadid(tid); - printf("[%d] ProcessNode: !!!done but dag still in flight\n",tid); - RF_PANIC(); - } - if (rf_engineDebug) printf("[%d] ProcessNode: !!!done will return true\n",tid); - /* Mark dag as done */ - (node->dagHdr)->done=RF_TRUE; - raidPtr->dags_in_flight--; - } - else { - PropagateResults(node, context); - FireNodeArray(node->numAntecedents, node->antecedents); - } - break; - default : - RF_PANIC(); - break; - } - - -#else /* SIMULATE */ /* enqueue node's succedents (antecedents if rollBackward) for execution */ PropagateResults(node, context); -#endif /* SIMULATE */ } @@ -917,11 +634,6 @@ int rf_FinishNode( node->dagHdr->numNodesCompleted++; ProcessNode(node, context); -#ifdef SIMULATE - if ((node->dagHdr)->done == RF_TRUE) - retcode = RF_TRUE; -#endif /* SIMULATE */ - return(retcode); } @@ -980,16 +692,12 @@ int rf_DispatchDAG( * characteristics from the aio_completion_thread. */ -#ifndef SIMULATE static void DAGExecutionThread(RF_ThreadArg_t arg) { RF_DagNode_t *nd, *local_nq, *term_nq, *fire_nq; RF_Raid_t *raidPtr; int ks, tid; int s; -#ifndef __NetBSD__ - RF_Thread_t thread; -#endif raidPtr = (RF_Raid_t *)arg; @@ -999,7 +707,6 @@ static void DAGExecutionThread(RF_ThreadArg_t arg) printf("[%d] Engine thread is running\n", tid); } -#ifdef KERNEL #ifndef __NetBSD__ thread = current_thread(); thread_swappable(thread, RF_FALSE); @@ -1010,8 +717,6 @@ static void DAGExecutionThread(RF_ThreadArg_t arg) s=splbio(); -#endif /* KERNEL */ - RF_THREADGROUP_RUNNING(&raidPtr->engine_tg); DO_LOCK(raidPtr); @@ -1080,7 +785,6 @@ static void DAGExecutionThread(RF_ThreadArg_t arg) DO_UNLOCK(raidPtr); RF_THREADGROUP_DONE(&raidPtr->engine_tg); -#ifdef KERNEL #ifdef __NetBSD__ splx(s); kthread_exit(0); @@ -1089,7 +793,4 @@ static void DAGExecutionThread(RF_ThreadArg_t arg) thread_terminate(thread); thread_halt_self(); #endif -#endif /* KERNEL */ } - -#endif /* !SIMULATE */ diff --git a/sys/dev/raidframe/rf_engine.h b/sys/dev/raidframe/rf_engine.h index f8a31272b16..a607419b2d5 100644 --- a/sys/dev/raidframe/rf_engine.h +++ b/sys/dev/raidframe/rf_engine.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_engine.h,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_engine.h,v 1.2 1999/01/26 02:33:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,35 +32,6 @@ * * **********************************************************/ -/* : - * Log: rf_engine.h,v - * Revision 1.11 1996/06/14 14:16:22 jimz - * new decl of ConfigureEngine - * - * Revision 1.10 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.9 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.8 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.7 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.6 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.5 1995/12/01 18:12:17 root - * added copyright info - * - */ - #ifndef _RF__RF_ENGINE_H_ #define _RF__RF_ENGINE_H_ diff --git a/sys/dev/raidframe/rf_etimer.h b/sys/dev/raidframe/rf_etimer.h index 630c516b62d..fcaffe716c4 100644 --- a/sys/dev/raidframe/rf_etimer.h +++ b/sys/dev/raidframe/rf_etimer.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_etimer.h,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_etimer.h,v 1.2 1999/01/26 02:33:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,103 +37,6 @@ * 125 MHz 34 sec * * - * : - * Log: rf_etimer.h,v - * Revision 1.32 1996/08/13 18:11:09 jimz - * want MACH&&!__osf__, not just MACH for mach timing (MACH defined under OSF/1) - * - * Revision 1.31 1996/08/12 20:11:38 jimz - * use read_real_time() on AIX4+ - * - * Revision 1.30 1996/08/09 18:48:12 jimz - * for now, use gettimeofday() on MACH - * (should eventually use better clock stuff) - * - * Revision 1.29 1996/08/07 21:09:08 jimz - * add IRIX as a gettimeofday system - * - * Revision 1.28 1996/08/06 22:25:23 jimz - * add LINUX_I386 - * - * Revision 1.27 1996/07/30 04:45:53 jimz - * add ultrix stuff - * - * Revision 1.26 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.25 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.24 1996/07/27 18:40:24 jimz - * cleanup sweep - * - * Revision 1.23 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.22 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.21 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.20 1996/07/17 14:26:28 jimz - * rf_scc -> rf_rpcc - * - * Revision 1.19 1996/06/14 21:24:48 jimz - * move out ConfigureEtimer - * - * Revision 1.18 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.17 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.16 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.15 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.14 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.13 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.12 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.11 1995/12/01 18:10:40 root - * added copyright info - * - * Revision 1.10 1995/09/29 14:27:32 wvcii - * removed printfs from ConfigureEtimer() - * - * Revision 1.9 95/09/19 22:57:31 jimz - * added kernel version of ConfigureEtimer - * - * Revision 1.8 1995/09/14 13:03:04 amiri - * set default CPU speed to 125Mhz to avoid divide by zero problems. - * - * Revision 1.7 1995/09/11 19:04:36 wvcii - * timer autoconfigs using pdl routine to check cpu speed - * value may still be overridden via config debug var timerTicksPerSec - * */ @@ -142,65 +45,8 @@ #include "rf_options.h" -#ifdef _KERNEL -#define KERNEL -#endif - -#ifdef __NetBSD__ - -#ifdef KERNEL extern unsigned int rpcc(void); #define rf_read_cycle_counter rpcc -#else /* KERNEL */ -#ifndef __NetBSD__ -/* XXX does this function even exist anywhere??? GO */ -extern unsigned int rf_rpcc(); -#endif -#define rf_read_cycle_counter rf_rpcc -#endif /* KERNEL */ - -#define RF_DEF_TIMER_MAX_VAL 0xFFFFFFFF - -typedef struct RF_EtimerVal_s { - unsigned ccnt; /* cycle count */ -} RF_EtimerVal_t; - -struct RF_Etimer_s { - RF_EtimerVal_t st; - RF_EtimerVal_t et; - unsigned long ticks; /* elapsed time in ticks */ -}; - -extern long rf_timer_max_val; -extern long rf_timer_ticks_per_second; -extern unsigned long rf_timer_ticks_per_usec; - -#define RF_ETIMER_TICKS2US(_tcks_) ( (_tcks_) / rf_timer_ticks_per_usec ) -#define RF_ETIMER_START(_t_) { (_t_).st.ccnt = rf_read_cycle_counter(); } -#define RF_ETIMER_STOP(_t_) { (_t_).et.ccnt = rf_read_cycle_counter(); } -#define RF_ETIMER_EVAL(_t_) { \ - if ((_t_).st.ccnt < (_t_).et.ccnt) \ - (_t_).ticks = (_t_).et.ccnt - (_t_).st.ccnt; \ - else \ - (_t_).ticks = rf_timer_max_val - ((_t_).st.ccnt - (_t_).et.ccnt); \ -} - -#define RF_ETIMER_VAL_TICKS(_t_) ((_t_).ticks) -#define RF_ETIMER_VAL_US(_t_) (RF_ETIMER_TICKS2US((_t_).ticks)) -#define RF_ETIMER_VAL_MS(_t_) (RF_ETIMER_TICKS2US((_t_).ticks)/1000) - -#endif /* __NetBSD__ */ - - -#if defined(__alpha) && !defined(__NetBSD__) - -#ifdef KERNEL -extern unsigned int rpcc(); -#define rf_read_cycle_counter rpcc -#else /* KERNEL */ -extern unsigned int rf_rpcc(); -#define rf_read_cycle_counter rf_rpcc -#endif /* KERNEL */ #define RF_DEF_TIMER_MAX_VAL 0xFFFFFFFF @@ -232,121 +78,5 @@ extern unsigned long rf_timer_ticks_per_usec; #define RF_ETIMER_VAL_US(_t_) (RF_ETIMER_TICKS2US((_t_).ticks)) #define RF_ETIMER_VAL_MS(_t_) (RF_ETIMER_TICKS2US((_t_).ticks)/1000) -#endif /* __alpha */ - -#ifdef _IBMR2 - -extern void rf_rtclock(unsigned int *secs, unsigned int *nsecs); - -#define RF_MSEC_PER_SEC 1000 -#define RF_USEC_PER_SEC 1000000 -#define RF_NSEC_PER_SEC 1000000000 - -typedef struct RF_EtimerVal_s { - unsigned int secs; - unsigned int nsecs; -} RF_EtimerVal_t; - -struct RF_Etimer_s { - RF_EtimerVal_t start; - RF_EtimerVal_t end; - RF_EtimerVal_t elapsed; -}; - -#if RF_AIXVERS >= 4 - -#include <sys/time.h> - -#define RF_ETIMER_START(_t_) { \ - timebasestruct_t tb; \ - tb.flag = 1; \ - read_real_time(&tb, TIMEBASE_SZ); \ - (_t_).start.secs = tb.tb_high; \ - (_t_).start.nsecs = tb.tb_low; \ -} - -#define RF_ETIMER_STOP(_t_) { \ - timebasestruct_t tb; \ - tb.flag = 1; \ - read_real_time(&tb, TIMEBASE_SZ); \ - (_t_).end.secs = tb.tb_high; \ - (_t_).end.nsecs = tb.tb_low; \ -} - -#else /* RF_AIXVERS >= 4 */ - -#define RF_ETIMER_START(_t_) { \ - rf_rtclock(&((_t_).start.secs), &((_t_).start.nsecs)); \ -} - -#define RF_ETIMER_STOP(_t_) { \ - rf_rtclock(&((_t_).end.secs), &((_t_).end.nsecs)); \ -} - -#endif /* RF_AIXVERS >= 4 */ - -#define RF_ETIMER_EVAL(_t_) { \ - if ((_t_).end.nsecs >= (_t_).start.nsecs) { \ - (_t_).elapsed.nsecs = (_t_).end.nsecs - (_t_).start.nsecs; \ - (_t_).elapsed.secs = (_t_).end.secs - (_t_).start.nsecs; \ - } \ - else { \ - (_t_).elapsed.nsecs = RF_NSEC_PER_SEC + (_t_).end.nsecs; \ - (_t_).elapsed.nsecs -= (_t_).start.nsecs; \ - (_t_).elapsed.secs = (_t_).end.secs - (_t_).start.secs + 1; \ - } \ -} - -#define RF_ETIMER_VAL_US(_t_) (((_t_).elapsed.secs*RF_USEC_PER_SEC)+((_t_).elapsed.nsecs/1000)) -#define RF_ETIMER_VAL_MS(_t_) (((_t_).elapsed.secs*RF_MSEC_PER_SEC)+((_t_).elapsed.nsecs/1000000)) - -#endif /* _IBMR2 */ - -/* - * XXX investigate better timing for these - */ -#if defined(hpux) || defined(sun) || defined(NETBSD_I386) || defined(ultrix) || defined(LINUX_I386) || defined(IRIX) || (defined(MACH) && !defined(__osf__)) -#include <sys/time.h> - -#define RF_USEC_PER_SEC 1000000 - -struct RF_Etimer_s { - struct timeval start; - struct timeval end; - struct timeval elapsed; -}; -#ifndef __NetBSD__ -#define RF_ETIMER_START(_t_) { \ - gettimeofday(&((_t_).start), NULL); \ -} - -#define RF_ETIMER_STOP(_t_) { \ - gettimeofday(&((_t_).end), NULL); \ -} - -#else -#define RF_ETIMER_START(_t_) { \ -} -/* XXX these just drop off the end of the world... */ -#define RF_ETIMER_STOP(_t_) { \ -} -#endif - -#define RF_ETIMER_EVAL(_t_) { \ - if ((_t_).end.tv_usec >= (_t_).start.tv_usec) { \ - (_t_).elapsed.tv_usec = (_t_).end.tv_usec - (_t_).start.tv_usec; \ - (_t_).elapsed.tv_sec = (_t_).end.tv_sec - (_t_).start.tv_usec; \ - } \ - else { \ - (_t_).elapsed.tv_usec = RF_USEC_PER_SEC + (_t_).end.tv_usec; \ - (_t_).elapsed.tv_usec -= (_t_).start.tv_usec; \ - (_t_).elapsed.tv_sec = (_t_).end.tv_sec - (_t_).start.tv_sec + 1; \ - } \ -} - -#define RF_ETIMER_VAL_US(_t_) (((_t_).elapsed.tv_sec*RF_USEC_PER_SEC)+(_t_).elapsed.tv_usec) -#define RF_ETIMER_VAL_MS(_t_) (((_t_).elapsed.tv_sec*RF_MSEC_PER_SEC)+((_t_).elapsed.tv_usec/1000)) - -#endif /* hpux || sun || NETBSD_I386 || ultrix || LINUX_I386 || IRIX || (MACH && !__osf__) */ #endif /* !_RF__RF_TIMER_H_ */ diff --git a/sys/dev/raidframe/rf_fifo.c b/sys/dev/raidframe/rf_fifo.c index 9591f69380b..5ae62ceb7e9 100644 --- a/sys/dev/raidframe/rf_fifo.c +++ b/sys/dev/raidframe/rf_fifo.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_fifo.c,v 1.1 1998/11/13 04:20:29 oster Exp $ */ +/* $NetBSD: rf_fifo.c,v 1.2 1999/01/26 02:33:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -35,68 +35,6 @@ * ***************************************************/ -/* - * : - * Log: rf_fifo.c,v - * Revision 1.20 1996/06/18 20:53:11 jimz - * fix up disk queueing (remove configure routine, - * add shutdown list arg to create routines) - * - * Revision 1.19 1996/06/14 00:08:21 jimz - * make happier in all environments - * - * Revision 1.18 1996/06/13 20:41:24 jimz - * add random queueing - * - * Revision 1.17 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.16 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.15 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.14 1996/06/06 01:15:02 jimz - * added debugging - * - * Revision 1.13 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.12 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.11 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.10 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.9 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.8 1995/12/01 18:22:15 root - * added copyright info - * - * Revision 1.7 1995/11/07 15:32:16 wvcii - * added function FifoPeek() - * - */ - #include "rf_types.h" #include "rf_alloclist.h" #include "rf_stripelocks.h" @@ -108,11 +46,6 @@ #include "rf_threadid.h" #include "rf_options.h" -#if !defined(KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 -#include "rf_randmacros.h" -RF_DECLARE_STATIC_RANDOM -#endif /* !KERNEL && RF_INCLUDE_QUEUE_RANDOM > 0 */ - /* just malloc a header, zero it (via calloc), and return it */ /*ARGSUSED*/ void *rf_FifoCreate(sectPerDisk, clList, listp) @@ -122,14 +55,8 @@ void *rf_FifoCreate(sectPerDisk, clList, listp) { RF_FifoHeader_t *q; -#if !defined(KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 - RF_INIT_STATIC_RANDOM(1); -#endif /* !KERNEL && RF_INCLUDE_QUEUE_RANDOM > 0 */ RF_CallocAndAdd(q, 1, sizeof(RF_FifoHeader_t), (RF_FifoHeader_t *), clList); q->hq_count = q->lq_count = 0; -#if !defined(KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 - q->rval = (long)RF_STATIC_RANDOM(); -#endif /* !KERNEL && RF_INCLUDE_QUEUE_RANDOM > 0 */ return((void *)q); } diff --git a/sys/dev/raidframe/rf_fifo.h b/sys/dev/raidframe/rf_fifo.h index 61e3263b964..e3911ef8e7b 100644 --- a/sys/dev/raidframe/rf_fifo.h +++ b/sys/dev/raidframe/rf_fifo.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_fifo.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_fifo.h,v 1.2 1999/01/26 02:33:57 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,55 +32,6 @@ * 4-9-93 Created (MCH) */ -/* - * : - * Log: rf_fifo.h,v - * Revision 1.12 1996/06/18 20:53:11 jimz - * fix up disk queueing (remove configure routine, - * add shutdown list arg to create routines) - * - * Revision 1.11 1996/06/13 20:41:28 jimz - * add random queueing - * - * Revision 1.10 1996/06/13 20:38:28 jimz - * add random dequeue, peek - * - * Revision 1.9 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.8 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.7 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.6 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.5 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.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 1995/12/01 18:22:26 root - * added copyright info - * - * Revision 1.2 1995/11/07 15:31:57 wvcii - * added Peek() function - * - */ #ifndef _RF__RF_FIFO_H_ #define _RF__RF_FIFO_H_ @@ -93,9 +44,6 @@ typedef struct RF_FifoHeader_s { RF_DiskQueueData_t *hq_head, *hq_tail; /* high priority requests */ RF_DiskQueueData_t *lq_head, *lq_tail; /* low priority requests */ int hq_count, lq_count; /* debug only */ -#if !defined(KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 - long rval; /* next random number (random qpolicy) */ -#endif /* !KERNEL && RF_INCLUDE_QUEUE_RANDOM > 0 */ } RF_FifoHeader_t; extern void *rf_FifoCreate(RF_SectorCount_t sectPerDisk, @@ -106,9 +54,5 @@ extern RF_DiskQueueData_t *rf_FifoDequeue(void *q_in); extern RF_DiskQueueData_t *rf_FifoPeek(void *q_in); extern int rf_FifoPromote(void *q_in, RF_StripeNum_t parityStripeID, RF_ReconUnitNum_t which_ru); -#if !defined(KERNEL) && RF_INCLUDE_QUEUE_RANDOM > 0 -extern RF_DiskQueueData_t *rf_RandomDequeue(void *q_in); -extern RF_DiskQueueData_t *rf_RandomPeek(void *q_in); -#endif /* !KERNEL && RF_INCLUDE_QUEUE_RANDOM > 0 */ #endif /* !_RF__RF_FIFO_H_ */ diff --git a/sys/dev/raidframe/rf_freelist.h b/sys/dev/raidframe/rf_freelist.h index 1a9db751fed..d58db91dc6d 100644 --- a/sys/dev/raidframe/rf_freelist.h +++ b/sys/dev/raidframe/rf_freelist.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_freelist.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_freelist.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * rf_freelist.h */ @@ -28,71 +28,7 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_freelist.h,v - * Revision 1.13 1996/06/10 12:50:57 jimz - * Add counters to freelists to track number of allocations, frees, - * grows, max size, etc. Adjust a couple sets of PRIME params based - * on the results. - * - * Revision 1.12 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.11 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.10 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.9 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.8 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.7 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.6 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.5 1996/05/20 16:16:12 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.4 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.3 1996/05/16 16:04:52 jimz - * allow init func to fail for FREELIST ops - * - * Revision 1.2 1996/05/16 14:54:08 jimz - * added _INIT and _CLEAN versions of ops for objects with - * internal allocations - * - * Revision 1.1 1996/05/15 23:37:53 jimz - * Initial revision - * - */ + /* * rf_freelist.h -- code to manage counted freelists * diff --git a/sys/dev/raidframe/rf_general.h b/sys/dev/raidframe/rf_general.h index 5b02d1a2723..426464a1dc5 100644 --- a/sys/dev/raidframe/rf_general.h +++ b/sys/dev/raidframe/rf_general.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_general.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_general.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,136 +30,17 @@ * rf_general.h -- some general-use definitions */ -/* - * : - * Log: rf_general.h,v - * Revision 1.26 1996/08/09 16:44:57 jimz - * sunos port - * - * Revision 1.25 1996/08/07 21:08:57 jimz - * get NBPG defined for IRIX - * - * Revision 1.24 1996/08/06 22:02:06 jimz - * include linux/user.h for linux to get NBPG - * - * Revision 1.23 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.22 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.21 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.20 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.19 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.18 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.17 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.16 1996/05/21 18:53:13 jimz - * be sure that noop macros don't confuse conditionals and loops - * - * Revision 1.15 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.14 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.13 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.12 1995/12/01 18:29:08 root - * added copyright info - * - * Revision 1.11 1995/09/19 22:59:52 jimz - * Add kernel macro RF_DKU_END_IO(). When DKUSAGE is not defined, - * this is a no-op. When it is defined, it calls dku_end_io() - * correctly given a raidframe unit number and a buf pointer. - * - * Revision 1.10 1995/07/03 18:13:56 holland - * changed kernel defn of GETTIME - * - * Revision 1.9 1995/07/02 15:07:42 holland - * bug fixes related to getting distributed sparing numbers - * - * Revision 1.8 1995/06/12 15:54:40 rachad - * Added garbege collection for log structured storage - * - * Revision 1.7 1995/06/03 19:18:16 holland - * changes related to kernelization: access traces - * changes related to distributed sparing: some bug fixes - * - * Revision 1.6 1995/05/01 13:28:00 holland - * parity range locks, locking disk requests, recon+parityscan in kernel, etc. - * - * Revision 1.5 1995/04/06 14:47:56 rachad - * merge completed - * - * Revision 1.4 1995/03/15 20:45:23 holland - * distr sparing changes. - * - * Revision 1.3 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.2 1994/11/29 21:37:10 danner - * Added divide by zero check. - * - */ - /*#define NOASSERT*/ #ifndef _RF__RF_GENERAL_H_ #define _RF__RF_GENERAL_H_ -#ifdef _KERNEL -#define KERNEL -#endif - -#if !defined(KERNEL) && !defined(NOASSERT) -#include <assert.h> -#endif /* !KERNEL && !NOASSERT */ - /* error reporting and handling */ -#ifndef KERNEL - -#define RF_ERRORMSG(s) fprintf(stderr,(s)) -#define RF_ERRORMSG1(s,a) fprintf(stderr,(s),(a)) -#define RF_ERRORMSG2(s,a,b) fprintf(stderr,(s),(a),(b)) -#define RF_ERRORMSG3(s,a,b,c) fprintf(stderr,(s),(a),(b),(c)) -#define RF_ERRORMSG4(s,a,b,c,d) fprintf(stderr,(s),(a),(b),(c),(d)) -#define RF_ERRORMSG5(s,a,b,c,d,e) fprintf(stderr,(s),(a),(b),(c),(d),(e)) -#ifndef NOASSERT -#define RF_ASSERT(x) {assert(x);} -#else /* !NOASSERT */ -#define RF_ASSERT(x) {/*noop*/} -#endif /* !NOASSERT */ -#define RF_PANIC() {printf("YIKES! Something terrible happened at line %d of file %s. Use a debugger.\n",__LINE__,__FILE__); abort();} - -#else /* !KERNEL */ -#if defined(__NetBSD__) && defined(_KERNEL) +#ifdef _KERNEL #include<sys/systm.h> /* printf, sprintf, and friends */ -#endif +#endif + #define RF_ERRORMSG(s) printf((s)) #define RF_ERRORMSG1(s,a) printf((s),(a)) #define RF_ERRORMSG2(s,a,b) printf((s),(a),(b)) @@ -170,6 +51,7 @@ extern char rf_panicbuf[]; #define RF_PANIC() {sprintf(rf_panicbuf,"raidframe error at line %d file %s",__LINE__,__FILE__); panic(rf_panicbuf);} +#ifdef _KERNEL #ifdef RF_ASSERT #undef RF_ASSERT #endif /* RF_ASSERT */ @@ -185,8 +67,9 @@ extern char rf_panicbuf[]; #else /* !NOASSERT */ #define RF_ASSERT(x) {/*noop*/} #endif /* !NOASSERT */ - -#endif /* !KERNEL */ +#else /* _KERNEL */ +#define RF_ASSERT(x) {/*noop*/} +#endif /* _KERNEL */ /* random stuff */ #define RF_MAX(a,b) (((a) > (b)) ? (a) : (b)) @@ -196,55 +79,21 @@ extern char rf_panicbuf[]; #define RF_DB0_CHECK(a,b) ( ((b)==0) ? 0 : (a)/(b) ) /* get time of day */ -#ifdef KERNEL -#ifndef __NetBSD__ -extern struct timeval time; -#endif /* !__NetBSD__ */ #define RF_GETTIME(_t) microtime(&(_t)) -#else /* KERNEL */ -#define RF_GETTIME(_t) gettimeofday(&(_t), NULL); -#endif /* KERNEL */ /* * zero memory- not all bzero calls go through here, only * those which in the kernel may have a user address */ -#ifdef KERNEL -#ifndef __NetBSD__ -#define RF_BZERO(_bp,_b,_l) if (IS_SYS_VA(_b)) bzero(_b,_l); else rf_BzeroWithRemap(_bp,_b,_l) -#else #define RF_BZERO(_bp,_b,_l) bzero(_b,_l) /* XXX This is likely incorrect. GO*/ -#endif /* __NetBSD__ */ -#else /* KERNEL */ -#define RF_BZERO(_bp,_b,_l) bzero(_b,_l) -#endif /* KERNEL */ - -#ifdef sun -#include <sys/param.h> -#ifndef NBPG -#define NBPG PAGESIZE -#endif /* !NBPG */ -#endif /* sun */ - -#ifdef IRIX -#include <sys/tfp.h> -#define NBPG _PAGESZ -#endif /* IRIX */ -#ifdef LINUX -#include <linux/user.h> -#endif /* LINUX */ #define RF_UL(x) ((unsigned long) (x)) #define RF_PGMASK RF_UL(NBPG-1) #define RF_BLIP(x) (NBPG - (RF_UL(x) & RF_PGMASK)) /* bytes left in page */ #define RF_PAGE_ALIGNED(x) ((RF_UL(x) & RF_PGMASK) == 0) -#ifdef KERNEL -#ifndef __NetBSD__ -#include <dkusage.h> -#endif #if DKUSAGE > 0 #define RF_DKU_END_IO(_unit_,_bp_) { \ int s = splbio(); \ @@ -257,7 +106,6 @@ extern struct timeval time; #else /* DKUSAGE > 0 */ #define RF_DKU_END_IO(unit) { /* noop */ } #endif /* DKUSAGE > 0 */ -#endif /* KERNEL */ #ifdef __STDC__ #define RF_STRING(_str_) #_str_ diff --git a/sys/dev/raidframe/rf_geniq.c b/sys/dev/raidframe/rf_geniq.c index bfe55cb87d2..ac0d2248911 100644 --- a/sys/dev/raidframe/rf_geniq.c +++ b/sys/dev/raidframe/rf_geniq.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_geniq.c,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_geniq.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,38 +30,6 @@ * code which implements Reed-Solomon encoding for RAID level 6 */ -/* : - * Log: rf_geniq.c,v - * Revision 1.12 1996/07/29 16:37:00 jimz - * remove archs.h include to avoid VPATH problems in kernel - * rf_invertq.c now must include archs.h before invertq.h - * - * Revision 1.11 1996/07/29 15:04:16 jimz - * correct rf_archs.h path for kernel - * - * Revision 1.10 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.9 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.8 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.7 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.6 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.5 1995/12/01 18:29:18 root - * added copyright info - * - */ #define RF_UTILITY 1 #include "rf_pqdeg.h" diff --git a/sys/dev/raidframe/rf_geometry.c b/sys/dev/raidframe/rf_geometry.c index 83d70b3e230..bd9b2ec0a08 100644 --- a/sys/dev/raidframe/rf_geometry.c +++ b/sys/dev/raidframe/rf_geometry.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_geometry.c,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_geometry.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -39,61 +39,6 @@ * with zone-bit recording. */ -/* : - * Log: rf_geometry.c,v - * Revision 1.18 1996/08/11 00:40:57 jimz - * fix up broken comment - * - * Revision 1.17 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.16 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.15 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.14 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.13 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.12 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.11 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.10 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.9 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.8 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.7 1995/12/01 18:29:34 root - * added copyright info - * - */ #include "rf_types.h" #include "rf_geometry.h" diff --git a/sys/dev/raidframe/rf_geometry.h b/sys/dev/raidframe/rf_geometry.h index 60a4d65f54c..60d722839e8 100644 --- a/sys/dev/raidframe/rf_geometry.h +++ b/sys/dev/raidframe/rf_geometry.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_geometry.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_geometry.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* geometry.h * code from raidSim to model disk behavior */ @@ -11,52 +11,11 @@ * (AS) 2. The type 'Geometry' has been modified. */ -/* : - * Log: rf_geometry.h,v - * Revision 1.10 1996/08/06 22:25:08 jimz - * include raidframe stuff before system stuff - * - * Revision 1.9 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.8 1996/05/31 10:16:14 jimz - * add raidsim note - * - * Revision 1.7 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.6 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.5 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.4 1995/12/01 18:29:45 root - * added copyright info - * - */ - #ifndef _RF__RF_GEOMETRY_H_ #define _RF__RF_GEOMETRY_H_ #include "rf_types.h" #include "rf_sys.h" -#ifndef _KERNEL -#include <string.h> -#include <math.h> -#ifdef __NetBSD__ -#include <stdio.h> -#endif /* __NetBSD__ */ -#endif #define RF_MAX_DISKNAME_LEN 80 diff --git a/sys/dev/raidframe/rf_heap.c b/sys/dev/raidframe/rf_heap.c index 388637196f8..eccc63635e2 100644 --- a/sys/dev/raidframe/rf_heap.c +++ b/sys/dev/raidframe/rf_heap.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_heap.c,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_heap.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,36 +37,6 @@ * Song Bac Toh, 1994 */ -/* : - * Log: rf_heap.c,v - * Revision 1.8 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.7 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.6 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.5 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.4 1995/12/01 19:03:58 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_heap.h" #include "rf_general.h" diff --git a/sys/dev/raidframe/rf_hist.h b/sys/dev/raidframe/rf_hist.h index 35e4bd567fc..fd6a266e300 100644 --- a/sys/dev/raidframe/rf_hist.h +++ b/sys/dev/raidframe/rf_hist.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_hist.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_hist.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * rf_hist.h * @@ -30,22 +30,6 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* : - * Log: rf_hist.h,v - * Revision 1.3 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.2 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.1 1996/05/31 10:33:05 jimz - * Initial revision - * - */ #ifndef _RF__RF_HIST_H_ #define _RF__RF_HIST_H_ diff --git a/sys/dev/raidframe/rf_interdecluster.c b/sys/dev/raidframe/rf_interdecluster.c index 2e403b6f93a..64c1890a2b6 100644 --- a/sys/dev/raidframe/rf_interdecluster.c +++ b/sys/dev/raidframe/rf_interdecluster.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_interdecluster.c,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_interdecluster.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,94 +32,6 @@ * ************************************************************/ -/* : - * Log: rf_interdecluster.c,v - * Revision 1.24 1996/08/02 13:20:38 jimz - * get rid of bogus (long) casts - * - * Revision 1.23 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.22 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.21 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.20 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.19 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.18 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.17 1996/06/11 15:17:55 wvcii - * added include of rf_interdecluster.h - * fixed parameter list of rf_ConfigureInterDecluster - * fixed return type of rf_GetNumSparePUsInterDecluster - * removed include of rf_raid1.h - * - * Revision 1.16 1996/06/11 08:55:15 jimz - * improved error-checking at configuration time - * - * Revision 1.15 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.14 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.13 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.12 1996/06/06 18:41:48 jimz - * add interleaved declustering dag selection - * - * Revision 1.11 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.10 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.9 1996/05/31 05:03:01 amiri - * fixed a bug related to sparing layout. - * - * Revision 1.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.6 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.5 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.4 1996/05/03 19:50:38 wvcii - * removed include of rf_redstripe.h - * fixed change log parameters in header - * - */ #include "rf_types.h" #include "rf_raid.h" diff --git a/sys/dev/raidframe/rf_interdecluster.h b/sys/dev/raidframe/rf_interdecluster.h index 6eec7586411..ce9fb38c207 100644 --- a/sys/dev/raidframe/rf_interdecluster.h +++ b/sys/dev/raidframe/rf_interdecluster.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_interdecluster.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_interdecluster.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,64 +30,6 @@ * header file for Interleaved Declustering */ -/* - * : - * Log: rf_interdecluster.h,v - * Revision 1.13 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.12 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.11 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.10 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.9 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.8 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.7 1996/06/06 18:41:58 jimz - * add RAIDIDagSelect - * - * Revision 1.6 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.5 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.4 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.3 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.2 1995/12/01 19:07:25 root - * added copyright info - * - * Revision 1.1 1995/11/28 21:38:27 amiri - * Initial revision - */ - #ifndef _RF__RF_INTERDECLUSTER_H_ #define _RF__RF_INTERDECLUSTER_H_ diff --git a/sys/dev/raidframe/rf_invertq.c b/sys/dev/raidframe/rf_invertq.c index 70e55e3cc8d..bf15746b79d 100644 --- a/sys/dev/raidframe/rf_invertq.c +++ b/sys/dev/raidframe/rf_invertq.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_invertq.c,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_invertq.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,29 +26,7 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_invertq.c,v - * Revision 1.5 1996/07/29 16:36:36 jimz - * include rf_archs.h here, not rf_invertq.h, to avoid VPATH - * problems in OSF/1 kernel - * - * Revision 1.4 1995/11/30 15:57:27 wvcii - * added copyright info - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_archs.h" #include "rf_pqdeg.h" -#ifdef KERNEL -#ifndef __NetBSD__ -#include <raidframe/du_data/rf_invertq.h> -#else -#include "rf_invertq.h" /* XXX this is a hack. */ -#endif /* !__NetBSD__ */ -#else /* KERNEL */ #include "rf_invertq.h" -#endif /* KERNEL */ + diff --git a/sys/dev/raidframe/rf_invertq.h b/sys/dev/raidframe/rf_invertq.h index 3b4c6e89819..dffe6b34f79 100644 --- a/sys/dev/raidframe/rf_invertq.h +++ b/sys/dev/raidframe/rf_invertq.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_invertq.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_invertq.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * rf_invertq.h */ @@ -9,10 +9,6 @@ #ifndef _RF__RF_INVERTQ_H_ #define _RF__RF_INVERTQ_H_ -#ifdef _KERNEL -#define KERNEL -#endif - /* * rf_geniq.c must include rf_archs.h before including * this file (to get VPATH magic right with the way we @@ -60,13 +56,7 @@ RF_ua32_t rf_qfor[32] = { /* i = 31 */ { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, }, }; #define RF_Q_DATA_COL(col_num) rf_rn[col_num],rf_qfor[28-(col_num)] -#ifdef KERNEL RF_ua1024_t rf_qinv[1]; /* don't compile monster table into kernel */ -#elif defined(NO_PQ) -RF_ua1024_t rf_qinv[29*29]; -#else /* !KERNEL && NO_PQ */ - -#endif /* !KERNEL && NO_PQ */ #endif /* (RF_INCLUDE_PQ > 0) || (RF_INCLUDE_RAID6 > 0) */ #endif /* !_RF__RF_INVERTQ_H_ */ diff --git a/sys/dev/raidframe/rf_kintf.h b/sys/dev/raidframe/rf_kintf.h index b8f6f1253d9..54011ad9b76 100644 --- a/sys/dev/raidframe/rf_kintf.h +++ b/sys/dev/raidframe/rf_kintf.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_kintf.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_kintf.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * rf_kintf.h * @@ -30,20 +30,6 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_kintf.h,v - * Revision 1.2 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.1 1996/05/31 18:59:14 jimz - * Initial revision - * - */ #ifndef _RF__RF_KINTF_H_ #define _RF__RF_KINTF_H_ diff --git a/sys/dev/raidframe/rf_layout.c b/sys/dev/raidframe/rf_layout.c index 464d7a72d8c..baf177a87d4 100644 --- a/sys/dev/raidframe/rf_layout.c +++ b/sys/dev/raidframe/rf_layout.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_layout.c,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_layout.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -29,212 +29,6 @@ /* rf_layout.c -- driver code dealing with layout and mapping issues */ -/* - * : - * Log: rf_layout.c,v - * Revision 1.71 1996/08/20 22:41:30 jimz - * add declustered evenodd - * - * Revision 1.70 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.69 1996/07/31 15:34:46 jimz - * add EvenOdd - * - * Revision 1.68 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.67 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.66 1996/07/27 18:40:24 jimz - * cleanup sweep - * - * Revision 1.65 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.64 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.63 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.62 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.61 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.60 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.59 1996/06/19 14:57:58 jimz - * move layout-specific config parsing hooks into RF_LayoutSW_t - * table in rf_layout.c - * - * Revision 1.58 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.57 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.56 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.55 1996/06/06 18:41:35 jimz - * change interleaved declustering dag selection to an - * interleaved-declustering-specific routine (so we can - * use the partitioned mirror node) - * - * Revision 1.54 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.53 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.52 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.51 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.50 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.49 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.48 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.47 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.46 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.45 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.44 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.43 1996/02/22 16:46:35 amiri - * modified chained declustering to use a seperate DAG selection routine - * - * Revision 1.42 1995/12/01 19:16:11 root - * added copyright info - * - * Revision 1.41 1995/11/28 21:31:02 amiri - * added Interleaved Declustering to switch table - * - * Revision 1.40 1995/11/20 14:35:17 arw - * moved rf_StartThroughputStats in DefaultWrite and DefaultRead - * - * Revision 1.39 1995/11/19 16:28:46 wvcii - * replaced LaunchDAGState with CreateDAGState, ExecuteDAGState - * - * Revision 1.38 1995/11/17 19:00:41 wvcii - * added MapQ entries to switch table - * - * Revision 1.37 1995/11/17 16:58:13 amiri - * Added the Chained Declustering architecture ('C'), - * essentially a variant of mirroring. - * - * Revision 1.36 1995/11/16 16:16:10 amiri - * Added RAID5 with rotated sparing ('R' configuration) - * - * Revision 1.35 1995/11/07 15:41:17 wvcii - * modified state lists: DefaultStates, VSReadStates - * necessary to support new states (LaunchDAGState, ProcessDAGState) - * - * Revision 1.34 1995/10/18 01:23:20 amiri - * added ifndef SIMULATE wrapper around rf_StartThroughputStats() - * - * Revision 1.33 1995/10/13 15:05:46 arw - * added rf_StartThroughputStats to DefaultRead and DefaultWrite - * - * Revision 1.32 1995/10/12 16:04:23 jimz - * added config names to mapsw entires - * - * Revision 1.31 1995/10/04 03:57:48 wvcii - * added raid level 1 to mapsw - * - * Revision 1.30 1995/09/07 01:26:55 jimz - * Achive basic compilation in kernel. Kernel functionality - * is not guaranteed at all, but it'll compile. Mostly. I hope. - * - * Revision 1.29 1995/07/28 21:43:42 robby - * checkin after leaving for Rice. Bye - * - * Revision 1.28 1995/07/26 03:26:14 robby - * *** empty log message *** - * - * Revision 1.27 1995/07/21 19:47:52 rachad - * Added raid 0 /5 with caching architectures - * - * Revision 1.26 1995/07/21 19:29:27 robby - * added virtual striping states - * - * Revision 1.25 1995/07/10 21:41:47 robby - * switched to have my own virtual stripng write function from the cache - * - * Revision 1.24 1995/07/10 20:51:59 robby - * added virtual striping states - * - * Revision 1.23 1995/07/10 16:57:42 robby - * updated alloclistelem struct to the correct struct name - * - * Revision 1.22 1995/07/08 20:06:11 rachad - * *** empty log message *** - * - * Revision 1.21 1995/07/08 19:43:16 cfb - * *** empty log message *** - * - * Revision 1.20 1995/07/08 18:05:39 rachad - * Linked up Claudsons code with the real cache - * - * Revision 1.19 1995/07/06 14:29:36 robby - * added defaults states list to the layout switch - * - * Revision 1.18 1995/06/23 13:40:34 robby - * updeated to prototypes in rf_layout.h - * - */ - #include "rf_types.h" #include "rf_archs.h" #include "rf_raid.h" @@ -301,11 +95,11 @@ int distSpareNo = 0; static int distSpareYes = 1; static int distSpareNo = 0; #endif -#ifdef KERNEL +#ifdef _KERNEL #define RF_NK2(a,b) -#else /* KERNEL */ +#else /* _KERNEL */ #define RF_NK2(a,b) a,b, -#endif /* KERNEL */ +#endif /* _KERNEL */ #if RF_UTILITY > 0 #define RF_NU(a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p) diff --git a/sys/dev/raidframe/rf_layout.h b/sys/dev/raidframe/rf_layout.h index 365e01d8dfb..efa0a3c5ee6 100644 --- a/sys/dev/raidframe/rf_layout.h +++ b/sys/dev/raidframe/rf_layout.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_layout.h,v 1.1 1998/11/13 04:20:30 oster Exp $ */ +/* $NetBSD: rf_layout.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -29,188 +29,6 @@ /* rf_layout.h -- header file defining layout data structures */ -/* - * : - * Log: rf_layout.h,v - * Revision 1.50 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.49 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.48 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.47 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.46 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.45 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.44 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.43 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.42 1996/06/19 14:56:48 jimz - * move layout-specific config parsing hooks into RF_LayoutSW_t - * table in rf_layout.c - * - * Revision 1.41 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.40 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.39 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.38 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.37 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.36 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.35 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.34 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.33 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.32 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.31 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.30 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.29 1995/12/01 19:16:19 root - * added copyright info - * - * Revision 1.28 1995/11/28 21:26:49 amiri - * defined a declustering flag RF_BD_DECLUSTERED - * - * Revision 1.27 1995/11/17 19:00:59 wvcii - * created MapQ entry in switch table - * added prototyping to MapParity - * - * Revision 1.26 1995/11/07 15:40:27 wvcii - * changed prototype of SeclectionFunc in mapsw - * function no longer returns numHdrSucc, numTermAnt - * - * Revision 1.25 1995/10/12 20:57:08 arw - * added lots of comments - * - * Revision 1.24 1995/10/12 16:04:08 jimz - * added config name to mapsw - * - * Revision 1.23 1995/07/26 03:28:31 robby - * intermediary checkin - * - * Revision 1.22 1995/07/10 20:51:08 robby - * added to the asm info for the virtual striping locks - * - * Revision 1.21 1995/07/10 16:57:47 robby - * updated alloclistelem struct to the correct struct name - * - * Revision 1.20 1995/07/08 20:06:11 rachad - * *** empty log message *** - * - * Revision 1.19 1995/07/08 18:05:39 rachad - * Linked up Claudsons code with the real cache - * - * Revision 1.18 1995/07/06 14:29:36 robby - * added defaults states list to the layout switch - * - * Revision 1.17 1995/06/23 13:40:14 robby - * updeated to prototypes in rf_layout.h - * - * Revision 1.16 1995/06/08 22:11:03 holland - * bug fixes related to mutiple-row arrays - * - * Revision 1.15 1995/05/24 21:43:23 wvcii - * added field numParityLogCol to RaidLayout - * - * Revision 1.14 95/05/02 22:46:53 holland - * minor code cleanups. - * - * Revision 1.13 1995/05/02 12:48:01 holland - * eliminated some unused code. - * - * Revision 1.12 1995/05/01 13:28:00 holland - * parity range locks, locking disk requests, recon+parityscan in kernel, etc. - * - * Revision 1.11 1995/03/15 20:01:17 holland - * added REMAP and DONT_REMAP - * - * Revision 1.10 1995/03/09 19:54:11 rachad - * Added suport for threadless simulator - * - * Revision 1.9 1995/03/03 21:48:58 holland - * minor changes. - * - * Revision 1.8 1995/03/01 20:25:48 holland - * kernelization changes - * - * Revision 1.7 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.6 1995/01/30 14:53:46 holland - * extensive changes related to making DoIO non-blocking - * - * Revision 1.5 1995/01/24 23:58:46 holland - * multi-way recon XOR, plus various small changes - * - * Revision 1.4 1995/01/04 19:28:35 holland - * corrected comments around mapsw - * - * Revision 1.3 1994/11/28 22:15:45 danner - * Added type field to the physdiskaddr struct. - * - */ - #ifndef _RF__RF_LAYOUT_H_ #define _RF__RF_LAYOUT_H_ @@ -218,6 +36,10 @@ #include "rf_archs.h" #include "rf_alloclist.h" +#ifndef _KERNEL +#include <stdio.h> +#endif + /***************************************************************************************** * * This structure identifies all layout-specific operations and parameters. @@ -228,7 +50,7 @@ typedef struct RF_LayoutSW_s { RF_ParityConfig_t parityConfig; char *configName; -#ifndef KERNEL +#ifndef _KERNEL /* layout-specific parsing */ int (*MakeLayoutSpecific)(FILE *fp, RF_Config_t *cfgPtr, void *arg); void *makeLayoutSpecificArg; diff --git a/sys/dev/raidframe/rf_map.c b/sys/dev/raidframe/rf_map.c index 0bf6bbc4d69..40a6d09daf3 100644 --- a/sys/dev/raidframe/rf_map.c +++ b/sys/dev/raidframe/rf_map.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_map.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,148 +32,6 @@ * **************************************************************************/ -/* - * : - * Log: rf_map.c,v - * Revision 1.53 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.52 1996/08/20 19:58:39 jimz - * initialize numParityFailed and numQFailed to 0 in MarkFailuresInASMList - * - * Revision 1.51 1996/08/19 22:26:31 jimz - * add Chang's bugfixes for double-disk failures in MarkFailuresInASMList - * - * Revision 1.50 1996/08/19 21:38:06 jimz - * stripeOffset was uninitialized in CheckStripeForFailures - * - * Revision 1.49 1996/07/31 15:34:56 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.48 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.47 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.46 1996/06/10 12:50:57 jimz - * Add counters to freelists to track number of allocations, frees, - * grows, max size, etc. Adjust a couple sets of PRIME params based - * on the results. - * - * Revision 1.45 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.44 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.43 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.42 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.41 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.40 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.39 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.38 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.37 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.36 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.35 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.34 1996/05/20 16:14:45 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.33 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.32 1996/05/17 00:51:47 jimz - * reformat for readability - * - * Revision 1.31 1996/05/16 23:06:26 jimz - * convert asmhdr to use RF_FREELIST stuff - * - * Revision 1.30 1996/05/16 19:09:42 jimz - * grow init asm freelist to 32 - * - * Revision 1.29 1996/05/16 15:27:55 jimz - * prime freelist pumps for asm and pda lists - * - * Revision 1.28 1996/05/02 14:58:35 jimz - * legibility cleanup - * - * Revision 1.27 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.26 1995/12/01 19:25:06 root - * added copyright info - * - * Revision 1.25 1995/11/17 19:01:57 wvcii - * added call to MapQ in two fault tolerant case - * - * Revision 1.24 1995/11/17 15:10:53 wvcii - * fixed bug in ASMCheckStatus - ASSERT was using disk sector addresses - * rather than raidAddress - * - * Revision 1.23 1995/07/26 03:26:51 robby - * map the allocation and freeing routines for some stuff non-static - * - * Revision 1.22 1995/06/28 09:33:45 holland - * bug fixes related to dist sparing and multiple-row arrays - * - * Revision 1.21 1995/06/28 04:51:08 holland - * added some asserts against zero-length accesses - * - * Revision 1.20 1995/06/23 13:40:06 robby - * updeated to prototypes in rf_layout.h - * - */ - #include "rf_types.h" #include "rf_threadstuff.h" #include "rf_raid.h" diff --git a/sys/dev/raidframe/rf_map.h b/sys/dev/raidframe/rf_map.h index b93737c3ace..9336eebf1b1 100644 --- a/sys/dev/raidframe/rf_map.h +++ b/sys/dev/raidframe/rf_map.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_map.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_map.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,51 +28,6 @@ /* rf_map.h */ -/* : - * Log: rf_map.h,v - * Revision 1.9 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.8 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.7 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.6 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.5 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.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 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.2 1995/12/01 19:25:14 root - * added copyright info - * - */ - #ifndef _RF__RF_MAP_H_ #define _RF__RF_MAP_H_ diff --git a/sys/dev/raidframe/rf_mcpair.c b/sys/dev/raidframe/rf_mcpair.c index 483fecff291..0c764dc8704 100644 --- a/sys/dev/raidframe/rf_mcpair.c +++ b/sys/dev/raidframe/rf_mcpair.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_mcpair.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_mcpair.c,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,53 +31,6 @@ * it's used to block the current thread until some event occurs. */ -/* : - * Log: rf_mcpair.c,v - * Revision 1.16 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.15 1996/06/17 03:18:04 jimz - * include shutdown.h for macroized ShutdownCreate - * - * Revision 1.14 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.13 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.12 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.11 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.10 1996/05/20 16:15:22 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.9 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.8 1996/05/16 16:04:42 jimz - * convert to return-val on FREELIST init - * - * Revision 1.7 1996/05/16 14:47:21 jimz - * rewrote to use RF_FREELIST - * - * Revision 1.6 1995/12/01 19:25:43 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_threadstuff.h" #include "rf_mcpair.h" @@ -85,11 +38,8 @@ #include "rf_freelist.h" #include "rf_shutdown.h" -#if defined(__NetBSD__) && defined(_KERNEL) #include <sys/proc.h> -#endif - static RF_FreeList_t *rf_mcpair_freelist; #define RF_MAX_FREE_MCPAIR 128 @@ -182,16 +132,10 @@ void rf_MCPairWakeupFunc(mcpair) #if 0 printf("MCPairWakeupFunc called!\n"); #endif -#ifdef KERNEL wakeup(&(mcpair->flag)); /* XXX Does this do anything useful!! GO */ /* XXX Looks like the following is needed to truly get the functionality they were looking for here... This could be a side-effect of my using a tsleep in the NetBSD port though... XXX */ -#if defined(__NetBSD__) && defined(_KERNEL) wakeup(&(mcpair->cond)); /* XXX XXX XXX GO */ -#endif -#else /* KERNEL */ - RF_SIGNAL_COND(mcpair->cond); -#endif /* KERNEL */ RF_UNLOCK_MUTEX(mcpair->mutex); } diff --git a/sys/dev/raidframe/rf_mcpair.h b/sys/dev/raidframe/rf_mcpair.h index dc6a62c3f24..879a8c3dcb3 100644 --- a/sys/dev/raidframe/rf_mcpair.h +++ b/sys/dev/raidframe/rf_mcpair.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_mcpair.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_mcpair.h,v 1.2 1999/01/26 02:33:58 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -43,15 +43,7 @@ struct RF_MCPair_s { RF_MCPair_t *next; }; -#ifdef KERNEL -#ifndef __NetBSD__ -#define RF_WAIT_MCPAIR(_mcp) mpsleep(&((_mcp)->flag), PZERO, "mcpair", 0, (void *) simple_lock_addr((_mcp)->mutex), MS_LOCK_SIMPLE) -#else #define RF_WAIT_MCPAIR(_mcp) tsleep(&((_mcp)->flag), PRIBIO | PCATCH, "mcpair", 0) -#endif -#else /* KERNEL */ -#define RF_WAIT_MCPAIR(_mcp) RF_WAIT_COND((_mcp)->cond, (_mcp)->mutex) -#endif /* KERNEL */ int rf_ConfigureMCPair(RF_ShutdownList_t **listp); RF_MCPair_t *rf_AllocMCPair(void); diff --git a/sys/dev/raidframe/rf_memchunk.c b/sys/dev/raidframe/rf_memchunk.c index 1f9715907e8..611e71747ea 100644 --- a/sys/dev/raidframe/rf_memchunk.c +++ b/sys/dev/raidframe/rf_memchunk.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_memchunk.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_memchunk.c,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -58,57 +58,6 @@ * ********************************************************************************/ -/* : - * Log: rf_memchunk.c,v - * Revision 1.17 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.16 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.15 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.14 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.13 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.12 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.11 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.10 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.9 1996/05/20 16:15:45 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.8 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.7 1995/12/01 19:26:07 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_threadstuff.h" #include "rf_debugMem.h" diff --git a/sys/dev/raidframe/rf_memchunk.h b/sys/dev/raidframe/rf_memchunk.h index 62bcc976523..deccfd37c69 100644 --- a/sys/dev/raidframe/rf_memchunk.h +++ b/sys/dev/raidframe/rf_memchunk.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_memchunk.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_memchunk.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,38 +28,6 @@ /* header file for rf_memchunk.c. See comments there */ -/* : - * Log: rf_memchunk.h,v - * Revision 1.8 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.7 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.6 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 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.3 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.2 1995/12/01 19:25:56 root - * added copyright info - * - */ - #ifndef _RF__RF_MEMCHUNK_H_ #define _RF__RF_MEMCHUNK_H_ diff --git a/sys/dev/raidframe/rf_netbsd.h b/sys/dev/raidframe/rf_netbsd.h index f2723eb26fe..bfcfa98f1c5 100644 --- a/sys/dev/raidframe/rf_netbsd.h +++ b/sys/dev/raidframe/rf_netbsd.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsd.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_netbsd.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -75,6 +75,7 @@ #ifndef _RF__RF_NETBSDSTUFF_H_ #define _RF__RF_NETBSDSTUFF_H_ +#ifdef _KERNEL #include <sys/fcntl.h> #include <sys/systm.h> #include <sys/namei.h> @@ -82,7 +83,6 @@ -#if defined(__NetBSD__) && defined(_KERNEL) struct raidcinfo { struct vnode *ci_vp; /* device's vnode */ dev_t ci_dev; /* XXX: device's dev_t */ @@ -92,6 +92,5 @@ struct raidcinfo { size_t ci_pathlen; /* length of component path */ #endif }; -#endif - +#endif /* _KERNEL */ #endif /* _RF__RF_NETBSDSTUFF_H_ */ diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index 4354740ad01..8e0233be904 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.7 1999/01/15 17:55:52 explorer Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.8 1999/01/26 02:33:59 oster Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -112,189 +112,8 @@ * rf_kintf.c -- the kernel interface routines for RAIDframe * ***********************************************************/ -/* - * : - * Log: rf_kintf.c,v - * Revision 1.57 1996/07/19 16:12:20 jimz - * remove addition of protectedSectors in InitBP- it's already - * done in the diskqueue code - * - * Revision 1.56 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.55 1996/06/17 03:00:54 jimz - * Change RAIDFRAME_GET_INFO interface to do its own copyout() - * (because size of device config structure now exceeds 8k) - * - * Revision 1.54 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.53 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.52 1996/06/06 17:28:08 jimz - * track sector number of last I/O dequeued - * - * Revision 1.51 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.50 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.49 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.48 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.47 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.46 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.45 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.44 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.43 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.42 1996/05/23 22:17:54 jimz - * fix sector size hardcoding problems - * - * Revision 1.41 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.40 1996/05/23 13:18:07 jimz - * tracing_mutex -> rf_tracing_mutex - * - * Revision 1.39 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.38 1996/05/20 16:15:32 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.37 1996/05/10 16:23:47 jimz - * RF_offset -> RF_Offset - * - * Revision 1.36 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.35 1996/05/03 19:10:48 jimz - * change sanity checking for bogus I/Os to return more appropriate - * values (to make some user-level utilities happer with RAIDframe) - * - * Revision 1.34 1996/05/02 22:17:00 jimz - * When using DKUSAGE, send a bogus IO after configuring to let DKUSAGE know - * that we exist. This will let user-level programs doing group stats on the - * RF device function without error before RF gets its first IO - * - * Changed rf_device_config devs and spares fields to RF_RaidDisk_t - * - * Inc numOutstanding for the disk queue in rf_DispatchKernelIO if - * type is IO_TYPE_NOP. I'm not sure this is right, but it seems to be, - * because the disk IO completion routine wants to dec it, and doesn't - * care if there was no such IO. - * - * Revision 1.33 1996/05/02 15:05:44 jimz - * for now, rf_DoAccessKernel will reject non-sector-sized I/Os - * eventually, it should do something more clever... - * (and do it in DoAccess(), not just DoAccessKernel()) - * - * Revision 1.32 1996/05/01 16:28:39 jimz - * get rid of uses of ccmn_ functions - * - * Revision 1.31 1996/05/01 15:42:17 jimz - * ccmn_* memory management is on the way out. This is an archival checkpoint- - * both the old and new code are in place (all the ccmn_ calls are #if 0). After - * this, the ccmn_ code will no longer appear. - * - * Revision 1.30 1996/04/22 15:53:13 jimz - * MAX_RAIDS -> NRAIDFRAME - * - * Revision 1.29 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.28 1995/12/01 19:11:01 root - * added copyright info - * - * Revision 1.27 1995/11/28 18:56:40 wvcii - * disabled buffer copy in rf_write - * - * Revision 1.26 1995/10/06 16:37:08 jimz - * get struct bufs from ubc, not cam - * copy all write data, and operate on copy - * (temporary hack to get around dags in PQ that want - * to Xor into user write buffers) - * - * Revision 1.25 1995/09/30 22:23:08 jimz - * do not require raid to be active to perform ACCTOTAL ioctl - * - * Revision 1.24 1995/09/30 20:39:08 jimz - * added new ioctls: - * RAIDFRAME_RESET_ACCTOTALS - * RAIDFRAME_GET_ACCTOTALS - * RAIDFRAME_KEEP_ACCTOTALS - * - * Revision 1.23 1995/09/20 21:11:59 jimz - * include dfstrace.h in KERNEL block - * (even though it's a kernel-only file, this makes the depend process - * at user-level happy. Why the user-level Makefile wants to depend - * kintf.c is less clear, but this is a workaround). - * - * Revision 1.22 1995/09/19 23:19:03 jimz - * added DKUSAGE support - * - */ - - - - -#ifdef _KERNEL -#define KERNEL -#endif - - - -#ifdef KERNEL #include <sys/errno.h> - -#ifdef __NetBSD__ -#include "raid.h" #include <sys/param.h> #include <sys/pool.h> #include <sys/queue.h> @@ -306,25 +125,16 @@ #include <sys/systm.h> #include <sys/namei.h> #include <sys/vnode.h> -#endif - #include <sys/param.h> #include <sys/types.h> - #include <machine/types.h> - #include <sys/disklabel.h> - #include <sys/conf.h> - - -#ifdef __NetBSD__ #include <sys/lock.h> -#endif /* __NetBSD__ */ - - #include <sys/buf.h> #include <sys/user.h> + +#include "raid.h" #include "rf_raid.h" #include "rf_raidframe.h" #include "rf_dag.h" @@ -1838,7 +1648,6 @@ static void InitBP( bp->b_vp = b_vp; } -#endif /* KERNEL */ /* Extras... */ diff --git a/sys/dev/raidframe/rf_nwayxor.c b/sys/dev/raidframe/rf_nwayxor.c index 14d43140da8..cfe412c10f2 100644 --- a/sys/dev/raidframe/rf_nwayxor.c +++ b/sys/dev/raidframe/rf_nwayxor.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_nwayxor.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_nwayxor.c,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -35,30 +35,6 @@ * ************************************************************/ -/* : - * Log: rf_nwayxor.c,v - * Revision 1.6 1996/06/12 03:31:18 jimz - * only print call counts if rf_showXorCallCounts != 0 - * - * Revision 1.5 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.4 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.3 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.2 1995/12/01 19:29:14 root - * added copyright info - * - */ - #include "rf_nwayxor.h" #include "rf_shutdown.h" diff --git a/sys/dev/raidframe/rf_nwayxor.h b/sys/dev/raidframe/rf_nwayxor.h index 9ec8a0d9dc0..03dfa584e80 100644 --- a/sys/dev/raidframe/rf_nwayxor.h +++ b/sys/dev/raidframe/rf_nwayxor.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_nwayxor.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_nwayxor.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * rf_nwayxor.h */ @@ -31,27 +31,6 @@ /* * rf_nwayxor.h -- types and prototypes for nwayxor module */ -/* - * : - * Log: rf_nwayxor.h,v - * Revision 1.4 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.3 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.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:56:47 jimz - * Initial revision - * - */ #ifndef _RF__RF_NWAYXOR_H_ #define _RF__RF_NWAYXOR_H_ diff --git a/sys/dev/raidframe/rf_options.c b/sys/dev/raidframe/rf_options.c index 69577c46f9b..420bbd0fbe9 100644 --- a/sys/dev/raidframe/rf_options.c +++ b/sys/dev/raidframe/rf_options.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_options.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_options.c,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * rf_options.c */ @@ -29,15 +29,6 @@ * rights to redistribute these changes. */ -#ifdef _KERNEL -#define KERNEL -#endif - -#ifdef KERNEL -#ifndef __NetBSD__ -#include <dfstrace.h> -#endif /* !__NetBSD__ */ -#endif /* KERNEL */ #include "rf_threadstuff.h" #include "rf_types.h" diff --git a/sys/dev/raidframe/rf_options.h b/sys/dev/raidframe/rf_options.h index e6e452bafcb..3d2b0e8087b 100644 --- a/sys/dev/raidframe/rf_options.h +++ b/sys/dev/raidframe/rf_options.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_options.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_options.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * rf_options.h */ @@ -32,16 +32,6 @@ #ifndef _RF__RF_OPTIONS_H_ #define _RF__RF_OPTIONS_H_ -#ifdef _KERNEL -#define KERNEL -#endif - -#ifdef KERNEL -#ifndef __NetBSD__ -#include <dfstrace.h> -#endif /* !__NetBSD__ */ -#endif /* KERNEL */ - #define RF_DEFAULT_LOCK_TABLE_SIZE 256 typedef struct RF_DebugNames_s { diff --git a/sys/dev/raidframe/rf_optnames.h b/sys/dev/raidframe/rf_optnames.h index 2c785410e15..671c455c909 100644 --- a/sys/dev/raidframe/rf_optnames.h +++ b/sys/dev/raidframe/rf_optnames.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_optnames.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_optnames.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * rf_optnames.h */ @@ -33,10 +33,6 @@ * Don't protect against multiple inclusion here- we actually want this. */ -#ifdef _KERNEL -#define KERNEL -#endif - RF_DBG_OPTION(accSizeKB,0) /* if nonzero, the fixed access size to run */ RF_DBG_OPTION(accessDebug,0) RF_DBG_OPTION(accessTraceBufSize,0) @@ -100,27 +96,15 @@ RF_DBG_OPTION(validateVisitedDebug,1) /* XXX turn to zero by default? */ RF_DBG_OPTION(verifyParityDebug,0) RF_DBG_OPTION(warnLongIOs,0) -#ifdef KERNEL RF_DBG_OPTION(debugKernelAccess,0) /* DoAccessKernel debugging */ -#endif /* KERNEL */ -#ifndef KERNEL +#ifndef _KERNEL RF_DBG_OPTION(disableParityVerify,0) /* supress verification of parity */ RF_DBG_OPTION(interactiveScript,0) /* set as a debug option for now */ RF_DBG_OPTION(looptestShowWrites,0) /* user-level loop test write debugging */ RF_DBG_OPTION(traceDebug,0) #endif /* !KERNEL */ -#ifdef SIMULATE -RF_DBG_OPTION(addrSizePercentage,100) -RF_DBG_OPTION(diskTrace,0) /* ised to turn the timing traces on and of */ -RF_DBG_OPTION(eventDebug,0) -RF_DBG_OPTION(mWactive,1500) -RF_DBG_OPTION(mWidle,625) -RF_DBG_OPTION(mWsleep,15) -RF_DBG_OPTION(mWspinup,3500) -#endif /* SIMULATE */ - #if RF_INCLUDE_PARITYLOGGING > 0 RF_DBG_OPTION(forceParityLogReint,0) RF_DBG_OPTION(numParityRegions,0) /* number of regions in the array */ diff --git a/sys/dev/raidframe/rf_owner.h b/sys/dev/raidframe/rf_owner.h index 3f425e296bf..f3c8b251de1 100644 --- a/sys/dev/raidframe/rf_owner.h +++ b/sys/dev/raidframe/rf_owner.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_owner.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_owner.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,30 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_owner.h,v - * Revision 1.8 1996/08/20 14:36:51 jimz - * add bufLen to RF_EventCreate_t to be able to include buffer length - * when freeing buffer - * - * Revision 1.7 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.6 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 1995/12/01 19:44:30 root - * added copyright info - * - */ - #ifndef _RF__RF_OWNER_H_ #define _RF__RF_OWNER_H_ diff --git a/sys/dev/raidframe/rf_paritylog.c b/sys/dev/raidframe/rf_paritylog.c index 1b859ab555f..cc687432a2e 100644 --- a/sys/dev/raidframe/rf_paritylog.c +++ b/sys/dev/raidframe/rf_paritylog.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylog.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_paritylog.c,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,107 +28,6 @@ /* Code for manipulating in-core parity logs * - * : - * Log: rf_paritylog.c,v - * Revision 1.27 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.26 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.25 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.24 1996/06/11 10:18:59 jimz - * AllocParityLogCommonData() was freeing the common pointer immediately - * after allocating this. It appeared that this free really belonged - * inside one of the failure cases (for backing out), so I moved it - * in there. - * - * Revision 1.23 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.22 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.21 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.20 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.19 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.18 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.17 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.16 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.15 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.14 1996/05/20 16:16:59 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.13 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.12 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.11 1995/12/06 20:54:44 wvcii - * added prototyping - * - * Revision 1.10 1995/11/30 16:05:37 wvcii - * added copyright info - * - * Revision 1.9 1995/10/08 20:41:28 wvcii - * fixed bug in allocation of CommonLogData (was allocating incorrect size) - * - * Revision 1.8 1995/09/07 15:52:12 jimz - * noop compile when INCLUDE_PARITYLOGGING not defined - * - * Revision 1.7 1995/09/06 19:17:36 wvcii - * moved code for reintegration to rf_paritylogDiskMgr.c - * - * Revision 1.6 95/07/07 00:16:06 wvcii - * this version free from deadlock, fails parity verification - * - * Revision 1.5 1995/06/09 13:14:24 wvcii - * code is now nonblocking - * - * Revision 1.4 95/06/01 17:01:59 wvcii - * code debug - * - * Revision 1.3 95/05/31 13:08:23 wvcii - * code debug - * - * Revision 1.2 95/05/21 15:42:15 wvcii - * code debug - * - * Revision 1.1 95/05/18 10:43:54 wvcii - * Initial revision - * */ #include "rf_archs.h" diff --git a/sys/dev/raidframe/rf_paritylog.h b/sys/dev/raidframe/rf_paritylog.h index 188c5acc107..fdeaab5e7fc 100644 --- a/sys/dev/raidframe/rf_paritylog.h +++ b/sys/dev/raidframe/rf_paritylog.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylog.h,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_paritylog.h,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,70 +28,6 @@ /* header file for parity log * - * : - * Log: rf_paritylog.h,v - * Revision 1.21 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.20 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.19 1996/06/11 10:17:57 jimz - * definitions and run state for parity logging thread - * - * Revision 1.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 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.15 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.14 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.13 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.12 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.11 1995/12/06 20:54:58 wvcii - * added prototyping - * - * Revision 1.10 1995/11/30 16:05:50 wvcii - * added copyright info - * - * Revision 1.9 1995/10/07 05:09:27 wvcii - * removed #define BYTESPERSECTOR 512 - * - * Revision 1.8 1995/09/06 19:27:52 wvcii - * added startTime to commonLogData - * - * Revision 1.7 1995/07/07 00:13:42 wvcii - * this version free from deadlock, fails parity verification - * */ #ifndef _RF__RF_PARITYLOG_H_ diff --git a/sys/dev/raidframe/rf_paritylogDiskMgr.c b/sys/dev/raidframe/rf_paritylogDiskMgr.c index b154f931cfb..35afb728efb 100644 --- a/sys/dev/raidframe/rf_paritylogDiskMgr.c +++ b/sys/dev/raidframe/rf_paritylogDiskMgr.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogDiskMgr.c,v 1.1 1998/11/13 04:20:31 oster Exp $ */ +/* $NetBSD: rf_paritylogDiskMgr.c,v 1.2 1999/01/26 02:33:59 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -27,113 +27,6 @@ */ /* Code for flushing and reintegration operations related to parity logging. * - * : - * Log: rf_paritylogDiskMgr.c,v - * Revision 1.25 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.24 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.23 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.22 1996/06/11 10:17:33 jimz - * Put in thread startup/shutdown mechanism for proper synchronization - * with start and end of day routines. - * - * Revision 1.21 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.20 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.19 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.18 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.17 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.16 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.15 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.14 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.13 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.12 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.11 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.10 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.9 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.8 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.7 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.6 1995/12/06 20:58:27 wvcii - * added prototypes - * - * Revision 1.5 1995/11/30 16:06:05 wvcii - * added copyright info - * - * Revision 1.4 1995/10/09 22:41:10 wvcii - * minor bug fix - * - * Revision 1.3 1995/10/08 20:43:47 wvcii - * lots of random debugging - debugging still incomplete - * - * Revision 1.2 1995/09/07 15:52:19 jimz - * noop compile when INCLUDE_PARITYLOGGING not defined - * - * Revision 1.1 1995/09/06 19:24:44 wvcii - * Initial revision - * */ #include "rf_archs.h" @@ -436,10 +329,8 @@ static void FlushLogsToDisk( WriteCoreLog(log, fwr_mcpair, raidPtr, &fwr_dag_h, &fwr_alloclist, &fwr_pda); /* wait for the DAG to complete */ -#ifndef SIMULATE while (!fwr_mcpair->flag) RF_WAIT_COND(fwr_mcpair->cond, fwr_mcpair->mutex); -#endif /* !SIMULATE */ if (fwr_dag_h->status != rf_enable) { RF_ERRORMSG1("Unable to write core log to disk (region %d)\n", regionID); @@ -505,11 +396,9 @@ static void ReintegrateRegion( } /* wait on read of region parity to complete */ -#ifndef SIMULATE while (!prd_mcpair->flag) { RF_WAIT_COND(prd_mcpair->cond, prd_mcpair->mutex); } -#endif /* !SIMULATE */ RF_UNLOCK_MUTEX(prd_mcpair->mutex); if (prd_dag_h->status != rf_enable) { @@ -525,10 +414,8 @@ static void ReintegrateRegion( if (raidPtr->regionInfo[regionID].diskCount > 0) { /* wait on read of region log to complete */ -#ifndef SIMULATE while (!rrd_mcpair->flag) RF_WAIT_COND(rrd_mcpair->cond, rrd_mcpair->mutex); -#endif /* !SIMULATE */ RF_UNLOCK_MUTEX(rrd_mcpair->mutex); if (rrd_dag_h->status != rf_enable) { @@ -554,10 +441,8 @@ static void ReintegrateRegion( RF_LOCK_MUTEX(pwr_mcpair->mutex); pwr_mcpair->flag = RF_FALSE; WriteRegionParity(regionID, pwr_mcpair, parityBuffer, raidPtr, &pwr_dag_h, &pwr_alloclist, &pwr_pda); -#ifndef SIMULATE while (!pwr_mcpair->flag) RF_WAIT_COND(pwr_mcpair->cond, pwr_mcpair->mutex); -#endif /* !SIMULATE */ RF_UNLOCK_MUTEX(pwr_mcpair->mutex); if (pwr_dag_h->status != rf_enable) { diff --git a/sys/dev/raidframe/rf_paritylogDiskMgr.h b/sys/dev/raidframe/rf_paritylogDiskMgr.h index 23f4d22b4cf..4ca034deabf 100644 --- a/sys/dev/raidframe/rf_paritylogDiskMgr.h +++ b/sys/dev/raidframe/rf_paritylogDiskMgr.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogDiskMgr.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_paritylogDiskMgr.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,27 +28,6 @@ /* header file for parity log disk mgr code * - * : - * Log: rf_paritylogDiskMgr.h,v - * Revision 1.5 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.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 1995/12/06 20:56:39 wvcii - * added prototypes - * - * Revision 1.2 1995/11/30 16:06:21 wvcii - * added copyright info - * - * Revision 1.1 1995/09/06 19:25:29 wvcii - * Initial revision - * - * */ #ifndef _RF__RF_PARITYLOGDISKMGR_H_ diff --git a/sys/dev/raidframe/rf_paritylogging.c b/sys/dev/raidframe/rf_paritylogging.c index ba5707eec71..05d59fca07c 100644 --- a/sys/dev/raidframe/rf_paritylogging.c +++ b/sys/dev/raidframe/rf_paritylogging.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogging.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_paritylogging.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,165 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_paritylogging.c,v - * Revision 1.42 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.41 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.40 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.39 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.38 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.37 1996/06/17 03:24:14 jimz - * switch to new shutdown function typing - * - * Revision 1.36 1996/06/14 23:15:38 jimz - * attempt to deal with thread GC problem - * - * Revision 1.35 1996/06/11 13:48:30 jimz - * get it to compile in-kernel - * - * Revision 1.34 1996/06/11 10:16:35 jimz - * Check return values on array configuration- back out if failed. - * Reorder shutdown to avoid using deallocated resources. - * Get rid of bogus join op in shutdown. - * - * Revision 1.33 1996/06/10 18:29:17 wvcii - * fixed bug in rf_IdentifyStripeParityLogging - * - added array initialization - * - * Revision 1.32 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.31 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.30 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.29 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.28 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.27 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.26 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.25 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.24 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.23 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.22 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.21 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.20 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.19 1996/05/20 16:16:30 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.18 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.17 1996/05/03 19:47:11 wvcii - * added includes of new dag library - * - * Revision 1.16 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.15 1995/12/06 20:57:43 wvcii - * added prototypes - * reintegration of logs on shutdown now conditional on forceParityLogReint - * - * Revision 1.14 1995/11/30 16:06:42 wvcii - * added copyright info - * - * Revision 1.13 1995/11/17 19:01:29 wvcii - * added prototyping to MapParity - * - * Revision 1.12 1995/11/07 15:36:03 wvcii - * changed ParityLoggingDagSelect prototype - * function no longer returns numHdrSucc, numTermAnt - * - * Revision 1.11 1995/10/08 20:42:54 wvcii - * lots of random debugging - debugging incomplete - * - * Revision 1.10 1995/09/07 01:26:55 jimz - * Achive basic compilation in kernel. Kernel functionality - * is not guaranteed at all, but it'll compile. Mostly. I hope. - * - * Revision 1.9 1995/09/06 19:21:17 wvcii - * explicit shutdown (forced reintegration) for simulator version - * - * Revision 1.8 1995/07/08 18:19:16 rachad - * Parity verifies can not be done in the simulator. - * - * Revision 1.7 1995/07/07 00:17:20 wvcii - * this version free from deadlock, fails parity verification - * - * Revision 1.6 1995/06/23 13:39:59 robby - * updeated to prototypes in rf_layout.h - * - * Revision 1.5 1995/06/09 13:14:56 wvcii - * code is now nonblocking - * - * Revision 1.4 95/06/01 17:02:23 wvcii - * code debug - * - * Revision 1.3 95/05/31 13:08:57 wvcii - * code debug - * - * Revision 1.2 95/05/21 15:35:00 wvcii - * code debug - * - * - * - */ /* parity logging configuration, dag selection, and mapping is implemented here @@ -797,7 +638,7 @@ static void rf_ShutdownParityLogging(RF_ThreadArg_t arg) rf_get_threadid(tid); printf("[%d] ShutdownParityLogging\n", tid); } -#ifndef SIMULATE + /* shutdown disk thread */ /* This has the desirable side-effect of forcing all regions to be reintegrated. This is necessary since all parity log maps are @@ -816,10 +657,6 @@ static void rf_ShutdownParityLogging(RF_ThreadArg_t arg) RF_WAIT_COND(raidPtr->parityLogDiskQueue.cond, raidPtr->parityLogDiskQueue.mutex); } RF_UNLOCK_MUTEX(raidPtr->parityLogDiskQueue.mutex); -#else /* !SIMULATE */ - /* explicitly call shutdown routines which force reintegration */ - rf_ShutdownLogging(raidPtr); -#endif /* !SIMULATE */ if (rf_parityLogDebug) { int tid; rf_get_threadid(tid); diff --git a/sys/dev/raidframe/rf_paritylogging.h b/sys/dev/raidframe/rf_paritylogging.h index ac215aa9395..cc885ec5ae5 100644 --- a/sys/dev/raidframe/rf_paritylogging.h +++ b/sys/dev/raidframe/rf_paritylogging.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_paritylogging.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_paritylogging.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,82 +28,6 @@ /* header file for Parity Logging */ -/* - * : - * Log: rf_paritylogging.h,v - * Revision 1.22 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.21 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.20 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.19 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 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.15 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.14 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.13 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.12 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.11 1995/12/06 20:56:25 wvcii - * added prototypes - * - * Revision 1.10 1995/11/30 16:06:58 wvcii - * added copyright info - * - * Revision 1.9 1995/11/17 19:53:08 wvcii - * fixed bug in MapParityRegion prototype - * - * Revision 1.8 1995/11/17 19:09:24 wvcii - * added prototypint to MapParity - * - * Revision 1.7 1995/11/07 15:28:17 wvcii - * changed ParityLoggingDagSelect prototype - * function no longer generates numHdrSucc, numTermAnt - * - * Revision 1.6 1995/07/07 00:16:50 wvcii - * this version free from deadlock, fails parity verification - * - * Revision 1.5 1995/06/23 13:39:44 robby - * updeated to prototypes in rf_layout.h - * - */ - #ifndef _RF__RF_PARITYLOGGING_H_ #define _RF__RF_PARITYLOGGING_H_ diff --git a/sys/dev/raidframe/rf_parityloggingdags.c b/sys/dev/raidframe/rf_parityloggingdags.c index 5b4146e9130..0ca17a6be64 100644 --- a/sys/dev/raidframe/rf_parityloggingdags.c +++ b/sys/dev/raidframe/rf_parityloggingdags.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityloggingdags.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_parityloggingdags.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,121 +26,6 @@ * rights to redistribute these changes. */ -/* - * Log: rf_parityloggingdags.c,v - * Revision 1.27 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.26 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.25 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.24 1996/06/11 13:47:21 jimz - * fix up for in-kernel compilation - * - * Revision 1.23 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.22 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.21 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.20 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.19 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.18 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.17 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.16 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.15 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.14 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.13 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.12 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.11 1996/05/03 19:42:02 wvcii - * added includes for dag library - * - * Revision 1.10 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.9 1995/12/06 20:55:24 wvcii - * added prototyping - * fixed bug in dag header numSuccedents count for both small and large dags - * - * Revision 1.8 1995/11/30 16:08:01 wvcii - * added copyright info - * - * Revision 1.7 1995/11/07 15:29:05 wvcii - * reorganized code, adding comments and asserts - * dag creation routines now generate term node - * encoded commit point, barrier, and antecedence types into dags - * - * Revision 1.6 1995/09/07 15:52:06 jimz - * noop compile when INCLUDE_PARITYLOGGING not defined - * - * Revision 1.5 1995/06/15 13:51:53 robby - * updated some wrong prototypes (after prototyping rf_dagutils.h) - * - * Revision 1.4 1995/06/09 13:15:05 wvcii - * code is now nonblocking - * - * Revision 1.3 95/05/31 13:09:14 wvcii - * code debug - * - * Revision 1.2 1995/05/21 15:34:14 wvcii - * code debug - * - * Revision 1.1 95/05/16 14:36:53 wvcii - * Initial revision - * - * - */ - #include "rf_archs.h" #if RF_INCLUDE_PARITYLOGGING > 0 diff --git a/sys/dev/raidframe/rf_parityloggingdags.h b/sys/dev/raidframe/rf_parityloggingdags.h index c175ce880e2..1c3a2905487 100644 --- a/sys/dev/raidframe/rf_parityloggingdags.h +++ b/sys/dev/raidframe/rf_parityloggingdags.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityloggingdags.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_parityloggingdags.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,42 +32,6 @@ * * ****************************************************************************/ -/* : - * Log: rf_parityloggingdags.h,v - * Revision 1.10 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.9 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.8 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.7 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.6 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.5 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 1995/12/06 20:55:08 wvcii - * added prototyping - * - */ - #ifndef _RF__RF_PARITYLOGGINGDAGS_H_ #define _RF__RF_PARITYLOGGINGDAGS_H_ diff --git a/sys/dev/raidframe/rf_parityscan.c b/sys/dev/raidframe/rf_parityscan.c index c7c158cd964..fc7f1dfcee9 100644 --- a/sys/dev/raidframe/rf_parityscan.c +++ b/sys/dev/raidframe/rf_parityscan.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityscan.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_parityscan.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,141 +32,6 @@ * *****************************************************************************/ -/* - * : - * Log: rf_parityscan.c,v - * Revision 1.47 1996/08/20 20:35:01 jimz - * change diagnostic string in rewrite - * - * Revision 1.46 1996/08/20 20:03:19 jimz - * fixed parity rewrite to actually use arch-specific parity stuff - * (this ever worked... how?) - * - * Revision 1.45 1996/08/16 17:41:25 jimz - * allow rewrite parity on any fault-tolerant arch - * - * Revision 1.44 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.43 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.42 1996/07/22 21:12:01 jimz - * clean up parity scan status printing - * - * Revision 1.41 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.40 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.39 1996/07/09 21:44:26 jimz - * fix bogus return code in VerifyParityBasic when a stripe can't be corrected - * - * Revision 1.38 1996/06/20 17:56:57 jimz - * update VerifyParity to check complete AccessStripeMaps - * - * Revision 1.37 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.36 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.35 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.34 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.33 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.32 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.31 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.30 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.29 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.28 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.27 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.26 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.25 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.24 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.23 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.22 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.21 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.20 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.19 1995/11/30 16:16:49 wvcii - * added copyright info - * - * Revision 1.18 1995/11/19 16:32:19 wvcii - * eliminated initialization of dag header fields which no longer exist - * (numDags, numDagsDone, firstHdr) - * - * Revision 1.17 1995/11/07 16:23:36 wvcii - * added comments, asserts, and prototypes - * encoded commit point nodes, barrier, and antecedents types into dags - * - */ - #include "rf_types.h" #include "rf_raid.h" #include "rf_dag.h" @@ -233,17 +98,9 @@ int rf_RewriteParity(raidPtr) rf_FreeAccessStripeMap(asm_h); new_pctg = i*1000/raidPtr->totalSectors; if (new_pctg != old_pctg) { -#ifndef KERNEL - fprintf(stderr,"\rParity rewrite: %d.%d%% complete", - new_pctg/10, new_pctg%10); - fflush(stderr); -#endif /* !KERNEL */ } old_pctg = new_pctg; } -#ifndef KERNEL - fprintf(stderr,"\rParity rewrite: 100.0%% complete\n"); -#endif /* !KERNEL */ #if 1 return(0); /* XXX nothing was here.. GO */ #endif diff --git a/sys/dev/raidframe/rf_parityscan.h b/sys/dev/raidframe/rf_parityscan.h index a6800645698..1c24e5a9098 100644 --- a/sys/dev/raidframe/rf_parityscan.h +++ b/sys/dev/raidframe/rf_parityscan.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_parityscan.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_parityscan.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,60 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_parityscan.h,v - * Revision 1.14 1996/07/05 18:01:12 jimz - * don't make parity protos ndef KERNEL - * - * Revision 1.13 1996/06/20 17:41:43 jimz - * change decl for VerifyParity - * - * Revision 1.12 1996/06/20 15:38:39 jimz - * renumber parityscan return codes - * - * Revision 1.11 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.10 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.9 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.8 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.7 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.6 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.5 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 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.2 1995/11/30 16:20:46 wvcii - * added copyright info - * - */ - #ifndef _RF__RF_PARITYSCAN_H_ #define _RF__RF_PARITYSCAN_H_ diff --git a/sys/dev/raidframe/rf_pq.c b/sys/dev/raidframe/rf_pq.c index e07884fc2b6..fce6a6d1bfc 100644 --- a/sys/dev/raidframe/rf_pq.c +++ b/sys/dev/raidframe/rf_pq.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_pq.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_pq.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,106 +28,6 @@ /* * Code for RAID level 6 (P + Q) disk array architecture. - * - * : - * Log: rf_pq.c,v - * Revision 1.33 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.32 1996/07/31 16:29:50 jimz - * "fix" math on 32-bit machines using RF_LONGSHIFT - * (may be incorrect) - * - * Revision 1.31 1996/07/31 15:35:01 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.30 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.29 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.28 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.27 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.26 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.25 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.24 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.23 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.22 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.21 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.20 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.19 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.18 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.17 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.16 1996/05/17 14:52:04 wvcii - * added prototyping to QDelta() - * - changed buf params from volatile unsigned long * to char * - * changed QDelta for kernel - * - just bzero the buf since kernel doesn't include pq decode table - * - * Revision 1.15 1996/05/03 19:40:20 wvcii - * added includes for dag library - * - * Revision 1.14 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.13 1995/11/30 16:19:55 wvcii - * added copyright info - * - * Revision 1.12 1995/11/07 16:13:47 wvcii - * changed PQDagSelect prototype - * function no longer returns numHdrSucc, numTermAnt - * note: this file contains node functions which should be - * moved to rf_dagfuncs.c so that all node funcs are bundled together - * - * Revision 1.11 1995/10/04 03:50:33 wvcii - * removed panics, minor code cleanup in dag selection - * - * */ #include "rf_archs.h" @@ -847,7 +747,7 @@ static void QDelta( unsigned int *q = &(rf_qfor[28-coeff][0]); unsigned r = rf_rn[coeff+1]; -#ifdef KERNEL +#ifdef _KERNEL /* PQ in kernel currently not supported because the encoding/decoding table is not present */ bzero(dest, length); #else /* KERNEL */ @@ -900,7 +800,7 @@ static void QDelta( *dest++ = d; length--; } -#endif /* KERNEL */ +#endif /* _KERNEL */ } /* diff --git a/sys/dev/raidframe/rf_pq.h b/sys/dev/raidframe/rf_pq.h index dd3311249b0..111103ae024 100644 --- a/sys/dev/raidframe/rf_pq.h +++ b/sys/dev/raidframe/rf_pq.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_pq.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_pq.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * rf_pq.h */ @@ -28,50 +28,6 @@ * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. */ -/* - * : - * Log: rf_pq.h,v - * Revision 1.9 1996/07/31 15:35:05 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.8 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.7 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.6 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.5 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.4 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.3 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:56:21 jimz - * Initial revision - * - */ #ifndef _RF__RF_PQ_H_ #define _RF__RF_PQ_H_ diff --git a/sys/dev/raidframe/rf_pqdeg.c b/sys/dev/raidframe/rf_pqdeg.c index 62944fcbcb9..a2d122f0c22 100644 --- a/sys/dev/raidframe/rf_pqdeg.c +++ b/sys/dev/raidframe/rf_pqdeg.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_pqdeg.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_pqdeg.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,80 +26,6 @@ * rights to redistribute these changes. */ -/* - * Log: rf_pqdeg.c,v - * Revision 1.19 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.18 1996/07/31 16:30:01 jimz - * asm/asmap fix - * - * Revision 1.17 1996/07/31 15:35:09 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.16 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.15 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.14 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.13 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.12 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.11 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.10 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.9 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.8 1996/05/03 19:41:07 wvcii - * added includes for dag library - * - * Revision 1.7 1995/11/30 16:19:36 wvcii - * added copyright info - * - * Revision 1.6 1995/11/07 16:15:08 wvcii - * updated/added prototyping for dag creation - * - * Revision 1.5 1995/03/01 20:25:48 holland - * kernelization changes - * - * Revision 1.4 1995/02/03 22:31:36 holland - * many changes related to kernelization - * - * Revision 1.3 1995/02/01 15:13:05 holland - * moved #include of general.h out of raid.h and into each file - * - * Revision 1.2 1994/12/05 04:50:26 danner - * additional pq support - * - * Revision 1.1 1994/11/29 20:36:02 danner - * Initial revision - * - */ - #include "rf_archs.h" #if (RF_INCLUDE_DECL_PQ > 0) || (RF_INCLUDE_RAID6 > 0) diff --git a/sys/dev/raidframe/rf_pqdeg.h b/sys/dev/raidframe/rf_pqdeg.h index bca6e710e3b..a51c091c9ef 100644 --- a/sys/dev/raidframe/rf_pqdeg.h +++ b/sys/dev/raidframe/rf_pqdeg.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_pqdeg.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_pqdeg.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,25 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_pqdeg.h,v - * Revision 1.7 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.6 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.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 1995/11/30 16:19:11 wvcii - * added copyright info - * - */ - #ifndef _RF__RF_PQDEG_H_ #define _RF__RF_PQDEG_H_ @@ -83,10 +64,10 @@ typedef RF_uint8 RF_ua1024_t[1024]; extern RF_ua32_t rf_rn; extern RF_ua32_t rf_qfor[32]; -#ifndef KERNEL /* we don't support PQ in the kernel yet, so don't link in this monster table */ +#ifndef _KERNEL /* we don't support PQ in the kernel yet, so don't link in this monster table */ extern RF_ua1024_t rf_qinv[29*29]; -#else /* !KERNEL */ +#else /* !_KERNEL */ extern RF_ua1024_t rf_qinv[1]; -#endif /* !KERNEL */ +#endif /* !_KERNEL */ #endif /* !_RF__RF_PQDEG_H_ */ diff --git a/sys/dev/raidframe/rf_pqdegdags.c b/sys/dev/raidframe/rf_pqdegdags.c index 2ad5931bf4d..d04f7bc38e2 100644 --- a/sys/dev/raidframe/rf_pqdegdags.c +++ b/sys/dev/raidframe/rf_pqdegdags.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_pqdegdags.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_pqdegdags.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -31,115 +31,6 @@ * Degraded mode dags for double fault cases. */ -/* - * : - * Log: rf_pqdegdags.c,v - * Revision 1.31 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.30 1996/07/31 16:30:05 jimz - * asm/asmap fix - * - * Revision 1.29 1996/07/31 15:35:15 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.28 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.27 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.26 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.25 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.24 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.23 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.22 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.21 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.20 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.19 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.18 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.17 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.16 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.15 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.14 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.13 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.12 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.11 1996/05/03 19:47:50 wvcii - * removed include of rf_redstripe.h - * - * Revision 1.10 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.9 1995/11/30 16:17:57 wvcii - * added copyright info - * - * Revision 1.8 1995/11/07 15:33:25 wvcii - * dag creation routines now generate term node - * added asserts - * encoded commit point nodes, antecedence types into dags - * didn't add commit barrier - the code is a mess and needs to - * be cleand up first - * - */ #include "rf_archs.h" diff --git a/sys/dev/raidframe/rf_pqdegdags.h b/sys/dev/raidframe/rf_pqdegdags.h index 1057d2284ad..1ba4e4e2846 100644 --- a/sys/dev/raidframe/rf_pqdegdags.h +++ b/sys/dev/raidframe/rf_pqdegdags.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_pqdegdags.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_pqdegdags.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * rf_pqdegdags.h */ @@ -32,34 +32,6 @@ * rf_pqdegdags.c * Degraded mode dags for double fault cases. */ -/* - * : - * Log: rf_pqdegdags.h,v - * Revision 1.6 1996/07/31 15:35:20 jimz - * evenodd changes; bugfixes for double-degraded archs, generalize - * some formerly PQ-only functions - * - * Revision 1.5 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.4 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.3 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.2 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.1 1996/05/18 19:56:30 jimz - * Initial revision - * - */ #ifndef _RF__RF_PQDEGDAGS_H_ #define _RF__RF_PQDEGDAGS_H_ diff --git a/sys/dev/raidframe/rf_psstatus.c b/sys/dev/raidframe/rf_psstatus.c index a294c4a0fe9..f1ec98b839d 100644 --- a/sys/dev/raidframe/rf_psstatus.c +++ b/sys/dev/raidframe/rf_psstatus.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.c,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_psstatus.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -36,79 +36,6 @@ * *****************************************************************************/ -/* : - * Log: rf_psstatus.c,v - * Revision 1.29 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.28 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.27 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.26 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.25 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.24 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.23 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.22 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.21 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.20 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.19 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.18 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.17 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.16 1996/05/20 16:15:27 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.15 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.14 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.13 1995/11/30 16:17:18 wvcii - * added copyright info - * - */ - #include "rf_types.h" #include "rf_raid.h" #include "rf_threadid.h" diff --git a/sys/dev/raidframe/rf_psstatus.h b/sys/dev/raidframe/rf_psstatus.h index 00d5db0e586..e49e100ee1e 100644 --- a/sys/dev/raidframe/rf_psstatus.h +++ b/sys/dev/raidframe/rf_psstatus.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_psstatus.h,v 1.1 1998/11/13 04:20:32 oster Exp $ */ +/* $NetBSD: rf_psstatus.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -36,52 +36,6 @@ * *****************************************************************************/ -/* : - * Log: rf_psstatus.h,v - * Revision 1.16 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.15 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.14 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.13 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.12 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.11 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.10 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.9 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.8 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.7 1995/11/30 16:17:28 wvcii - * added copyright info - * - */ - #ifndef _RF__RF_PSSTATUS_H_ #define _RF__RF_PSSTATUS_H_ 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 */ }; diff --git a/sys/dev/raidframe/rf_raid0.c b/sys/dev/raidframe/rf_raid0.c index 2f261126d5a..4f491751bd3 100644 --- a/sys/dev/raidframe/rf_raid0.c +++ b/sys/dev/raidframe/rf_raid0.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid0.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid0.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,93 +32,6 @@ * ***************************************/ -/* - * : - * Log: rf_raid0.c,v - * Revision 1.24 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.23 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.22 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.21 1996/06/19 22:07:34 jimz - * added parity verify - * - * Revision 1.20 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.19 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.18 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.17 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.16 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.15 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.14 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.13 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.12 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.11 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.10 1996/05/03 19:37:32 wvcii - * moved dag creation routines to dag library - * - * Revision 1.9 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.8 1995/12/06 15:06:36 root - * added copyright info - * - * Revision 1.7 1995/11/17 18:57:15 wvcii - * added prototypint to MapParity - * - * Revision 1.6 1995/11/16 13:53:51 wvcii - * fixed bug in CreateRAID0WriteDAG prototype - * - * Revision 1.5 1995/11/07 15:22:01 wvcii - * changed RAID0DagSelect prototype - * function no longer generates numHdrSucc, numTermAnt - * - * Revision 1.4 1995/06/23 13:39:17 robby - * updeated to prototypes in rf_layout.h - * - */ - #include "rf_types.h" #include "rf_raid.h" #include "rf_raid0.h" diff --git a/sys/dev/raidframe/rf_raid0.h b/sys/dev/raidframe/rf_raid0.h index 1b7bb583146..9751956e94c 100644 --- a/sys/dev/raidframe/rf_raid0.h +++ b/sys/dev/raidframe/rf_raid0.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid0.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid0.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,66 +28,6 @@ /* rf_raid0.h - header file for RAID Level 0 */ -/* - * : - * Log: rf_raid0.h,v - * Revision 1.15 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.14 1996/06/19 22:07:42 jimz - * added parity verify - * - * Revision 1.13 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.12 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 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.9 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.6 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.5 1995/12/06 15:02:36 root - * added copyright info - * - * Revision 1.4 1995/11/17 18:58:33 wvcii - * added prototyping to MapParity - * - * Revision 1.3 1995/11/07 15:21:00 wvcii - * changed RAID0DagSelect prototype - * - * Revision 1.2 1995/06/23 13:39:10 robby - * updeated to prototypes in rf_layout.h - * - */ - #ifndef _RF__RF_RAID0_H_ #define _RF__RF_RAID0_H_ diff --git a/sys/dev/raidframe/rf_raid1.c b/sys/dev/raidframe/rf_raid1.c index 01d48eee0e8..f5a53407a5f 100644 --- a/sys/dev/raidframe/rf_raid1.c +++ b/sys/dev/raidframe/rf_raid1.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid1.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid1.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,196 +32,6 @@ * *****************************************************************************/ -/* - * : - * Log: rf_raid1.c,v - * Revision 1.46 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.45 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.44 1996/07/30 03:06:43 jimz - * get rid of extra rf_threadid.h include - * - * Revision 1.43 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.42 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.41 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.40 1996/07/17 14:31:19 jimz - * minor cleanup for readability - * - * Revision 1.39 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.38 1996/07/15 02:56:31 jimz - * fixed dag selection to deal with failed + recon to spare disks - * enhanced recon, parity check debugging - * - * Revision 1.37 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.36 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.35 1996/07/10 23:01:24 jimz - * Better commenting of VerifyParity (for posterity) - * - * Revision 1.34 1996/07/10 22:29:45 jimz - * VerifyParityRAID1: corrected return values for stripes in degraded mode - * - * Revision 1.33 1996/07/10 16:05:39 jimz - * fixed a couple minor bugs in VerifyParityRAID1 - * added code to correct bad RAID1 parity - * - * Revision 1.32 1996/06/20 18:47:04 jimz - * fix up verification bugs - * - * Revision 1.31 1996/06/20 15:38:59 jimz - * added parity verification - * can't correct bad parity yet, but can return pass/fail - * - * Revision 1.30 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.29 1996/06/11 08:54:27 jimz - * improved error-checking at configuration time - * - * Revision 1.28 1996/06/10 18:25:24 wvcii - * fixed bug in rf_IdentifyStripeRAID1 - added array initialization - * - * Revision 1.27 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.26 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.25 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.24 1996/06/06 17:29:43 jimz - * use CreateMirrorIdleReadDAG for mirrored read - * - * Revision 1.23 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.22 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.21 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.20 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.19 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.18 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.17 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.16 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.15 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.14 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.13 1996/05/03 19:36:22 wvcii - * moved dag creation routines to dag library - * - * Revision 1.12 1996/02/23 01:38:16 amiri - * removed chained declustering special case in SelectIdleDisk - * - * Revision 1.11 1996/02/22 16:47:18 amiri - * disabled shortest queue optimization for chained declustering - * - * Revision 1.10 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.9 1995/12/04 19:21:28 wvcii - * modified SelectIdleDisk to take a mirror node as a parameter and - * conditionally swap params 0 (data pda) and 4 (mirror pda). - * modified CreateRaidOneReadDAG so that it creates the DAG itself - * as opposed to reusing code in CreateNonredundantDAG. - * - * Revision 1.8 1995/11/30 16:07:45 wvcii - * added copyright info - * - * Revision 1.7 1995/11/16 14:46:18 wvcii - * fixed bugs in mapping and degraded dag creation, added comments - * - * Revision 1.6 1995/11/14 22:29:16 wvcii - * fixed bugs in dag creation - * - * Revision 1.5 1995/11/07 15:23:33 wvcii - * changed RAID1DagSelect prototype - * function no longer generates numHdrSucc, numTermAnt - * changed dag creation routines: - * term node generated during dag creation - * encoded commit nodes, barrier, antecedent types - * - * Revision 1.4 1995/10/10 19:09:21 wvcii - * write dag now handles non-aligned accesses - * - * Revision 1.3 1995/10/05 02:32:56 jimz - * ifdef'd out queue locking for load balancing - * - * Revision 1.2 1995/10/04 07:04:40 wvcii - * reads are now scheduled according to disk queue length. - * queue length is the sum of number of ios queued in raidframe as well as those at the disk. - * reads are sent to the disk with the shortest queue. - * testing against user disks successful, sim & kernel untested. - * - * Revision 1.1 1995/10/04 03:53:23 wvcii - * Initial revision - * - * - */ - #include "rf_raid.h" #include "rf_raid1.h" #include "rf_dag.h" diff --git a/sys/dev/raidframe/rf_raid1.h b/sys/dev/raidframe/rf_raid1.h index 932780e3fa9..21e3ad60d77 100644 --- a/sys/dev/raidframe/rf_raid1.h +++ b/sys/dev/raidframe/rf_raid1.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid1.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid1.h,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,81 +28,6 @@ /* header file for RAID Level 1 */ -/* - * : - * Log: rf_raid1.h,v - * Revision 1.17 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.16 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.15 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.14 1996/06/19 22:23:01 jimz - * parity verification is now a layout-configurable thing - * not all layouts currently support it (correctly, anyway) - * - * Revision 1.13 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.12 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 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.9 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.6 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.5 1996/05/03 19:35:34 wvcii - * moved dags to dag library - * - * Revision 1.4 1995/11/30 16:07:26 wvcii - * added copyright info - * - * Revision 1.3 1995/11/16 14:56:41 wvcii - * updated prototypes - * - * Revision 1.2 1995/11/07 15:23:01 wvcii - * changed RAID1DagSelect prototype - * function no longer generates numHdrSucc, numTermAnt - * - * Revision 1.1 1995/10/04 03:52:59 wvcii - * Initial revision - * - * - */ - #ifndef _RF__RF_RAID1_H_ #define _RF__RF_RAID1_H_ diff --git a/sys/dev/raidframe/rf_raid4.c b/sys/dev/raidframe/rf_raid4.c index 0f71c1c2d05..4ebf540f8d0 100644 --- a/sys/dev/raidframe/rf_raid4.c +++ b/sys/dev/raidframe/rf_raid4.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid4.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid4.c,v 1.2 1999/01/26 02:34:00 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,81 +32,6 @@ * ***************************************/ -/* - * : - * Log: rf_raid4.c,v - * Revision 1.24 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.23 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.22 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.21 1996/06/11 08:54:27 jimz - * improved error-checking at configuration time - * - * Revision 1.20 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.19 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.15 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.14 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.13 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.12 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.11 1996/05/03 19:39:41 wvcii - * added includes for dag library - * - * Revision 1.10 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.9 1995/12/06 15:02:46 root - * added copyright info - * - * Revision 1.8 1995/11/17 18:57:32 wvcii - * added prototyping to MapParity - * - * Revision 1.7 1995/06/23 13:38:58 robby - * updeated to prototypes in rf_layout.h - * - */ - #include "rf_raid.h" #include "rf_dag.h" #include "rf_dagutils.h" diff --git a/sys/dev/raidframe/rf_raid4.h b/sys/dev/raidframe/rf_raid4.h index b94ab92a86b..75442996b7c 100644 --- a/sys/dev/raidframe/rf_raid4.h +++ b/sys/dev/raidframe/rf_raid4.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid4.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid4.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,64 +28,6 @@ /* rf_raid4.h header file for RAID Level 4 */ -/* - * : - * Log: rf_raid4.h,v - * Revision 1.15 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.14 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.13 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.12 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 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.9 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.6 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.5 1995/12/06 15:07:03 root - * added copyright info - * - * Revision 1.4 1995/11/17 18:58:46 wvcii - * added prototyping to MapParity - * - * Revision 1.3 1995/06/23 13:38:46 robby - * updeated to prototypes in rf_layout.h - * - */ - #ifndef _RF__RF_RAID4_H_ #define _RF__RF_RAID4_H_ diff --git a/sys/dev/raidframe/rf_raid5.c b/sys/dev/raidframe/rf_raid5.c index 34dfaaf277e..ab0ff428396 100644 --- a/sys/dev/raidframe/rf_raid5.c +++ b/sys/dev/raidframe/rf_raid5.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid5.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid5.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,103 +32,6 @@ * *****************************************************************************/ -/* - * : - * Log: rf_raid5.c,v - * Revision 1.26 1996/11/05 21:10:40 jimz - * failed pda generalization - * - * Revision 1.25 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.24 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.23 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.22 1996/06/11 08:54:27 jimz - * improved error-checking at configuration time - * - * Revision 1.21 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.20 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.19 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.18 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.17 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.16 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.15 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.14 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.13 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.12 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.11 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.10 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.9 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.8 1996/05/03 19:38:58 wvcii - * moved dag creation routines to dag library - * - * Revision 1.7 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.6 1995/12/06 15:04:28 root - * added copyright info - * - * Revision 1.5 1995/11/17 18:59:41 wvcii - * added prototyping to MapParity - * - * Revision 1.4 1995/06/23 13:38:21 robby - * updeated to prototypes in rf_layout.h - * - */ - #include "rf_types.h" #include "rf_raid.h" #include "rf_raid5.h" diff --git a/sys/dev/raidframe/rf_raid5.h b/sys/dev/raidframe/rf_raid5.h index 824b1810300..6031cda05f4 100644 --- a/sys/dev/raidframe/rf_raid5.h +++ b/sys/dev/raidframe/rf_raid5.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid5.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid5.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,68 +28,6 @@ /* rf_raid5.h - header file for RAID Level 5 */ -/* - * : - * Log: rf_raid5.h,v - * Revision 1.15 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.14 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.13 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.12 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.11 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.10 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.9 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.8 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.7 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.6 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.5 1995/12/06 15:04:35 root - * added copyright info - * - * Revision 1.4 1995/11/17 19:09:08 wvcii - * added prototyping to MapParity - * - * Revision 1.3 1995/11/07 15:25:40 wvcii - * changed RAIDFiveDagSelect prototype - * function no longer generates numHdrSucc, numTermAnt - * - * Revision 1.2 1995/06/23 13:37:53 robby - * updeated to prototypes in rf_layout.h - * - */ - #ifndef _RF__RF_RAID5_H_ #define _RF__RF_RAID5_H_ diff --git a/sys/dev/raidframe/rf_raid5_rotatedspare.c b/sys/dev/raidframe/rf_raid5_rotatedspare.c index 18c6cbd257b..57ba12b7676 100644 --- a/sys/dev/raidframe/rf_raid5_rotatedspare.c +++ b/sys/dev/raidframe/rf_raid5_rotatedspare.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid5_rotatedspare.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid5_rotatedspare.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,92 +32,6 @@ * **************************************************************************/ -/* : - * Log: rf_raid5_rotatedspare.c,v - * Revision 1.22 1996/07/31 16:56:18 jimz - * dataBytesPerStripe, sectorsPerDisk init arch-indep. - * - * Revision 1.21 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.20 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.19 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.18 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.17 1996/06/11 08:54:27 jimz - * improved error-checking at configuration time - * - * Revision 1.16 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.15 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.14 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.13 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.12 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.11 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.10 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.9 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.8 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.7 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.6 1996/05/03 19:48:36 wvcii - * removed include of rf_redstripe.h - * - * Revision 1.5 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.4 1995/12/06 15:05:53 root - * added copyright info - * - * Revision 1.3 1995/11/19 21:26:29 amiri - * Added an assert to make sure numCol >= 3 - * - * Revision 1.2 1995/11/17 19:03:18 wvcii - * added prototyping to MapParity - * - */ - #include "rf_raid.h" #include "rf_raid5.h" #include "rf_dag.h" diff --git a/sys/dev/raidframe/rf_raid5_rotatedspare.h b/sys/dev/raidframe/rf_raid5_rotatedspare.h index 5a0822e0ee5..78162e16fda 100644 --- a/sys/dev/raidframe/rf_raid5_rotatedspare.h +++ b/sys/dev/raidframe/rf_raid5_rotatedspare.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raid5_rotatedspare.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raid5_rotatedspare.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,63 +28,6 @@ /* rf_raid5_rotatedspare.h - header file for RAID Level 5 with rotated sparing */ -/* : - * Log: rf_raid5_rotatedspare.h,v - * Revision 1.13 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.12 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.11 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.10 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.9 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.8 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.7 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.6 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.5 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.4 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.3 1995/12/06 15:06:00 root - * added copyright info - * - * Revision 1.2 1995/11/17 19:09:54 wvcii - * added prototyping to MapParity - * - */ - #ifndef _RF__RF_RAID5_ROTATEDSPARE_H_ #define _RF__RF_RAID5_ROTATEDSPARE_H_ diff --git a/sys/dev/raidframe/rf_raidframe.h b/sys/dev/raidframe/rf_raidframe.h index 5933bc23ab8..31738615423 100644 --- a/sys/dev/raidframe/rf_raidframe.h +++ b/sys/dev/raidframe/rf_raidframe.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_raidframe.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_raidframe.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -34,56 +34,6 @@ * *****************************************************/ -/* - * : - * - * Log: rf_raidframe.h,v - * Revision 1.21 1996/06/17 03:00:15 jimz - * Change RAIDFRAME_GET_INFO interface to work around ioctl - * size limitation problem. This operation now takes a pointer - * to a pointer, and does its own copyout() (so it can transfer - * more than 8k at a time). - * - * Revision 1.20 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.19 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.18 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.17 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.16 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.15 1996/05/02 22:09:48 jimz - * change devs and spares in device_config to RF_RaidDisk_t - * - * Revision 1.14 1995/12/06 15:03:33 root - * added copyright info - * - * Revision 1.13 1995/09/30 20:39:54 jimz - * added new ioctls: - * RAIDFRAME_RESET_ACCTOTALS - * RAIDFRAME_GET_ACCTOTALS - * RAIDFRAME_KEEP_ACCTOTALS - * - * Revision 1.12 1995/09/25 20:11:51 wvcii - * Added #include "rf_raid.h" - * - * - */ #ifndef _RF__RF_RAIDFRAME_H_ #define _RF__RF_RAIDFRAME_H_ diff --git a/sys/dev/raidframe/rf_randmacros.h b/sys/dev/raidframe/rf_randmacros.h index 6946f25249c..7a07f302b8f 100644 --- a/sys/dev/raidframe/rf_randmacros.h +++ b/sys/dev/raidframe/rf_randmacros.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_randmacros.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_randmacros.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,198 +30,9 @@ * some macros to simplify using random in a multithreaded environment */ -/* : - * Log: rf_randmacros.h,v - * Revision 1.17 1996/08/12 22:37:57 jimz - * use regular random() stuff for AIX - * - * Revision 1.16 1996/08/11 00:41:03 jimz - * fix up for aix4 - * - * Revision 1.15 1996/07/29 05:22:34 jimz - * use rand/srand on hpux - * - * Revision 1.14 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.13 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.12 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.11 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.10 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.9 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.8 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.7 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.6 1996/05/21 18:52:56 jimz - * mask out highest bit from RANDOM (was causing angst) - * - * Revision 1.5 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.4 1995/12/06 15:05:41 root - * added copyright info - * - */ #ifndef _RF__RF_RANDMACROS_H_ #define _RF__RF_RANDMACROS_H_ -#ifndef KERNEL - -#ifdef __osf__ -/* - * Okay, here's the deal. The DEC man page for initstate_r() sez: - * - * int initstate_r(unsigned seed, char *state, int size, char **retval, - * struct random_data *rand_data); - * - * That wouldn't bug me so much, if /usr/include/random.h on the alpha - * didn't say: - * - * int initstate_r(unsigned, char *, int, RANDMOD *); - * - * Most of the other random functions have similar problems (docs - * don't match random.h). This is the case for random_r(), for - * instance. Generally, I'm inclined to trust the code over the - * documentation. Problem is, I have no clue what the arguments for - * the prototyped versions are, since they don't have descriptive names - * comma the bastards. - * - * Update: I looked at the DU sources to get this straightened out. - * The docs are correct. and everything in random.h is wrong. Uh, that's - * really cool or something. Not. I'm going to try slapping in prototypes - * that match my view of the universe, here. - * - * Okay, now let's have some more fun. /usr/include/stdlib.h also defines - * all this stuff, only differently. I mean differently from random.h, - * _and_ differently from the source. How cool is _that_? - * - * --jimz - */ -#ifndef _NO_PROTO -#define _NO_PROTO -#define _RF_SPANKME -#endif /* !_NO_PROTO */ -#include <random.h> -#ifdef _RF_SPANKME -#undef _NO_PROTO -#undef _RF_SPANKME -#endif /* _RF_SPANKME */ - -extern int initstate_r(unsigned seed, char *arg_state, int n, char **retval, - struct random_data *rand_data); -extern int random_r(int *retval, struct random_data *rand_data); -#endif /* __osf__ */ -#ifdef SIMULATE -#if defined(DEC_OSF) || defined(hpux) -extern int random(void); -extern int srandom(unsigned); -#endif /* DEC_OSF || hpux */ -#if defined(AIX) && RF_AIXVERS == 3 -extern int random(void); -extern int srandom(unsigned); -#endif /* AIX && RF_AIXVERS == 3 */ -#endif /* SIMULATE */ - -#define RF_FASTRANDOM 0 /* when >0 make RANDOM a macro instead of a function */ - -#ifdef __osf__ -long rf_do_random(long *rval, struct random_data *rdata); /* in utils.c */ -#endif /* __osf__ */ - -#ifndef SIMULATE - -#ifdef __osf__ -/* - * Mark's original comment about this rigamarole was, "What a pile of crap." - */ -#define RF_DECLARE_RANDOM \ - struct random_data randdata; \ - long randstate[64+1]; \ - char *stptr = ((char *) randstate)+4; \ - char *randst; \ - long randval - -#define RF_DECLARE_STATIC_RANDOM \ - static struct random_data randdata_st; \ - static long randstate_st[64+1]; \ - static char *stptr_st = ((char *) randstate_st)+4; \ - static char *randst_st; \ - long randval_st; - -#define RF_INIT_RANDOM(_s_) \ - randdata.state = NULL; \ - initstate_r((unsigned) (_s_), stptr, 64, &randst, &randdata); - -#define RF_INIT_STATIC_RANDOM(_s_) \ - randdata_st.state = NULL; \ - initstate_r((unsigned) (_s_), stptr_st, 64, &randst_st, &randdata_st); - -#if RF_FASTRANDOM > 0 -#define RF_RANDOM() (random_r(&randval, &randdata),randval) -#define RF_STATIC_RANDOM() (random_r(&randval_st, &randdata_st),randval_st) -#else /* RF_FASTRANDOM > 0 */ -#define RF_RANDOM() (rf_do_random(&randval, &randdata)&0x7fffffffffffffff) -#define RF_STATIC_RANDOM() rf_do_random(&randval_st, &randdata_st) -#endif /* RF_FASTRANDOM > 0 */ - -#define RF_SRANDOM(_s_) srandom_r((_s_), &randdata) -#define RF_STATIC_SRANDOM(_s_) srandom_r((_s_), &randdata_st) -#endif /* __osf__ */ - -#ifdef AIX -#define RF_INIT_STATIC_RANDOM(_s_) -#define RF_DECLARE_STATIC_RANDOM static int rf_rand_decl##__LINE__ -#define RF_DECLARE_RANDOM int rf_rand_decl##__LINE__ -#define RF_RANDOM() random() -#define RF_STATIC_RANDOM() random() -#define RF_INIT_RANDOM(_n_) srandom(_n_) -#endif /* AIX */ - -#else /* !SIMULATE */ - -#define RF_INIT_STATIC_RANDOM(_s_) -#define RF_DECLARE_STATIC_RANDOM static int rf_rand_decl##__LINE__ -#define RF_DECLARE_RANDOM int rf_rand_decl##__LINE__ -#if defined(sun) || defined(hpux) -#define RF_RANDOM() rand() -#define RF_STATIC_RANDOM() rand() -#define RF_INIT_RANDOM(_n_) srand(_n_) -#else /* sun || hpux */ -#define RF_RANDOM() random() -#define RF_STATIC_RANDOM() random() -#define RF_INIT_RANDOM(_n_) srandom(_n_) -#endif /* sun || hpux */ - -#endif /* !SIMULATE */ - -#endif /* !KERNEL */ #endif /* !_RF__RF_RANDMACROS_H_ */ diff --git a/sys/dev/raidframe/rf_reconbuffer.c b/sys/dev/raidframe/rf_reconbuffer.c index 26276d4d4ca..d1490827715 100644 --- a/sys/dev/raidframe/rf_reconbuffer.c +++ b/sys/dev/raidframe/rf_reconbuffer.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconbuffer.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_reconbuffer.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,85 +32,6 @@ * ***************************************************/ -/* : - * Log: rf_reconbuffer.c,v - * Revision 1.33 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.32 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.31 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.30 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.29 1996/06/06 01:23:58 jimz - * don't free reconCtrlPtr until after all fields have been used out of it - * - * Revision 1.28 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.27 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.26 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.25 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.24 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.23 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.22 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.21 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.20 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.19 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.18 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.17 1995/12/06 15:03:24 root - * added copyright info - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_raid.h" #include "rf_reconbuffer.h" #include "rf_acctrace.h" @@ -121,33 +42,11 @@ #include "rf_reconutil.h" #include "rf_nwayxor.h" -#ifdef KERNEL #define Dprintf1(s,a) if (rf_reconbufferDebug) printf(s,a) #define Dprintf2(s,a,b) if (rf_reconbufferDebug) printf(s,a,b) #define Dprintf3(s,a,b,c) if (rf_reconbufferDebug) printf(s,a,b,c) #define Dprintf4(s,a,b,c,d) if (rf_reconbufferDebug) printf(s,a,b,c,d) #define Dprintf5(s,a,b,c,d,e) if (rf_reconbufferDebug) printf(s,a,b,c,d,e) -#else /* KERNEL */ -#define Dprintf1(s,a) if (rf_reconbufferDebug) rf_debug_printf(s,(void *)((unsigned long)a),NULL,NULL,NULL,NULL,NULL,NULL,NULL) -#define Dprintf2(s,a,b) if (rf_reconbufferDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),NULL,NULL,NULL,NULL,NULL,NULL) -#define Dprintf3(s,a,b,c) if (rf_reconbufferDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),NULL,NULL,NULL,NULL,NULL) -#define Dprintf4(s,a,b,c,d) if (rf_reconbufferDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),NULL,NULL,NULL,NULL) -#define Dprintf5(s,a,b,c,d,e) if (rf_reconbufferDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),(void *)((unsigned long)e),NULL,NULL,NULL) -#endif /* KERNEL */ - -#if defined(__NetBSD__) && defined(_KERNEL) - -/* XXX XXX XXX This is wrong, for a number of reasons: - a) thread_block doesn't exist with UVM - b) The prototype begin used here is wrong for the regular VM - (regular VM expects a (char *) as an argument. I don't put - that in here as this code uses thread_block with no arguments.. :-/ - -*/ -#if 0 -void thread_block(void); -#endif -#endif /***************************************************************************************** * @@ -363,11 +262,11 @@ int rf_MultiWayReconXor(raidPtr, pssPtr) RF_ASSERT(pssPtr->rbuf != NULL); RF_ASSERT(numBufs > 0 && numBufs < RF_PS_MAX_BUFS); -#ifdef KERNEL +#ifdef _KERNEL #ifndef __NetBSD__ thread_block(); /* yield the processor before doing a big XOR */ #endif -#endif /* KERNEL */ +#endif /* _KERNEL */ /* * XXX * diff --git a/sys/dev/raidframe/rf_reconbuffer.h b/sys/dev/raidframe/rf_reconbuffer.h index 55036ef2f63..2ad3f00761e 100644 --- a/sys/dev/raidframe/rf_reconbuffer.h +++ b/sys/dev/raidframe/rf_reconbuffer.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconbuffer.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_reconbuffer.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,47 +32,6 @@ * *******************************************************************/ -/* : - * Log: rf_reconbuffer.h,v - * Revision 1.9 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.8 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.7 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.6 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.5 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.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 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.2 1995/12/06 15:04:47 root - * added copyright info - * - */ - #ifndef _RF__RF_RECONBUFFER_H_ #define _RF__RF_RECONBUFFER_H_ diff --git a/sys/dev/raidframe/rf_reconmap.c b/sys/dev/raidframe/rf_reconmap.c index a0d776fe09d..008044ea0c2 100644 --- a/sys/dev/raidframe/rf_reconmap.c +++ b/sys/dev/raidframe/rf_reconmap.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconmap.c,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_reconmap.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -33,77 +33,6 @@ * *************************************************************************/ -/* : - * Log: rf_reconmap.c,v - * Revision 1.23 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.22 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.21 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.20 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.19 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.18 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.17 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.16 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.15 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.14 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.13 1996/05/24 04:40:57 jimz - * don't do recon meter demo stuff in kernel - * - * Revision 1.12 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.11 1996/05/20 16:14:50 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.10 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.9 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.8 1995/12/06 15:05:23 root - * added copyright info - * - */ - #include "rf_raid.h" #include <sys/time.h> #include "rf_general.h" diff --git a/sys/dev/raidframe/rf_reconmap.h b/sys/dev/raidframe/rf_reconmap.h index 9eb6f056b10..36d2ad7a68a 100644 --- a/sys/dev/raidframe/rf_reconmap.h +++ b/sys/dev/raidframe/rf_reconmap.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconmap.h,v 1.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_reconmap.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,39 +30,6 @@ * rf_reconMap.h -- Header file describing reconstruction status data structure ******************************************************************************/ -/* : - * Log: rf_reconmap.h,v - * Revision 1.10 1996/08/01 15:59:25 jimz - * minor cleanup - * - * Revision 1.9 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.8 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.7 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.6 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.5 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.4 1995/12/06 15:04:01 root - * added copyright info - * - */ - #ifndef _RF__RF_RECONMAP_H_ #define _RF__RF_RECONMAP_H_ diff --git a/sys/dev/raidframe/rf_reconstruct.c b/sys/dev/raidframe/rf_reconstruct.c index 038345fb573..3c41115986e 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.1 1998/11/13 04:20:33 oster Exp $ */ +/* $NetBSD: rf_reconstruct.c,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,194 +32,9 @@ * ************************************************************/ -/* - * : - * Log: rf_reconstruct.c,v - * Revision 1.65 1996/08/06 22:24:56 jimz - * get rid of sys/buf.h on linux - * - * Revision 1.64 1996/07/30 04:28:53 jimz - * include rf_types.h first - * - * Revision 1.63 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.62 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.61 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.60 1996/07/15 02:57:18 jimz - * added debugging (peek at first couple bytes of recon buffers - * as they go by) - * - * Revision 1.59 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.58 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.57 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.56 1996/06/17 03:24:59 jimz - * include shutdown.h for define of now-macroized ShutdownCreate - * - * Revision 1.55 1996/06/11 10:58:36 jimz - * get rid of simulator-testcode artifacts - * add generic ReconDoneProc mechanism instead - * - * Revision 1.54 1996/06/10 14:18:58 jimz - * move user, throughput stats into per-array structure - * - * Revision 1.53 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.52 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.51 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.50 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.49 1996/06/06 01:24:36 jimz - * don't get rid of reconCtrlPtr until we're done with it - * - * Revision 1.48 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.47 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.46 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.45 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.44 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.43 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.42 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.41 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.40 1996/05/24 04:40:40 jimz - * don't do demoMode stuff in kernel - * - * Revision 1.39 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.38 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.37 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.36 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.35 1996/05/01 16:28:16 jimz - * don't include ccmn.h - * - * Revision 1.34 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.33 1995/12/06 15:05:09 root - * added copyright info - * - * Revision 1.32 1995/11/17 19:04:11 wvcii - * added prototyping to ComputePSDiskOffsets - * prow and pcol now type int (were u_int) - * - * Revision 1.31 1995/11/17 01:39:35 amiri - * isolated some demo related stuff - * - * Revision 1.30 1995/10/18 19:33:14 amiri - * removed fflush (stdin/stdout) calls from ReconstructFailedDisk - * - * Revision 1.29 1995/10/11 10:20:33 jimz - * #if 0'd problem code for sigmetrics - * - * Revision 1.28 1995/10/10 23:18:15 amiri - * added fflushes to stdin/stdout before requesting - * input in demo mode. - * - * Revision 1.27 1995/10/10 19:24:47 amiri - * took out update_mode (for demo) from - * KERNEL source. - * - * Revision 1.26 1995/10/09 23:35:48 amiri - * added support for more meters in recon. demo - * - * Revision 1.25 1995/07/03 18:14:30 holland - * changed the way the number of floating recon bufs & - * the head sep limit get set - * - * Revision 1.24 1995/07/02 15:07:42 holland - * bug fixes related to getting distributed sparing numbers - * - * Revision 1.23 1995/06/23 13:36:36 robby - * updeated to prototypes in rf_layout.h - * -*/ - -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_types.h" #include <sys/time.h> -#ifndef LINUX #include <sys/buf.h> -#endif /* !LINUX */ #include <sys/errno.h> #include "rf_raid.h" #include "rf_reconutil.h" @@ -243,9 +58,7 @@ #include "rf_demo.h" #endif /* RF_DEMO > 0 */ -#ifdef KERNEL #include "rf_kintf.h" -#endif /* KERNEL */ /* setting these to -1 causes them to be set to their default values if not set by debug options */ @@ -268,10 +81,8 @@ #define DDprintf7(s,a,b,c,d,e,f,g) if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),(void *)((unsigned long)e),(void *)((unsigned long)f),(void *)((unsigned long)g),NULL) #define DDprintf8(s,a,b,c,d,e,f,g,h) if (rf_reconDebug) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),(void *)((unsigned long)e),(void *)((unsigned long)f),(void *)((unsigned long)g),(void *)((unsigned long)h)) -#ifdef KERNEL static RF_Thread_t recon_thr_handle; static int recon_thread_initialized = 0; -#endif /* KERNEL */ static RF_FreeList_t *rf_recond_freelist; #define RF_MAX_FREE_RECOND 4 @@ -389,12 +200,10 @@ int rf_ConfigureReconstruction(listp) return(rc); } -#ifdef KERNEL if (!recon_thread_initialized) { RF_CREATE_THREAD(recon_thr_handle, rf_ReconKernelThread, NULL); recon_thread_initialized = 1; } -#endif /* KERNEL */ return(0); } @@ -433,10 +242,8 @@ static void FreeReconDesc(reconDesc) printf("RAIDframe: %lu recon event waits, %lu recon delays\n", (long)reconDesc->numReconEventWaits, (long)reconDesc->numReconExecDelays); #endif /* RF_RECON_STATS > 0 */ -#ifdef KERNEL printf("RAIDframe: %lu max exec ticks\n", (long)reconDesc->maxReconExecTicks); -#endif /* KERNEL */ #if (RF_RECON_STATS > 0) || defined(KERNEL) printf("\n"); #endif /* (RF_RECON_STATS > 0) || KERNEL */ @@ -455,10 +262,6 @@ int rf_ReconstructFailedDisk(raidPtr, row, col) RF_RowCol_t row; RF_RowCol_t col; { -#ifdef SIMULATE - RF_PendingRecon_t *pend; - RF_RowCol_t r, c; -#endif /* SIMULATE */ RF_LayoutSW_t *lp; int rc; @@ -468,25 +271,12 @@ int rf_ReconstructFailedDisk(raidPtr, row, col) * The current infrastructure only supports reconstructing one * disk at a time for each array. */ -#ifdef SIMULATE - if (raidPtr->reconInProgress) { - RF_Malloc(pend, sizeof(RF_PendingRecon_t), (RF_PendingRecon_t *)); - pend->row = row; - pend->col = col; - pend->next = raidPtr->pendingRecon; - raidPtr->pendingRecon = pend; - /* defer until current recon completes */ - return(0); - } - raidPtr->reconInProgress++; -#else /* SIMULATE */ RF_LOCK_MUTEX(raidPtr->mutex); while (raidPtr->reconInProgress) { RF_WAIT_COND(raidPtr->waitForReconCond, raidPtr->mutex); } raidPtr->reconInProgress++; RF_UNLOCK_MUTEX(raidPtr->mutex); -#endif /* SIMULATE */ rc = rf_ReconstructFailedDiskBasic(raidPtr, row, col); } else { @@ -494,28 +284,12 @@ int rf_ReconstructFailedDisk(raidPtr, row, col) lp->parityConfig); rc = EIO; } -#ifdef SIMULATE - pend = raidPtr->pendingRecon; - if (pend) { - /* launch next recon */ - raidPtr->pendingRecon = pend->next; - r = pend->row; - c = pend->col; - RF_Free(pend, sizeof(RF_PendingRecon_t)); - return(rf_ReconstructFailedDisk(raidPtr, r, c)); - } -#else /* SIMULATE */ RF_LOCK_MUTEX(raidPtr->mutex); raidPtr->reconInProgress--; RF_UNLOCK_MUTEX(raidPtr->mutex); RF_SIGNAL_COND(raidPtr->waitForReconCond); -#if 1 -#if defined(__NetBSD__) && defined(_KERNEL) wakeup(&raidPtr->waitForReconCond); /* XXX Methinks this will be needed at some point... GO*/ -#endif -#endif -#endif /* SIMULATE */ return(rc); } @@ -576,11 +350,9 @@ int rf_ReconstructFailedDiskBasic(raidPtr, row, col) reconDesc->numReconExecDelays = 0; reconDesc->numReconEventWaits = 0; #endif /* RF_RECON_STATS > 0 */ -#ifdef KERNEL reconDesc->reconExecTimerRunning = 0; reconDesc->reconExecTicks = 0; reconDesc->maxReconExecTicks = 0; -#endif /* KERNEL */ #if RF_DEMO > 0 && !defined(SIMULATE) if (rf_demoMode) { char cbuf[10]; @@ -629,10 +401,6 @@ int rf_ContinueReconstructFailedDisk(reconDesc) Dprintf("RECON: end request suspend\n"); rf_StartUserStats(raidPtr); /* zero out the stats kept on user accs */ -#ifdef SIMULATE - if (retcode) return(0); -#endif /* SIMULATE */ - /* fall through to state 1 */ case 1: @@ -688,11 +456,7 @@ int rf_ContinueReconstructFailedDisk(reconDesc) while (reconDesc->numDisksDone < raidPtr->numCol-1) { event = rf_GetNextReconEvent(reconDesc, row, (void (*)(void *))rf_ContinueReconstructFailedDisk,reconDesc); -#ifdef SIMULATE - if (event==NULL) {return(0);} -#else /* SIMULATE */ RF_ASSERT(event); -#endif /* SIMULATE */ if (ProcessReconEvent(raidPtr, row, event)) reconDesc->numDisksDone++; raidPtr->reconControl[row]->percentComplete = 100 - (rf_UnitsLeftToReconstruct(mapPtr) * 100 / mapPtr->totalRUs); @@ -726,11 +490,7 @@ int rf_ContinueReconstructFailedDisk(reconDesc) while (rf_UnitsLeftToReconstruct(raidPtr->reconControl[row]->reconMap) > 0) { event = rf_GetNextReconEvent(reconDesc, row, (void (*)(void *))rf_ContinueReconstructFailedDisk,reconDesc); -#ifdef SIMULATE - if (event==NULL) {return(0);} -#else /* SIMULATE */ RF_ASSERT(event); -#endif /* SIMULATE */ (void) ProcessReconEvent(raidPtr, row, event); /* ignore return code */ raidPtr->reconControl[row]->percentComplete = 100 - (rf_UnitsLeftToReconstruct(mapPtr) * 100 / mapPtr->totalRUs); @@ -761,10 +521,6 @@ int rf_ContinueReconstructFailedDisk(reconDesc) rf_StopUserStats(raidPtr); rf_PrintUserStats(raidPtr); /* print out the stats on user accs accumulated during recon */ -#ifdef SIMULATE - if (retcode) return(0); -#endif /* SIMULATE */ - /* fall through to state 6 */ case 6: diff --git a/sys/dev/raidframe/rf_reconstruct.h b/sys/dev/raidframe/rf_reconstruct.h index 7f4a2b5b205..00cf5468bd7 100644 --- a/sys/dev/raidframe/rf_reconstruct.h +++ b/sys/dev/raidframe/rf_reconstruct.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstruct.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_reconstruct.h,v 1.2 1999/01/26 02:34:01 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,94 +30,6 @@ * rf_reconstruct.h -- header file for reconstruction code *********************************************************/ -/* : - * Log: rf_reconstruct.h,v - * Revision 1.25 1996/08/01 15:57:24 jimz - * minor cleanup - * - * Revision 1.24 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.23 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.22 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.21 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.20 1996/06/11 10:57:30 jimz - * add rf_RegisterReconDoneProc - * - * Revision 1.19 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.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 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.15 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.14 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.13 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.12 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.11 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.10 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.9 1995/12/06 15:04:55 root - * added copyright info - * - */ - #ifndef _RF__RF_RECONSTRUCT_H_ #define _RF__RF_RECONSTRUCT_H_ diff --git a/sys/dev/raidframe/rf_reconstub.c b/sys/dev/raidframe/rf_reconstub.c index cbc097a635b..2598a00bf02 100644 --- a/sys/dev/raidframe/rf_reconstub.c +++ b/sys/dev/raidframe/rf_reconstub.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconstub.c,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_reconstub.c,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -39,27 +39,6 @@ * **************************************************************************/ -/* : - * Log: rf_reconstub.c,v - * Revision 1.9 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.8 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.7 1996/04/03 23:25:33 jimz - * make inclusion of raidframe_recon.h #ifdef KERNEL - * - * Revision 1.6 1995/12/06 15:06:54 root - * added copyright info - * - */ - -#ifdef KERNEL -#include <raidframe_recon.h> -#endif /* KERNEL */ #include <sys/errno.h> #if RAIDFRAME_RECON == 0 diff --git a/sys/dev/raidframe/rf_reconutil.c b/sys/dev/raidframe/rf_reconutil.c index d98bfff07d7..39d3d12bb0f 100644 --- a/sys/dev/raidframe/rf_reconutil.c +++ b/sys/dev/raidframe/rf_reconutil.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconutil.c,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_reconutil.c,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,89 +30,6 @@ * rf_reconutil.c -- reconstruction utilities ********************************************/ -/* : - * Log: rf_reconutil.c,v - * Revision 1.32 1996/07/29 14:05:12 jimz - * fix numPUs/numRUs confusion (everything is now numRUs) - * clean up some commenting, return values - * - * Revision 1.31 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.30 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.29 1996/06/19 17:53:48 jimz - * move GetNumSparePUs, InstallSpareTable ops into layout switch - * - * Revision 1.28 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.27 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.26 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.25 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.24 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.23 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.22 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.21 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.20 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.19 1996/05/20 16:14:55 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.18 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.17 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.16 1995/12/06 15:05:31 root - * added copyright info - * - */ - #include "rf_types.h" #include "rf_raid.h" #include "rf_desc.h" diff --git a/sys/dev/raidframe/rf_reconutil.h b/sys/dev/raidframe/rf_reconutil.h index 4e7cfd45800..a3fe2d34a4c 100644 --- a/sys/dev/raidframe/rf_reconutil.h +++ b/sys/dev/raidframe/rf_reconutil.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_reconutil.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_reconutil.h,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -30,52 +30,6 @@ * rf_reconutil.h -- header file for reconstruction utilities ************************************************************/ -/* : - * Log: rf_reconutil.h,v - * Revision 1.10 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.9 1996/07/13 00:00:59 jimz - * sanitized generalized reconstruction architecture - * cleaned up head sep, rbuf problems - * - * Revision 1.8 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.7 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.6 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.5 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 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.2 1995/12/06 15:06:47 root - * added copyright info - * - */ - #ifndef _RF__RF_RECONUTIL_H_ #define _RF__RF_RECONUTIL_H_ diff --git a/sys/dev/raidframe/rf_revent.c b/sys/dev/raidframe/rf_revent.c index 02997993221..104adf27a36 100644 --- a/sys/dev/raidframe/rf_revent.c +++ b/sys/dev/raidframe/rf_revent.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_revent.c,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_revent.c,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,61 +28,6 @@ /* * revent.c -- reconstruction event handling code */ -/* - * : - * Log: rf_revent.c,v - * Revision 1.22 1996/08/11 00:41:11 jimz - * extern hz only for kernel - * - * Revision 1.21 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.20 1996/06/17 03:18:04 jimz - * include shutdown.h for macroized ShutdownCreate - * - * Revision 1.19 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.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 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.15 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.14 1996/05/20 16:13:40 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * use RF_FREELIST for revents - * - * Revision 1.13 1996/05/18 20:09:47 jimz - * bit of cleanup to compile cleanly in kernel, once again - * - * Revision 1.12 1996/05/18 19:51:34 jimz - * major code cleanup- fix syntax, make some types consistent, - * add prototypes, clean out dead code, et cetera - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif #include <sys/errno.h> @@ -100,27 +45,15 @@ static RF_FreeList_t *rf_revent_freelist; #define RF_REVENT_INITIAL 8 -#ifdef KERNEL #include <sys/proc.h> extern int hz; -#ifndef __NetBSD__ -#define DO_WAIT(_rc) mpsleep(&(_rc)->eventQueue, PZERO, "raidframe eventq", 0, \ - (void *) simple_lock_addr((_rc)->eq_mutex), MS_LOCK_SIMPLE) -#else #define DO_WAIT(_rc) tsleep(&(_rc)->eventQueue, PRIBIO | PCATCH, "raidframe eventq", 0) -#endif #define DO_SIGNAL(_rc) wakeup(&(_rc)->eventQueue) -#else /* KERNEL */ - -#define DO_WAIT(_rc) RF_WAIT_COND((_rc)->eq_cond, (_rc)->eq_mutex) -#define DO_SIGNAL(_rc) RF_SIGNAL_COND((_rc)->eq_cond) - -#endif /* KERNEL */ static void rf_ShutdownReconEvent(void *); @@ -181,14 +114,6 @@ RF_ReconEvent_t *rf_GetNextReconEvent(reconDesc, row, continueFunc, continueArg) rctrl->continueFunc=continueFunc; rctrl->continueArg=continueArg; -#ifdef SIMULATE - if (!rctrl->eventQueue) { - RF_UNLOCK_MUTEX(rctrl->eq_mutex); - return (NULL); - } -#else /* SIMULATE */ - -#ifdef KERNEL /* mpsleep timeout value: secs = timo_val/hz. 'ticks' here is defined as cycle-counter ticks, not softclock ticks */ #define MAX_RECON_EXEC_TICKS 15000000 /* 150 Mhz => this many ticks in 100 ms */ @@ -212,34 +137,23 @@ RF_ReconEvent_t *rf_GetNextReconEvent(reconDesc, row, continueFunc, continueArg) #if RF_RECON_STATS > 0 reconDesc->numReconExecDelays++; #endif /* RF_RECON_STATS > 0 */ -#ifndef __NetBSD__ - status = mpsleep(&reconDesc->reconExecTicks, PZERO, "recon delay", RECON_TIMO, (void *) simple_lock_addr(rctrl->eq_mutex), MS_LOCK_SIMPLE); -#else status = tsleep(&reconDesc->reconExecTicks, PRIBIO | PCATCH, "recon delay", RECON_TIMO ); -#endif RF_ASSERT(status == EWOULDBLOCK); reconDesc->reconExecTicks = 0; } } -#endif /* KERNEL */ while (!rctrl->eventQueue) { #if RF_RECON_STATS > 0 reconDesc->numReconEventWaits++; #endif /* RF_RECON_STATS > 0 */ DO_WAIT(rctrl); -#ifdef KERNEL reconDesc->reconExecTicks = 0; /* we've just waited */ -#endif /* KERNEL */ } -#endif /* SIMULATE */ - -#ifdef KERNEL reconDesc->reconExecTimerRunning = 1; RF_ETIMER_START(reconDesc->recon_exec_timer); -#endif /* KERNEL */ event = rctrl->eventQueue; rctrl->eventQueue = event->next; @@ -273,11 +187,7 @@ void rf_CauseReconEvent(raidPtr, row, col, arg, type) rctrl->eq_count++; RF_UNLOCK_MUTEX(rctrl->eq_mutex); -#ifndef SIMULATE DO_SIGNAL(rctrl); -#else /* !SIMULATE */ - (rctrl->continueFunc)(rctrl->continueArg); -#endif /* !SIMULATE */ } /* allocates and initializes a recon event descriptor */ diff --git a/sys/dev/raidframe/rf_revent.h b/sys/dev/raidframe/rf_revent.h index df4f10cff47..22d3ef74b3f 100644 --- a/sys/dev/raidframe/rf_revent.h +++ b/sys/dev/raidframe/rf_revent.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_revent.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_revent.h,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,37 +32,6 @@ * *******************************************************************/ -/* : - * Log: rf_revent.h,v - * Revision 1.7 1996/07/15 05:40:41 jimz - * some recon datastructure cleanup - * better handling of multiple failures - * added undocumented double-recon test - * - * Revision 1.6 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.5 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.4 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.3 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.2 1995/12/06 15:04:20 root - * added copyright info - * - */ - #ifndef _RF__RF_REVENT_H_ #define _RF__RF_REVENT_H_ diff --git a/sys/dev/raidframe/rf_rst.h b/sys/dev/raidframe/rf_rst.h index 82eab0bcda1..073d2dddf6d 100644 --- a/sys/dev/raidframe/rf_rst.h +++ b/sys/dev/raidframe/rf_rst.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_rst.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_rst.h,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -28,32 +28,6 @@ /* rf_rst.h - defines raidSim trace entry */ -/* : - * Log: rf_rst.h,v - * Revision 1.7 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.6 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.5 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.4 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.3 1995/12/06 15:03:15 root - * added copyright info - * - */ - #ifndef _RF__RF_RST_H_ #define _RF__RF_RST_H_ diff --git a/sys/dev/raidframe/rf_shutdown.c b/sys/dev/raidframe/rf_shutdown.c index df002a9fcc7..692c5956a1d 100644 --- a/sys/dev/raidframe/rf_shutdown.c +++ b/sys/dev/raidframe/rf_shutdown.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_shutdown.c,v 1.2 1999/01/14 22:49:05 thorpej Exp $ */ +/* $NetBSD: rf_shutdown.c,v 1.3 1999/01/26 02:34:02 oster Exp $ */ /* * rf_shutdown.c */ @@ -42,15 +42,7 @@ static void rf_FreeShutdownEnt(RF_ShutdownList_t *ent) { -#ifdef KERNEL -#ifdef __NetBSD__ FREE(ent, M_RAIDFRAME); -#else - FREE(ent, M_DEVBUF); -#endif /* __NetBSD__ */ -#else /* KERNEL */ - free(ent); -#endif /* KERNEL */ } int _rf_ShutdownCreate( @@ -66,21 +58,7 @@ int _rf_ShutdownCreate( * Have to directly allocate memory here, since we start up before * and shutdown after RAIDframe internal allocation system. */ -#ifdef KERNEL -#ifdef __NetBSD__ ent = (RF_ShutdownList_t *)malloc( sizeof(RF_ShutdownList_t), M_RAIDFRAME, M_WAITOK); -#if 0 - MALLOC(ent, RF_ShutdownList_t *, sizeof(RF_ShutdownList_t), M_RAIDFRAME, M_WAITOK); -#endif -#else - ent = (RF_ShutdownList_t *)malloc( sizeof(RF_ShutdownList_t), M_DEVBUF, M_WAITOK); -#if 0 - MALLOC(ent, RF_ShutdownList_t *, sizeof(RF_ShutdownList_t), M_DEVBUF, M_WAITOK); -#endif -#endif /* __NetBSD__ */ -#else /* KERNEL */ - ent = (RF_ShutdownList_t *)malloc(sizeof(RF_ShutdownList_t)); -#endif /* KERNEL */ if (ent == NULL) return(ENOMEM); ent->cleanup = cleanup; diff --git a/sys/dev/raidframe/rf_sstf.c b/sys/dev/raidframe/rf_sstf.c index 8d89925f160..f7b0d9c6394 100644 --- a/sys/dev/raidframe/rf_sstf.c +++ b/sys/dev/raidframe/rf_sstf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_sstf.c,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_sstf.c,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,35 +32,6 @@ * ******************************************************************************/ -/* - * : - * Log: rf_sstf.c,v - * Revision 1.7 1996/06/19 14:09:56 jimz - * SstfPeek wasn't calling closest_to_arm() properly- would bogart - * low priority I/Os - * - * Revision 1.6 1996/06/18 20:53:11 jimz - * fix up disk queueing (remove configure routine, - * add shutdown list arg to create routines) - * - * Revision 1.5 1996/06/13 20:42:13 jimz - * add scan, cscan - * - * Revision 1.4 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.3 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.2 1996/06/06 01:11:35 jimz - * fixed many priority-related bugs - * - * Revision 1.1 1996/06/05 19:17:40 jimz - * Initial revision - * - */ - #include "rf_alloclist.h" #include "rf_stripelocks.h" #include "rf_layout.h" diff --git a/sys/dev/raidframe/rf_sstf.h b/sys/dev/raidframe/rf_sstf.h index 5deb1819bd8..1925fcaa3af 100644 --- a/sys/dev/raidframe/rf_sstf.h +++ b/sys/dev/raidframe/rf_sstf.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_sstf.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_sstf.h,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,30 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_sstf.h,v - * Revision 1.6 1996/06/18 20:53:11 jimz - * fix up disk queueing (remove configure routine, - * add shutdown list arg to create routines) - * - * Revision 1.5 1996/06/13 20:42:08 jimz - * add scan, cscan - * - * Revision 1.4 1996/06/07 22:26:27 jimz - * type-ify which_ru (RF_ReconUnitNum_t) - * - * Revision 1.3 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.2 1996/06/06 01:22:24 jimz - * minor cleanup - * - * Revision 1.1 1996/06/05 19:17:40 jimz - * Initial revision - * - */ - #ifndef _RF__RF_SSTF_H_ #define _RF__RF_SSTF_H_ diff --git a/sys/dev/raidframe/rf_states.c b/sys/dev/raidframe/rf_states.c index b310a29bb01..7adfed54e01 100644 --- a/sys/dev/raidframe/rf_states.c +++ b/sys/dev/raidframe/rf_states.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_states.c,v 1.3 1999/01/15 17:55:52 explorer Exp $ */ +/* $NetBSD: rf_states.c,v 1.4 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,197 +26,6 @@ * rights to redistribute these changes. */ -/* - * : - * Log: rf_states.c,v - * Revision 1.45 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.44 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.43 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.42 1996/07/17 21:00:58 jimz - * clean up timer interface, tracing - * - * Revision 1.41 1996/07/11 19:08:00 jimz - * generalize reconstruction mechanism - * allow raid1 reconstructs via copyback (done with array - * quiesced, not online, therefore not disk-directed) - * - * Revision 1.40 1996/06/17 14:38:33 jimz - * properly #if out RF_DEMO code - * fix bug in MakeConfig that was causing weird behavior - * in configuration routines (config was not zeroed at start) - * clean up genplot handling of stacks - * - * Revision 1.39 1996/06/11 18:12:17 jimz - * got rid of evil race condition in LastState - * - * Revision 1.38 1996/06/10 14:18:58 jimz - * move user, throughput stats into per-array structure - * - * Revision 1.37 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.36 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.35 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.34 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.33 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.32 1996/05/30 12:59:18 jimz - * make etimer happier, more portable - * - * Revision 1.31 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.30 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.29 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.28 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.27 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.26 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.25 1996/05/20 19:31:46 jimz - * straighten out syntax problems - * - * Revision 1.24 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.23 1996/05/16 23:37:33 jimz - * fix misspelled "else" - * - * Revision 1.22 1996/05/15 22:33:32 jimz - * appropriately #ifdef cache stuff - * - * Revision 1.21 1996/05/06 22:09:20 wvcii - * rf_State_ExecuteDAG now only executes the first dag - * of each parity stripe in a multi-stripe access - * - * rf_State_ProcessDAG now executes all dags in a - * multi-stripe access except the first dag of each stripe. - * - * Revision 1.20 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.19 1995/11/19 16:29:50 wvcii - * replaced LaunchDAGState with CreateDAGState, ExecuteDAGState - * created rf_ContinueDagAccess - * - * Revision 1.18 1995/11/07 15:37:23 wvcii - * deleted states SendDAGState, RetryDAGState - * added staes: LaunchDAGState, ProcessDAGState - * code no longer has a hard-coded retry count of 1 but will support - * retries until a dag can not be found (selected) to perform the user request - * - * Revision 1.17 1995/10/09 23:36:08 amiri - * *** empty log message *** - * - * Revision 1.16 1995/10/09 18:36:58 jimz - * moved call to StopThroughput for user-level driver to rf_driver.c - * - * Revision 1.15 1995/10/09 18:07:23 wvcii - * lastState now call rf_StopThroughputStats - * - * Revision 1.14 1995/10/05 18:56:31 jimz - * no-op file if !INCLUDE_VS - * - * Revision 1.13 1995/09/30 20:38:24 jimz - * LogTraceRec now takes a Raid * as its first argument - * - * Revision 1.12 1995/09/19 22:58:54 jimz - * integrate DKUSAGE into raidframe - * - * Revision 1.11 1995/09/07 01:26:55 jimz - * Achive basic compilation in kernel. Kernel functionality - * is not guaranteed at all, but it'll compile. Mostly. I hope. - * - * Revision 1.10 1995/07/26 03:28:31 robby - * intermediary checkin - * - * Revision 1.9 1995/07/23 02:50:33 robby - * oops. fixed boo boo - * - * Revision 1.8 1995/07/22 22:54:54 robby - * removed incorrect comment - * - * Revision 1.7 1995/07/21 19:30:26 robby - * added idle state for rf_when-idle.c - * - * Revision 1.6 1995/07/10 19:06:28 rachad - * *** empty log message *** - * - * Revision 1.5 1995/07/10 17:30:38 robby - * added virtual striping lock states - * - * Revision 1.4 1995/07/08 18:05:39 rachad - * Linked up Claudsons code with the real cache - * - * Revision 1.3 1995/07/06 14:38:50 robby - * changed get_thread_id to get_threadid - * - * Revision 1.2 1995/07/06 14:24:15 robby - * added log - * - */ - -#ifdef _KERNEL -#define KERNEL -#endif - -#ifdef KERNEL -#ifndef __NetBSD__ -#include <dkusage.h> -#endif /* !__NetBSD__ */ -#endif /* KERNEL */ - #include <sys/errno.h> #include "rf_archs.h" @@ -254,11 +63,6 @@ - increment desc->state when they have finished their work. */ - -#ifdef SIMULATE -extern int global_async_flag; -#endif /* SIMULATE */ - static char *StateName(RF_AccessState_t state) { switch (state) { @@ -281,10 +85,6 @@ void rf_ContinueRaidAccess(RF_RaidAccessDesc_t *desc) int suspended = RF_FALSE; int current_state_index = desc->state; RF_AccessState_t current_state = desc->states[current_state_index]; - -#ifdef SIMULATE - rf_SetCurrentOwner(desc->owner); -#endif /* SIMULATE */ do { @@ -383,37 +183,6 @@ int rf_State_LastState(RF_RaidAccessDesc_t *desc) callbackArg.p = desc->callbackArg; -#ifdef SIMULATE - int tid; - rf_get_threadid(tid); - - if (rf_accessDebug) - printf("async_flag set to %d\n",global_async_flag); - global_async_flag=desc->async_flag; - if (rf_accessDebug) - printf("Will now do clean up for %d\n",rf_GetCurrentOwner()); - rf_FreeRaidAccDesc(desc); - - if (callbackFunc) - callbackFunc(callbackArg); -#else /* SIMULATE */ - -#ifndef KERNEL - - if (!(desc->flags & RF_DAG_NONBLOCKING_IO)) { - /* bummer that we have to take another lock here */ - RF_LOCK_MUTEX(desc->mutex); - RF_ASSERT(desc->flags&RF_DAG_ACCESS_COMPLETE); - RF_SIGNAL_COND(desc->cond); /* DoAccess frees the desc in the blocking-I/O case */ - RF_UNLOCK_MUTEX(desc->mutex); - } - else - rf_FreeRaidAccDesc(desc); - - if (callbackFunc) - callbackFunc(callbackArg); - -#else /* KERNEL */ if (!(desc->flags & RF_DAG_TEST_ACCESS)) {/* don't biodone if this */ #if DKUSAGE > 0 RF_DKU_END_IO(((RF_Raid_t *)desc->raidPtr)->raidid,(struct buf *)desc->bp); @@ -434,9 +203,6 @@ int rf_State_LastState(RF_RaidAccessDesc_t *desc) if (callbackFunc) callbackFunc(callbackArg); rf_FreeRaidAccDesc(desc); -#endif /* ! KERNEL */ -#endif /* SIMULATE */ - return RF_FALSE; } @@ -666,9 +432,7 @@ int rf_State_CreateDAG (RF_RaidAccessDesc_t *desc) for (i = 0; i < desc->numStripes; i++) { dag_h = desc->dagArray[i].dags; while (dag_h) { -#ifdef KERNEL dag_h->bp = (struct buf *) desc->bp; -#endif /* KERNEL */ dag_h->tracerec = tracerec; dag_h = dag_h->next; } @@ -845,11 +609,6 @@ int rf_State_Cleanup(RF_RaidAccessDesc_t *desc) } } -#ifdef SIMULATE - /* refresh current owner in case blocked ios where allowed to run */ - rf_SetCurrentOwner(desc->owner); -#endif /* SIMULATE */ - RF_ETIMER_STOP(timer); RF_ETIMER_EVAL(timer); tracerec->specific.user.lock_us += RF_ETIMER_VAL_US(timer); diff --git a/sys/dev/raidframe/rf_states.h b/sys/dev/raidframe/rf_states.h index 0de07ffb295..40ece355d23 100644 --- a/sys/dev/raidframe/rf_states.h +++ b/sys/dev/raidframe/rf_states.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_states.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_states.h,v 1.2 1999/01/26 02:34:02 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,28 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_states.h,v - * Revision 1.5 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.4 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.3 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.2 1996/05/06 22:08:28 wvcii - * added copyright info and change log - * - * Revision 1.1 1995/07/06 14:23:39 robby - * Initial revision - * - */ - #ifndef _RF__RF_STATES_H_ #define _RF__RF_STATES_H_ diff --git a/sys/dev/raidframe/rf_stripelocks.c b/sys/dev/raidframe/rf_stripelocks.c index 45487dcc449..f6e2764c1fd 100644 --- a/sys/dev/raidframe/rf_stripelocks.c +++ b/sys/dev/raidframe/rf_stripelocks.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_stripelocks.c,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_stripelocks.c,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,93 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_stripelocks.c,v - * Revision 1.35 1996/06/10 12:50:57 jimz - * Add counters to freelists to track number of allocations, frees, - * grows, max size, etc. Adjust a couple sets of PRIME params based - * on the results. - * - * Revision 1.34 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.33 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.32 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.31 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.30 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.29 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.28 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.27 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.26 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.25 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.24 1996/05/20 16:15:00 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.23 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.22 1996/05/16 22:28:11 jimz - * misc cleanup - * - * Revision 1.21 1996/05/15 23:39:52 jimz - * remove #if 0 code - * - * Revision 1.20 1996/05/15 23:37:38 jimz - * convert to using RF_FREELIST stuff for StripeLockDesc allocation - * - * Revision 1.19 1996/05/08 18:00:53 jimz - * fix number of args to debug printf - * - * Revision 1.18 1996/05/06 22:33:07 jimz - * added better debug info - * - * Revision 1.17 1996/05/06 22:09:01 wvcii - * added copyright info and change log - * - */ - /* * stripelocks.c -- code to lock stripes for read and write access * @@ -143,10 +56,6 @@ * searching through stripe lock descriptors. */ -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_types.h" #include "rf_raid.h" #include "rf_stripelocks.h" @@ -167,11 +76,7 @@ #define Dprintf7(s,a,b,c,d,e,f,g) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),(void *)((unsigned long)e),(void *)((unsigned long)f),(void *)((unsigned long)g),NULL) #define Dprintf8(s,a,b,c,d,e,f,g,h) rf_debug_printf(s,(void *)((unsigned long)a),(void *)((unsigned long)b),(void *)((unsigned long)c),(void *)((unsigned long)d),(void *)((unsigned long)e),(void *)((unsigned long)f),(void *)((unsigned long)g),(void *)((unsigned long)h)) -#ifndef KERNEL -#define FLUSH fflush(stdout) -#else /* !KERNEL */ #define FLUSH -#endif /* !KERNEL */ #define HASH_STRIPEID(_sid_) ( (_sid_) & (rf_lockTableSize-1) ) #define MAX_FREELIST 100 diff --git a/sys/dev/raidframe/rf_stripelocks.h b/sys/dev/raidframe/rf_stripelocks.h index d5d4085c838..fc99b18aef8 100644 --- a/sys/dev/raidframe/rf_stripelocks.h +++ b/sys/dev/raidframe/rf_stripelocks.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_stripelocks.h,v 1.1 1998/11/13 04:20:34 oster Exp $ */ +/* $NetBSD: rf_stripelocks.h,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -26,58 +26,6 @@ * rights to redistribute these changes. */ -/* : - * Log: rf_stripelocks.h,v - * Revision 1.22 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.21 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.20 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.19 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.18 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.17 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.16 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.15 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.14 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.13 1996/05/06 22:08:46 wvcii - * added copyright info and change log - * - */ - /***************************************************************************** * * stripelocks.h -- header file for locking stripes diff --git a/sys/dev/raidframe/rf_strutils.c b/sys/dev/raidframe/rf_strutils.c index 60a8318e27a..3ba00c73d7b 100644 --- a/sys/dev/raidframe/rf_strutils.c +++ b/sys/dev/raidframe/rf_strutils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_strutils.c,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_strutils.c,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * rf_strutils.c * @@ -35,13 +35,6 @@ * I put them in a file by themselves because they're needed in * setconfig, in the user-level driver, and in the kernel. * - * : - * Log: rf_strutils.c,v - * Revision 1.2 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. - * */ #include "rf_utils.h" diff --git a/sys/dev/raidframe/rf_sys.c b/sys/dev/raidframe/rf_sys.c index 09f5e2a0c51..e8857fd9f5b 100644 --- a/sys/dev/raidframe/rf_sys.c +++ b/sys/dev/raidframe/rf_sys.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_sys.c,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_sys.c,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * rf_sys.c * @@ -31,229 +31,30 @@ * rights to redistribute these changes. */ -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_types.h" #include "rf_sys.h" -#ifndef KERNEL -#include <errno.h> -#include <fcntl.h> -#include <nlist.h> -#include <stdio.h> -#include <unistd.h> -#endif /* !KERNEL */ #include <sys/param.h> -#if !defined(sun) && !defined(__NetBSD__) && !defined(LINUX) && (!defined(MACH) || defined(__osf__)) -#include <sys/sysinfo.h> -#endif /* !sun !__NetBSD__ && !LINUX && (!MACH || __osf__) */ #include <sys/time.h> -#ifdef __osf__ -#include <machine/rpb.h> -#include <machine/hal/hal_sysinfo.h> -#endif /* __osf__ */ #include "rf_etimer.h" #include "rf_general.h" #include "rf_threadstuff.h" -#ifdef KERNEL extern struct rpb *rpb; -#endif /* KERNEL */ /* timer stuff */ -#ifdef __alpha -long rf_timer_max_val; -long rf_timer_ticks_per_second; -unsigned long rf_timer_ticks_per_usec; -#endif /* __alpha */ - - -#ifdef __NetBSD__ long rf_timer_max_val; long rf_timer_ticks_per_second; unsigned long rf_timer_ticks_per_usec; -#endif /* __NetBSD__ */ - -#if !defined(KERNEL) && !defined(SIMULATE) && (RF_UTILITY == 0) -pthread_attr_t raidframe_attr_default; - -int rf_thread_create( - RF_Thread_t *thread, - pthread_attr_t attr, - void (*func)(), - RF_ThreadArg_t arg) -{ - int rc; - -#ifdef __osf__ - rc = pthread_create(thread, attr, (pthread_startroutine_t)func, arg); -#endif /* __osf__ */ -#ifdef AIX - rc = pthread_create(thread, &attr, (void *(*)(void *))func, arg); -#endif /* AIX */ - if (rc) - return(errno); - rc = pthread_detach(thread); - if (rc) { - /* don't return error, because the thread exists, and must be cleaned up */ - RF_ERRORMSG1("RAIDFRAME WARNING: failed detaching thread %lx\n", thread); - } - return(0); -} -#endif /* !KERNEL && !SIMULATE && (RF_UTILITY == 0) */ - -#if defined(__osf__) && !defined(KERNEL) -int rf_get_cpu_ticks_per_sec(long *ticksp) -{ - char *kmemdevname, buf[sizeof(struct rpb)+8]; - char *memdevname, kernel_name[MAXPATHLEN+1]; - struct nlist nl[2], *np; - unsigned long rpb_addr; - int kfd, rc, fd, bad; - struct rpb rpb; - off_t off; - - kmemdevname = "/dev/kmem"; - memdevname = "/dev/mem"; - - np = &nl[0]; - bzero((char *)np, sizeof(nl)); - nl[0].n_name = "pmap_physhwrpb"; - nl[1].n_name = NULL; - - bad = 0; - - /* get running kernel name */ - bzero(kernel_name, MAXPATHLEN+1); - kernel_name[0] = '/'; - rc = getsysinfo(GSI_BOOTEDFILE, &kernel_name[1], MAXPATHLEN, 0, 0); - if (rc != 1) { - RF_ERRORMSG("RAIDFRAME: cannot get booted kernel name\n"); - if (errno) - return(errno); - else - return(EIO); - } - - rc = nlist(kernel_name, np); - if (rc) { - RF_ERRORMSG1("RAIDFRAME: cannot nlist %s\n", kernel_name); - return(EIO); - } - if (np->n_type == 0) { - RF_ERRORMSG1("RAIDFRAME: cannot usefully nlist %s\n", kernel_name); - return(EIO); - } - - kfd = open(kmemdevname, O_RDONLY); - if (kfd < 0) { - perror(kmemdevname); - return(errno); - } - fd = open(memdevname, O_RDONLY); - if (fd < 0) { - perror(kmemdevname); - return(errno); - } - - /* - * pmap_physhwrpb is a variable in the kernel containing the physical - * address of the hardware RPB. We'll just find that variable and - * read it, then use that as a physical memory address to read the - * rpb itself. - */ - - off = lseek(kfd, np->n_value, SEEK_SET); - if (off != np->n_value) { - RF_ERRORMSG("RAIDFRAME: cannot seek to address of hwrpb addr\n"); - return(EIO); - } - - rc = read(kfd, &rpb_addr, sizeof(rpb_addr)); - if (rc != sizeof(rpb_addr)) { - RF_ERRORMSG("RAIDFRAME: cannot read address of hwrpb addr\n"); - if (rc < 0) - bad = errno; - bad = EIO; - goto isbad; - } - - off = lseek(fd, rpb_addr, SEEK_SET); - if (off != rpb_addr) { - RF_ERRORMSG("RAIDFRAME: cannot seek to rpb addr\n"); - bad = EIO; - goto isbad; - } - - rc = read(fd, &rpb, sizeof(rpb)); - if (rc != sizeof(rpb)) { - RF_ERRORMSG1("RAIDFRAME: cannot read rpb (rc=%d)\n", rc); - if (rc < 0) - bad = errno; - bad = EIO; - goto isbad; - } - - /* - * One extra sanity check: the RPB is self-identifying. - * This field is guaranteed to have the value - * 0x0000004250525748, always. - */ - if (rpb.rpb_string != 0x0000004250525748) { - bad = EIO; - goto isbad; - } - -isbad: - if (bad) { - RF_ERRORMSG("ERROR: rpb failed validation\n"); - RF_ERRORMSG1("RAIDFRAME: perhaps %s has changed since booting?\n", - kernel_name); - return(bad); - } - - *ticksp = rpb.rpb_counter; - - close(kfd); - close(fd); - - return(0); -} -#endif /* __osf__ && !KERNEL */ int rf_ConfigureEtimer(listp) RF_ShutdownList_t **listp; { -#ifdef __osf__ - int rc; - -#ifdef KERNEL - rf_timer_ticks_per_second = rpb->rpb_counter; -#else /* KERNEL */ - rc = rf_get_cpu_ticks_per_sec(&rf_timer_ticks_per_second); - if (rc) - return(rc); -#endif /* KERNEL */ - rf_timer_max_val = RF_DEF_TIMER_MAX_VAL; - rf_timer_ticks_per_usec = rf_timer_ticks_per_second/1000000; -#endif /* __osf__ */ -#ifdef NETBSD_ALPHA - /* - * XXX cgd fix this - */ - rf_timer_ticks_per_second = 233100233; - rf_timer_max_val = RF_DEF_TIMER_MAX_VAL; - rf_timer_ticks_per_usec = rf_timer_ticks_per_second/1000000; -#endif /* NETBSD_ALPHA */ -#if defined(__NetBSD__) && defined(_KERNEL) /* XXX just picking some random values to keep things happy... without these set, stuff will panic on division by zero errors!! */ rf_timer_ticks_per_second = 233100233; rf_timer_max_val = RF_DEF_TIMER_MAX_VAL; rf_timer_ticks_per_usec = rf_timer_ticks_per_second/1000000; -#endif return(0); } diff --git a/sys/dev/raidframe/rf_sys.h b/sys/dev/raidframe/rf_sys.h index a7f784079a0..3f12e4abae4 100644 --- a/sys/dev/raidframe/rf_sys.h +++ b/sys/dev/raidframe/rf_sys.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_sys.h,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_sys.h,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * rf_sys.h * @@ -38,31 +38,4 @@ int rf_ConfigureEtimer(RF_ShutdownList_t **listp); -#if defined(__osf__) && !defined(KERNEL) -int rf_get_cpu_ticks_per_sec(long *ticksp); -#endif /* __osf__ && !KERNEL */ - -#ifdef AIX -#include <nlist.h> -#include <sys/time.h> -#if RF_AIXVers == 3 -int gettimeofday(struct timeval *tp, struct timezone *tzp); -#endif /* RF_AIXVers == 3 */ -int knlist(struct nlist *namelist, int nel, int size); -int ffs(int index); -#endif /* AIX */ - -#ifdef sun -#define bcopy(a,b,n) memcpy(b,a,n) -#define bzero(b,n) memset(b,0,n) -#define bcmp(a,b,n) memcmp(a,b,n) -#endif /* sun */ - -#ifdef __GNUC__ -/* we use gcc -Wall to check our anal-retentiveness level, occasionally */ -#if defined(DEC_OSF) && !defined(KERNEL) -extern int ioctl(int fd, int req, ...); -#endif /* DEC_OSF && !KERNEL */ -#endif /* __GNUC__ */ - #endif /* !_RF__RF_SYS_H_ */ diff --git a/sys/dev/raidframe/rf_threadid.h b/sys/dev/raidframe/rf_threadid.h index ddebf2df152..422e9be41e7 100644 --- a/sys/dev/raidframe/rf_threadid.h +++ b/sys/dev/raidframe/rf_threadid.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_threadid.h,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_threadid.h,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -37,193 +37,18 @@ * none of this is used in the kernel, so it all gets compiled out if KERNEL is defined */ -/* : - * Log: rf_threadid.h,v - * Revision 1.17 1996/08/12 20:11:17 jimz - * fix up for AIX4 - * - * Revision 1.16 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.15 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.14 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.13 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.12 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.11 1996/05/20 16:13:46 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.10 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.9 1996/05/17 13:29:06 jimz - * did a dance on get_threadid such that it will do the pthread_attr_t -> int - * assignment without warnings, even on really anal compilers - * - * Revision 1.8 1995/12/06 15:15:00 root - * added copyright info - * - */ - #ifndef _RF__RF_THREADID_H_ #define _RF__RF_THREADID_H_ -#ifdef _KERNEL -#define KERNEL -#endif - -#ifndef SIMULATE -#ifndef KERNEL - -/* - * User - */ - -#include "rf_threadstuff.h" - -extern int rf_numThrsRegistered; -extern pthread_key_t rf_thread_id_key; -RF_DECLARE_EXTERN_MUTEX(rf_threadid_mutex) - -#define RF_THREAD_MAX 200 - -/* these should be global since a function is declared. Should be invoked at only one place in code */ -#define RF_DECLARE_GLOBAL_THREADID \ - int rf_numThrsRegistered = 0; \ - pthread_key_t rf_thread_id_key; \ - RF_DECLARE_MUTEX(rf_threadid_mutex) \ - RF_Thread_t rf_regdThrs[RF_THREAD_MAX]; \ - void rf_ThreadIdEmptyFunc() {} - -/* setup must be called exactly once, i.e. it can't be called by each thread */ - -#ifdef AIX -typedef void (*pthread_destructor_t)(void *); -#endif /* AIX */ - -#ifdef __osf__ -#define rf_setup_threadid() { \ - extern void rf_ThreadIdEmptyFunc(); \ - pthread_keycreate(&rf_thread_id_key, (pthread_destructor_t) rf_ThreadIdEmptyFunc); \ - rf_mutex_init(&rf_threadid_mutex); /* XXX check return val */ \ - rf_numThrsRegistered = 0; \ -} -#endif /* __osf__ */ - -#ifdef AIX -#define rf_setup_threadid() { \ - extern void rf_ThreadIdEmptyFunc(); \ - pthread_key_create(&rf_thread_id_key, (pthread_destructor_t) rf_ThreadIdEmptyFunc); \ - rf_mutex_init(&rf_threadid_mutex); /* XXX check return val */ \ - rf_numThrsRegistered = 0; \ -} -#endif /* AIX */ - -#define rf_shutdown_threadid() { \ - rf_mutex_destroy(&rf_threadid_mutex); \ -} - -#ifdef __osf__ -typedef pthread_addr_t RF_THID_cast_t; -#endif /* __osf__ */ - -#ifdef AIX -typedef void *RF_THID_cast_t; -#endif /* AIX */ - -#define rf_assign_threadid() {RF_LOCK_MUTEX(rf_threadid_mutex); \ - if (pthread_setspecific(rf_thread_id_key, (RF_THID_cast_t) ((unsigned long)(rf_numThrsRegistered++)))) { RF_PANIC(); } \ - RF_UNLOCK_MUTEX(rf_threadid_mutex);} - -#ifdef __osf__ -#define rf_get_threadid(_id_) { \ - RF_THID_cast_t _val; \ - unsigned long _val2; \ - if (pthread_getspecific(rf_thread_id_key, &_val)) \ - RF_PANIC(); \ - (_val2) = (unsigned long)_val; \ - (_id_) = (int)_val2; \ -} -#endif /* __osf__ */ - -#ifdef AIX -#define rf_get_threadid(_id_) { \ - RF_THID_cast_t _val; \ - unsigned long _val2; \ - _val = pthread_getspecific(rf_thread_id_key); \ - (_val2) = (unsigned long)_val; \ - (_id_) = (int)_val2; \ -} -#endif /* AIX */ - -#else /* KERNEL */ - /* * Kernel */ -#ifndef __NetBSD__ -#include <kern/task.h> -#include <kern/thread.h> -#include <mach/machine/vm_param.h> -#endif - #define RF_DECLARE_GLOBAL_THREADID #define rf_setup_threadid() #define rf_shutdown_threadid() #define rf_assign_threadid() - - -#ifdef __NetBSD__ - #define rf_get_threadid(_id_) _id_ = 0; -#else -#define rf_get_threadid(_id_) { \ - thread_t thread = current_thread(); \ - _id_ = (int)(((thread->thread_self)>>(8*sizeof(int *)))&0x0fffffff); \ -} -#endif /* __NetBSD__ */ -#endif /* KERNEL */ - -#else /* SIMULATE */ - -/* - * Simulator - */ - -#include "rf_diskevent.h" - -#define RF_DECLARE_GLOBAL_THREADID -#define rf_setup_threadid() -#define rf_shutdown_threadid() -#define rf_assign_threadid() - -#define rf_get_threadid(_id_) _id_ = rf_GetCurrentOwner() - -#endif /* SIMULATE */ #endif /* !_RF__RF_THREADID_H_ */ diff --git a/sys/dev/raidframe/rf_threadstuff.c b/sys/dev/raidframe/rf_threadstuff.c index 207dd77d1b3..9a54a9c1041 100644 --- a/sys/dev/raidframe/rf_threadstuff.c +++ b/sys/dev/raidframe/rf_threadstuff.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_threadstuff.c,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_threadstuff.c,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * rf_threadstuff.c */ @@ -29,11 +29,6 @@ * rights to redistribute these changes. */ -#ifdef _KERNEL -#define KERNEL -#endif - - #include "rf_types.h" #include "rf_threadstuff.h" #include "rf_general.h" @@ -180,243 +175,10 @@ int _rf_init_threadgroup(g, file, line) return(0); } -/* - * User - */ - -#if !defined(KERNEL) && !defined(SIMULATE) - -#if RF_DEBUG_ATOMIC > 0 - -static RF_ATEnt_t rf_atent_list; -static RF_ATEnt_t *rf_atent_done_list=NULL; - -static pthread_mutex_t rf_atent_mutex; - -void rf_atent_init() -{ - int rc; - - rc = pthread_mutex_init(&rf_atent_mutex, pthread_mutexattr_default); - if (rc) { - fprintf(stderr, "ERROR: rc=%d creating rf_atent_mutex\n", rc); - fflush(stderr); - RF_PANIC(); - } - rf_atent_list.next = rf_atent_list.prev = &rf_atent_list; -} - -#define ATENT_TYPE(_e_) ((((_e_)->type == 0)||((_e_)->type > 2)) ? 0 : (_e_)->type) -#define ATENT_OTYPE(_e_) ((((_e_)->otype == 0)||((_e_)->otype > 2)) ? 0 : (_e_)->otype) - -void rf_atent_shutdown() -{ - int rc, num_freed[3], num_not_freed[3]; - RF_ATEnt_t *r, *n; - - num_freed[0] = num_freed[1] = num_freed[2] = 0; - num_not_freed[0] = num_not_freed[1] = num_not_freed[2] = 0; - printf("rf_atent_shutdown:\n"); - for(r=rf_atent_list.next;r!=&rf_atent_list;r=r->next) { - printf("r=%lx type=%d file=%s line=%d\n", r, r->type, r->file, r->line); - num_not_freed[ATENT_TYPE(r)]++; - } - rc = pthread_mutex_destroy(&rf_atent_mutex); - if (rc) { - fprintf(stderr, "ERROR: rc=%d destroying rf_atent_mutex\n", rc); - fflush(stderr); - RF_PANIC(); - } - for(r=rf_atent_done_list;r;r=n) { - n = r->next; - num_freed[ATENT_OTYPE(r)]++; - free(r); - } - printf("%d mutexes not freed %d conditions not freed %d bogus not freed\n", - num_not_freed[1], num_not_freed[2], num_not_freed[0]); - printf("%d mutexes freed %d conditions freed %d bogus freed\n", - num_freed[1], num_freed[2], num_freed[0]); - fflush(stdout); - fflush(stderr); -} - -static RF_ATEnt_t *AllocATEnt(file,line) - char *file; - int line; -{ - RF_ATEnt_t *t; - - t = (RF_ATEnt_t *)malloc(sizeof(RF_ATEnt_t)); - if (t == NULL) { - RF_PANIC(); - } - t->file = file; - t->line = line; - t->type = 0; - return(t); -} - -static void FreeATEnt(t) - RF_ATEnt_t *t; -{ - t->otype = t->type; - t->type = 0; - t->next = rf_atent_done_list; - rf_atent_done_list = t; -} - -int _rf_mutex_init(m, file, line) - RF_ATEnt_t **m; - char *file; - int line; -{ - RF_ATEnt_t *a; - int rc; - - a = AllocATEnt(file,line); - rc = pthread_mutex_init(&a->m, pthread_mutexattr_default); - if (rc == 0) { - pthread_mutex_lock(&rf_atent_mutex); - a->next = rf_atent_list.next; - a->prev = &rf_atent_list; - a->type = RF_ATENT_M; - a->next->prev = a; - a->prev->next = a; - pthread_mutex_unlock(&rf_atent_mutex); - } - else { - fprintf(stderr, "ERROR: rc=%d allocating mutex %s:%d\n", - rc, file, line); - fflush(stderr); - RF_PANIC(); - } - *m = a; - return(0); -} - -int _rf_mutex_destroy(m, file, line) - RF_ATEnt_t **m; - char *file; - int line; -{ - RF_ATEnt_t *r; - int rc; - - r = *m; - rc = pthread_mutex_destroy(&r->m); - if (rc) { - fprintf(stderr, "ERROR: rc=%d destroying mutex %s:%d\n", - rc, file, line); - fflush(stderr); - RF_PANIC(); - } - pthread_mutex_lock(&rf_atent_mutex); - r->next->prev = r->prev; - r->prev->next = r->next; - FreeATEnt(r); - pthread_mutex_unlock(&rf_atent_mutex); - *m = NULL; - return(0); -} - -int _rf_cond_init(c, file, line) - RF_ATEnt_t **c; - char *file; - int line; -{ - RF_ATEnt_t *a; - int rc; - - a = AllocATEnt(file,line); - rc = pthread_cond_init(&a->c, pthread_condattr_default); - if (rc == 0) { - pthread_mutex_lock(&rf_atent_mutex); - a->next = rf_atent_list.next; - a->prev = &rf_atent_list; - a->next->prev = a; - a->prev->next = a; - a->type = RF_ATENT_C; - pthread_mutex_unlock(&rf_atent_mutex); - } - else { - fprintf(stderr, "ERROR: rc=%d allocating cond %s:%d\n", - rc, file, line); - fflush(stderr); - RF_PANIC(); - } - *c = a; - return(0); -} - -int _rf_cond_destroy(c, file, line) - RF_ATEnt_t **c; - char *file; - int line; -{ - RF_ATEnt_t *r; - int rc; - - r = *c; - rc = pthread_cond_destroy(&r->c); - if (rc) { - fprintf(stderr, "ERROR: rc=%d destroying cond %s:%d\n", - rc, file, line); - fflush(stderr); - RF_PANIC(); - } - pthread_mutex_lock(&rf_atent_mutex); - r->next->prev = r->prev; - r->prev->next = r->next; - FreeATEnt(r); - pthread_mutex_unlock(&rf_atent_mutex); - *c = NULL; - return(0); -} - -#else /* RF_DEBUG_ATOMIC > 0 */ - -int rf_mutex_init(m) - pthread_mutex_t *m; -{ -#ifdef __osf__ - return(pthread_mutex_init(m, pthread_mutexattr_default)); -#endif /* __osf__ */ -#ifdef AIX - return(pthread_mutex_init(m, &pthread_mutexattr_default)); -#endif /* AIX */ -} - -int rf_mutex_destroy(m) - pthread_mutex_t *m; -{ - return(pthread_mutex_destroy(m)); -} - -int rf_cond_init(c) - pthread_cond_t *c; -{ -#ifdef __osf__ - return(pthread_cond_init(c, pthread_condattr_default)); -#endif /* __osf__ */ -#ifdef AIX - return(pthread_cond_init(c, &pthread_condattr_default)); -#endif /* AIX */ -} - -int rf_cond_destroy(c) - pthread_cond_t *c; -{ - return(pthread_cond_destroy(c)); -} - -#endif /* RF_DEBUG_ATOMIC > 0 */ - -#endif /* !KERNEL && !SIMULATE */ /* * Kernel */ -#ifdef KERNEL int rf_mutex_init(m) decl_simple_lock_data(,*m) { @@ -442,35 +204,3 @@ int rf_cond_destroy(c) { return(0); } - - -#endif /* KERNEL */ - -/* - * Simulator - */ -#ifdef SIMULATE -int rf_mutex_init(m) - RF_DECLARE_MUTEX(*m) -{ - return(0); -} - -int rf_mutex_destroy(m) - RF_DECLARE_MUTEX(*m) -{ - return(0); -} - -int rf_cond_init(c) - RF_DECLARE_COND(*c) -{ - return(0); -} - -int rf_cond_destroy(c) - RF_DECLARE_COND(*c) -{ - return(0); -} -#endif /* SIMULATE */ diff --git a/sys/dev/raidframe/rf_threadstuff.h b/sys/dev/raidframe/rf_threadstuff.h index 21e5cba23ef..5c0a027f2d4 100644 --- a/sys/dev/raidframe/rf_threadstuff.h +++ b/sys/dev/raidframe/rf_threadstuff.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_threadstuff.h,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_threadstuff.h,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -40,98 +40,17 @@ * */ -/* : - * Log: rf_threadstuff.h,v - * Revision 1.38 1996/08/12 22:37:47 jimz - * add AIX stuff for user driver - * - * Revision 1.37 1996/08/11 00:47:09 jimz - * make AIX friendly - * - * Revision 1.36 1996/07/23 22:06:59 jimz - * add rf_destroy_threadgroup - * - * Revision 1.35 1996/07/23 21:31:16 jimz - * add init_threadgroup - * - * Revision 1.34 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.33 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.32 1996/06/17 03:01:11 jimz - * get rid of JOIN stuff - * - * Revision 1.31 1996/06/14 23:15:38 jimz - * attempt to deal with thread GC problem - * - * Revision 1.30 1996/06/11 18:12:36 jimz - * get rid of JOIN operations - * use ThreadGroup stuff instead - * fix some allocation/deallocation and sync bugs - * - * Revision 1.29 1996/06/11 13:48:10 jimz - * make kernel RF_THREAD_CREATE give back happier return vals - * - * Revision 1.28 1996/06/10 16:40:01 jimz - * break user-level stuff out into lib+apps - * - * Revision 1.27 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.26 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.25 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.24 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.23 1996/05/20 19:31:54 jimz - * add atomic debug (mutex and cond leak finder) stuff - * - * Revision 1.22 1996/05/20 16:24:49 jimz - * get happy in simulator - * - * Revision 1.21 1996/05/20 16:15:07 jimz - * switch to rf_{mutex,cond}_{init,destroy} - * - * Revision 1.20 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.19 1996/05/09 17:16:53 jimz - * correct arg to JOIN_THREAD - * - * Revision 1.18 1995/12/12 18:10:06 jimz - * MIN -> RF_MIN, MAX -> RF_MAX, ASSERT -> RF_ASSERT - * fix 80-column brain damage in comments - * - * Revision 1.17 1995/12/06 15:15:21 root - * added copyright info - * - */ - #ifndef _RF__RF_THREADSTUFF_H_ #define _RF__RF_THREADSTUFF_H_ #include "rf_types.h" +#include <sys/types.h> +#include <sys/param.h> +#ifdef _KERNEL +#include <sys/systm.h> +#include <sys/proc.h> +#include <sys/kthread.h> +#endif #define rf_create_managed_mutex(a,b) _rf_create_managed_mutex(a,b,__FILE__,__LINE__) #define rf_create_managed_cond(a,b) _rf_create_managed_cond(a,b,__FILE__,__LINE__) @@ -144,147 +63,11 @@ int _rf_destroy_threadgroup(RF_ThreadGroup_t *g, char *file, int line); int _rf_init_managed_threadgroup(RF_ShutdownList_t **listp, RF_ThreadGroup_t *g, char *file, int line); -#ifndef SIMULATE /* will null all this calls */ -#ifndef KERNEL - -#if defined(__osf__) || defined(AIX) -#include <pthread.h> -#endif /* __osf__ || AIX */ - -#define RF_DEBUG_ATOMIC 0 - -#if RF_DEBUG_ATOMIC > 0 -#define RF_ATENT_M 1 -#define RF_ATENT_C 2 -typedef struct RF_ATEnt_s RF_ATEnt_t; -struct RF_ATEnt_s { - char *file; - int line; - pthread_mutex_t m; - pthread_cond_t c; - int type; - int otype; - RF_ATEnt_t *next; - RF_ATEnt_t *prev; -}; - -#define RF_DECLARE_MUTEX(_m_) RF_ATEnt_t *_m_; -#define RF_DECLARE_STATIC_MUTEX(_m_) static RF_ATEnt_t *_m_; -#define RF_DECLARE_EXTERN_MUTEX(_m_) extern RF_ATEnt_t *_m_; -#define RF_DECLARE_COND(_c_) RF_ATEnt_t *_c_; -#define RF_DECLARE_STATIC_COND(_c_) static RF_ATEnt_t *_c_; -#define RF_DECLARE_EXTERN_COND(_c_) extern RF_ATEnt_t *_c_; - -int _rf_mutex_init(RF_ATEnt_t **m, char *file, int line); -int _rf_mutex_destroy(RF_ATEnt_t **m, char *file, int line); -int _rf_cond_init(RF_ATEnt_t **c, char *file, int line); -int _rf_cond_destroy(RF_ATEnt_t **c, char *file, int line); -void rf_atent_init(void); -void rf_atent_shutdown(void); - -#define rf_mutex_init(_m_) _rf_mutex_init(_m_,__FILE__,__LINE__) -#define rf_mutex_destroy(_m_) _rf_mutex_destroy(_m_,__FILE__,__LINE__) -#define rf_cond_init(_m_) _rf_cond_init(_m_,__FILE__,__LINE__) -#define rf_cond_destroy(_m_) _rf_cond_destroy(_m_,__FILE__,__LINE__) - -#define RF_LOCK_MUTEX(_a_) {RF_ASSERT((_a_)->type == RF_ATENT_M); pthread_mutex_lock(&((_a_)->m));} -#define RF_UNLOCK_MUTEX(_a_) {RF_ASSERT((_a_)->type == RF_ATENT_M); pthread_mutex_unlock(&((_a_)->m));} - -#define RF_WAIT_COND(_c_,_m_) { \ - RF_ASSERT((_c_)->type == RF_ATENT_C); \ - RF_ASSERT((_m_)->type == RF_ATENT_M); \ - pthread_cond_wait( &((_c_)->c), &((_m_)->m) ); \ -} -#define RF_SIGNAL_COND(_c_) {RF_ASSERT((_c_)->type == RF_ATENT_C); pthread_cond_signal( &((_c_)->c));} -#define RF_BROADCAST_COND(_c_) {RF_ASSERT((_c_)->type == RF_ATENT_C); pthread_cond_broadcast(&((_c_)->c));} - -#else /* RF_DEBUG_ATOMIC > 0 */ - -/* defining these as macros allows us to NULL them out in the kernel */ -#define RF_DECLARE_MUTEX(_m_) pthread_mutex_t _m_; -#define RF_DECLARE_STATIC_MUTEX(_m_) static pthread_mutex_t _m_; -#define RF_DECLARE_EXTERN_MUTEX(_m_) extern pthread_mutex_t _m_; -#define RF_DECLARE_COND(_c_) pthread_cond_t _c_; -#define RF_DECLARE_STATIC_COND(_c_) static pthread_cond_t _c_; -#define RF_DECLARE_EXTERN_COND(_c_) extern pthread_cond_t _c_; - -int rf_mutex_init(pthread_mutex_t *m); -int rf_mutex_destroy(pthread_mutex_t *m); -int rf_cond_init(pthread_cond_t *c); -int rf_cond_destroy(pthread_cond_t *c); - -#define RF_LOCK_MUTEX(_m_) {pthread_mutex_lock(&(_m_));} -#define RF_UNLOCK_MUTEX(_m_) pthread_mutex_unlock(&(_m_)) - -#define RF_WAIT_COND(_c_,_m_) pthread_cond_wait( &(_c_), &(_m_) ) -#define RF_SIGNAL_COND(_c_) pthread_cond_signal( &(_c_) ) -#define RF_BROADCAST_COND(_c_) pthread_cond_broadcast(&(_c_)) - -#endif /* RF_DEBUG_ATOMIC > 0 */ - -int _rf_create_managed_mutex(RF_ShutdownList_t **listp, pthread_mutex_t *m, char *file, int line); -int _rf_create_managed_cond(RF_ShutdownList_t **listp, pthread_cond_t *c, char *file, int line); - -typedef pthread_t RF_Thread_t; -#ifdef __osf__ -typedef pthread_addr_t RF_ThreadArg_t; /* the argument to a thread function */ -#else /* __osf__ */ -typedef void *RF_ThreadArg_t; /* the argument to a thread function */ -#endif /* __osf__ */ -typedef pthread_attr_t RF_ThreadAttr_t; /* a thread creation attribute structure */ - -#ifdef __osf__ -#define RF_EXIT_THREAD(_status_) pthread_exit( (pthread_addr_t) (_status_) ) -#else /* __osf__ */ -#define RF_EXIT_THREAD(_status_) pthread_exit( (void *) (_status_) ) -#endif /* __osf__ */ -#define RF_DELAY_THREAD(_secs_, _msecs_) {struct timespec interval; \ - interval.tv_sec = (_secs_); \ - interval.tv_nsec = (_msecs_)*1000000; \ - pthread_delay_np(&interval); \ - } -#define RF_DELAY_THREAD_TS(_ts_) pthread_delay_np(&(_ts_)) - -#ifdef __osf__ -#define RF_THREAD_ATTR_CREATE(_attr_) pthread_attr_create( &(_attr_) ) -#define RF_THREAD_ATTR_DELETE(_attr_) pthread_attr_delete( &(_attr_) ) -#endif /* __osf__ */ -#ifdef AIX -#define RF_THREAD_ATTR_CREATE(_attr_) pthread_attr_init( &(_attr_) ) -#define RF_THREAD_ATTR_DELETE(_attr_) pthread_attr_destroy( &(_attr_) ) -#endif /* AIX */ -#define RF_THREAD_ATTR_SETSTACKSIZE(_attr_,_sz_) pthread_attr_setstacksize(&(_attr_), (long) (_sz_)) -#define RF_THREAD_ATTR_GETSTACKSIZE(_attr_) pthread_attr_getstacksize(_attr_) -#define RF_THREAD_ATTR_SETSCHED(_attr_,_sched_) pthread_attr_setsched(&(_attr_), (_sched_)) -#define RF_CREATE_ATTR_THREAD(_handle_, _attr_, _func_, _arg_) \ - pthread_create(&(_handle_), (_attr_), (pthread_startroutine_t) (_func_), (_arg_)) - - -extern pthread_attr_t raidframe_attr_default; -int rf_thread_create(RF_Thread_t *thread, pthread_attr_t attr, - void (*func)(), RF_ThreadArg_t arg); - -#define RF_CREATE_THREAD(_handle_, _func_, _arg_) \ - rf_thread_create(&(_handle_), raidframe_attr_default, (_func_), (_arg_)) - -#else /* KERNEL */ -#ifdef __NetBSD__ #include <sys/lock.h> #define decl_simple_lock_data(a,b) a struct simplelock b; #define simple_lock_addr(a) ((struct simplelock *)&(a)) -#else -#include <kern/task.h> -#include <kern/thread.h> -#include <kern/lock.h> -#include <kern/sched_prim.h> -#define decl_simple_lock_data(a,b) a int (b); -#endif /* __NetBSD__ */ -#ifdef __NetBSD__ typedef struct proc *RF_Thread_t; -#else -typedef thread_t RF_Thread_t; -#endif typedef void *RF_ThreadArg_t; #define RF_DECLARE_MUTEX(_m_) decl_simple_lock_data(,(_m_)) @@ -298,10 +81,6 @@ typedef void *RF_ThreadArg_t; #define RF_LOCK_MUTEX(_m_) simple_lock(&(_m_)) #define RF_UNLOCK_MUTEX(_m_) simple_unlock(&(_m_)) - -#ifdef __NetBSD__ -#include <sys/types.h> -#include <sys/kthread.h> /* * In NetBSD, kernel threads are simply processes which share several * substructures and never run in userspace. @@ -319,63 +98,6 @@ typedef void *RF_ThreadArg_t; #define RF_CREATE_THREAD(_handle_, _func_, _arg_) \ kthread_create((void (*) __P((void *)))(_func_), (void *)(_arg_), \ (struct proc **)&(_handle_), "raid") -#else /* ! __NetBSD__ */ -/* - * Digital UNIX/Mach threads. - */ -#define RF_WAIT_COND(_c_,_m_) { \ - assert_wait((vm_offset_t)&(_c_), TRUE); \ - RF_UNLOCK_MUTEX(_m_); \ - thread_block(); \ - RF_LOCK_MUTEX(_m_); \ -} -#define RF_SIGNAL_COND(_c_) thread_wakeup_one(((vm_offset_t)&(_c_))) -#define RF_BROADCAST_COND(_c_) thread_wakeup(((vm_offset_t)&(_c_))) -extern task_t first_task; -#define RF_CREATE_THREAD(_handle_, _func_, _arg_) \ - (((_handle_ = kernel_thread_w_arg(first_task, (void (*)())_func_, (void *)(_arg_))) != THREAD_NULL) ? 0 : ENOMEM) -#endif /* __NetBSD__ */ -#endif /* KERNEL */ -#else /* SIMULATE */ - -#define RF_DECLARE_MUTEX(_m_) int _m_; -#define RF_DECLARE_STATIC_MUTEX(_m_) static int _m_; -#define RF_DECLARE_EXTERN_MUTEX(_m_) extern int _m_; -#define RF_DECLARE_COND(_c_) int _c_; -#define RF_DECLARE_STATIC_COND(_c_) static int _c_; -#define RF_DECLARE_EXTERN_COND(_c_) extern int _c_; - -extern int rf_mutex_init(int *m); -extern int rf_mutex_destroy(int *m); -extern int rf_cond_init(int *c); -extern int rf_cond_destroy(int *c); - -int rf_mutex_init(int *m); -int rf_mutex_destroy(int *m); -int _rf_create_managed_mutex(RF_ShutdownList_t **listp, int *m, char *file, int line); -int _rf_create_managed_cond(RF_ShutdownList_t **listp, int *m, char *file, int line); - -typedef void *RF_ThreadArg_t; /* the argument to a thread function */ - -#define RF_LOCK_MUTEX(_m_) -#define RF_UNLOCK_MUTEX(_m_) - -#define RF_WAIT_COND(_c_,_m_) -#define RF_SIGNAL_COND(_c_) -#define RF_BROADCAST_COND(_c_) - -#define RF_EXIT_THREAD(_status_) -#define RF_DELAY_THREAD(_secs_, _msecs_) - -#define RF_THREAD_ATTR_CREATE(_attr_) ; -#define RF_THREAD_ATTR_DELETE(_attr_) ; -#define RF_THREAD_ATTR_SETSTACKSIZE(_attr_,_sz_) ; -#define RF_THREAD_ATTR_SETSCHED(_attr_,_sched_) ; -#define RF_CREATE_ATTR_THREAD(_handle_, _attr_, _func_, _arg_) ; - -#define RF_CREATE_THREAD(_handle_, _func_, _arg_) 1 - -#endif /* SIMULATE */ struct RF_ThreadGroup_s { int created; @@ -449,7 +171,6 @@ struct RF_ThreadGroup_s { } #endif -#if defined(__NetBSD__) && defined(_KERNEL) int rf_mutex_init(struct simplelock *); int rf_mutex_destroy(struct simplelock *); @@ -460,5 +181,4 @@ int _rf_create_managed_cond(RF_ShutdownList_t **listp, int *, int rf_cond_init(int *c); /* XXX need to write?? */ int rf_cond_destroy(int *c); /* XXX need to write?? */ -#endif #endif /* !_RF__RF_THREADSTUFF_H_ */ diff --git a/sys/dev/raidframe/rf_types.h b/sys/dev/raidframe/rf_types.h index 1fa4942b672..132f48eccb2 100644 --- a/sys/dev/raidframe/rf_types.h +++ b/sys/dev/raidframe/rf_types.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_types.h,v 1.2 1998/11/16 04:14:10 mycroft Exp $ */ +/* $NetBSD: rf_types.h,v 1.3 1999/01/26 02:34:03 oster Exp $ */ /* * rf_types.h */ @@ -33,243 +33,16 @@ * rf_types.h -- standard types for RAIDframe * ***********************************************************/ -/* - * : - * Log: rf_types.h,v - * Revision 1.35 1996/08/09 18:48:29 jimz - * correct mips definition - * - * Revision 1.34 1996/08/07 22:50:14 jimz - * monkey with linux includes to get a good compile - * - * Revision 1.33 1996/08/07 21:09:28 jimz - * add SGI mips stuff (note: 64-bit stuff may be wrong, I didn't have - * a machine to test on) - * - * Revision 1.32 1996/08/06 22:24:27 jimz - * add LINUX_I386 - * - * Revision 1.31 1996/07/31 16:30:12 jimz - * move in RF_LONGSHIFT - * - * Revision 1.30 1996/07/30 04:51:58 jimz - * ultrix port - * - * Revision 1.29 1996/07/29 16:37:34 jimz - * define DEC_OSF for osf/1 kernel - * - * Revision 1.28 1996/07/28 20:31:39 jimz - * i386netbsd port - * true/false fixup - * - * Revision 1.27 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.26 1996/07/27 18:40:24 jimz - * cleanup sweep - * - * Revision 1.25 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.24 1996/07/18 22:57:14 jimz - * port simulator to AIX - * - * Revision 1.23 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.22 1996/06/11 18:11:57 jimz - * add ThreadGroup - * - * Revision 1.21 1996/06/11 10:58:47 jimz - * add RF_ReconDoneProc_t - * - * Revision 1.20 1996/06/10 14:18:58 jimz - * move user, throughput stats into per-array structure - * - * Revision 1.19 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.18 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.17 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.16 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.15 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.14 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.13 1996/05/31 22:26:54 jimz - * fix a lot of mapping problems, memory allocation problems - * found some weird lock issues, fixed 'em - * more code cleanup - * - * Revision 1.12 1996/05/30 23:22:16 jimz - * bugfixes of serialization, timing problems - * more cleanup - * - * Revision 1.11 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.10 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.9 1996/05/24 22:17:04 jimz - * continue code + namespace cleanup - * typed a bunch of flags - * - * Revision 1.8 1996/05/24 04:28:55 jimz - * release cleanup ckpt - * - * Revision 1.7 1996/05/24 01:59:45 jimz - * another checkpoint in code cleanup for release - * time to sync kernel tree - * - * Revision 1.6 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.5 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.4 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.3 1996/05/10 16:22:46 jimz - * RF_offset -> RF_Offset - * add RF_SectorCount - * - * Revision 1.2 1996/05/02 14:58:50 jimz - * switch to _t for non-base-integral types - * - * Revision 1.1 1995/12/14 18:36:51 jimz - * Initial revision - * - */ #ifndef _RF__RF_TYPES_H_ #define _RF__RF_TYPES_H_ -#ifdef _KERNEL -#define KERNEL -#endif - #include "rf_archs.h" -#ifndef KERNEL -#ifdef LINUX -#include <stdlib.h> -#include <sys/types.h> -#endif /* LINUX */ -#include <fcntl.h> -#include <stdio.h> - -#ifdef __osf__ -/* - * The following monkeying is to get around some problems with - * conflicting definitions in /usr/include/random.h and /usr/include/stdlib.h - * on Digital Unix. They - * (1) define the same symbols - * (2) differently than one another - * (3) also differently from the DU libc sources - * This loses, bad. - */ -#include <standards.h> -#include <cma.h> -#ifdef _OSF_SOURCE -#undef _OSF_SOURCE -#define _RF_SPANKME -#endif /* _OSF_SOURCE */ -#endif /* __osf__ */ -#include <stdlib.h> -#ifdef __osf__ -#ifdef _RF_SPANKME -#undef _RF_SPANKME -#define _OSF_SOURCE -#endif /* _RF_SPANKME */ -#endif /* __osf__ */ - -#include <string.h> -#include <unistd.h> -#endif /* !KERNEL */ #include <sys/errno.h> #include <sys/types.h> -#ifdef AIX -#include <sys/stream.h> -#endif /* AIX */ - -#if defined(hpux) || defined(__hpux) -/* - * Yeah, we get one of hpux or __hpux, but not both. This is because - * HP didn't really want to provide an ANSI C compiler. Apparantly, they - * don't like standards. This explains a lot about their API. You might - * try using gcc, but you'll discover that it's sufficiently buggy that - * it can't even compile the core library. - * - * Hatred update: c89, the one thing which could both handle prototypes, - * and compile /usr/include/sys/timeout.h, can't do 64-bit ints. - * - * Note: the hpux port is incomplete. Why? Well, because I can't find - * a working C compiler. I've tried cc (both with and without -Ae), - * c89, and gcc, all with and without -D_HPUX_SOURCE. Sod it. - * - * -Jim Zelenka, 22 July 1996 - */ -#ifndef hpux -#define hpux -#endif /* !hpux */ -#include <sys/hpibio.h> -#endif /* hpux || __hpux*/ - -#ifdef sun -#ifndef KERNEL -#include <errno.h> -#endif /* !KERNEL */ -#endif /* sun */ - -#if defined(OSF) && defined(__alpha) && defined(KERNEL) -#ifndef DEC_OSF -#define DEC_OSF -#endif /* !DEC_OSF */ -#endif /* OSF && __alpha && KERNEL */ - -#if defined(__NetBSD__) && defined(KERNEL) #include <sys/uio.h> #include <sys/param.h> #include <sys/lock.h> @@ -280,8 +53,6 @@ #define TRUE 1 /* XXX why isn't this done somewhere already!! */ -#endif /* __NetBSD__ && KERNEL */ - /* * First, define system-dependent types and constants. * @@ -295,8 +66,6 @@ * */ -#ifdef __NetBSD__ - #include <sys/types.h> #include <machine/endian.h> #include <machine/limits.h> @@ -324,115 +93,6 @@ typedef u_int64_t RF_uint64; #error word size not defined #endif -#else /* __NetBSD__ */ - -#ifdef __alpha -#define RF_IS_BIG_ENDIAN 0 -typedef signed char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long RF_int64; -typedef unsigned long RF_uint64; -#define RF_LONGSHIFT 3 -#endif /* __alpha */ - -#ifdef _IBMR2 -#define RF_IS_BIG_ENDIAN 1 -typedef signed char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long long RF_int64; -typedef unsigned long long RF_uint64; -#define RF_LONGSHIFT 2 -#endif /* _IBMR2 */ - -#ifdef hpux -#define RF_IS_BIG_ENDIAN 1 -typedef signed char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long long RF_int64; -typedef unsigned long long RF_uint64; -#define RF_LONGSHIFT 2 -#endif /* hpux */ - -#ifdef sun -#define RF_IS_BIG_ENDIAN 1 -typedef char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long long RF_int64; -typedef unsigned long long RF_uint64; -#define RF_LONGSHIFT 2 -#endif /* sun */ - -#if defined(NETBSD_I386) || defined(LINUX_I386) -#define RF_IS_BIG_ENDIAN 0 -typedef char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long long RF_int64; -typedef unsigned long long RF_uint64; -#define RF_LONGSHIFT 2 -#endif /* NETBSD_I386 || LINUX_I386 */ - -#if defined(mips) && !defined(SGI) && !defined(__NetBSD__) -#define RF_IS_BIG_ENDIAN 0 -typedef char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long long RF_int64; -typedef unsigned long long RF_uint64; -#define RF_LONGSHIFT 2 -#endif /* mips && !SGI */ - -#ifdef SGI -#if _MIPS_SZLONG == 64 -#define RF_IS_BIG_ENDIAN 1 -typedef signed char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long RF_int64; -typedef unsigned long RF_uint64; -#define RF_LONGSHIFT 3 -#endif /* _MIPS_SZLONG == 64 */ -#if _MIPS_SZLONG == 32 -#define RF_IS_BIG_ENDIAN 1 -typedef char RF_int8; -typedef unsigned char RF_uint8; -typedef short RF_int16; -typedef unsigned short RF_uint16; -typedef int RF_int32; -typedef unsigned int RF_uint32; -typedef long long RF_int64; -typedef unsigned long long RF_uint64; -#define RF_LONGSHIFT 2 -#endif /* _MIPS_SZLONG == 32 */ -#endif /* SGI */ - -#endif /* __NetBSD__ */ - /* * These are just zero and non-zero. We don't use "TRUE" * and "FALSE" because there's too much nonsense trying diff --git a/sys/dev/raidframe/rf_utils.c b/sys/dev/raidframe/rf_utils.c index ee79c1ec140..8994a36fa69 100644 --- a/sys/dev/raidframe/rf_utils.c +++ b/sys/dev/raidframe/rf_utils.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_utils.c,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_utils.c,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,70 +32,9 @@ * ****************************************/ -/* : - * Log: rf_utils.c,v - * Revision 1.20 1996/07/27 23:36:08 jimz - * Solaris port of simulator - * - * Revision 1.19 1996/07/22 19:52:16 jimz - * switched node params to RF_DagParam_t, a union of - * a 64-bit int and a void *, for better portability - * attempted hpux port, but failed partway through for - * lack of a single C compiler capable of compiling all - * source files - * - * Revision 1.18 1996/07/15 17:22:18 jimz - * nit-pick code cleanup - * resolve stdlib problems on DEC OSF - * - * Revision 1.17 1996/06/09 02:36:46 jimz - * lots of little crufty cleanup- fixup whitespace - * issues, comment #ifdefs, improve typing in some - * places (esp size-related) - * - * Revision 1.16 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.15 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.14 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.13 1996/05/27 18:56:37 jimz - * more code cleanup - * better typing - * compiles in all 3 environments - * - * Revision 1.12 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.11 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.10 1995/12/06 15:17:44 root - * added copyright info - * - */ #include "rf_threadstuff.h" -#ifdef _KERNEL -#define KERNEL -#endif - -#ifndef KERNEL -#include <stdio.h> -#endif /* !KERNEL */ #include <sys/time.h> #include "rf_threadid.h" @@ -105,10 +44,6 @@ #include "rf_general.h" #include "rf_sys.h" -#ifndef KERNEL -#include "rf_randmacros.h" -#endif /* !KERNEL */ - /* creates & zeros 2-d array with b rows and k columns (MCH) */ RF_RowCol_t **rf_make_2d_array(b, k, allocList) int b; @@ -174,33 +109,6 @@ int rf_gcd(m, n) return(n); } -#if !defined(KERNEL) && !defined(SIMULATE) && defined(__osf__) -/* this is used to generate a random number when _FASTRANDOM is off - * in randmacros.h - */ -long rf_do_random(rval, rdata) - long *rval; - struct random_data *rdata; -{ - int a, b; - long c; - /* - * random_r() generates random 32-bit values. OR them together. - */ - if (random_r(&a, rdata)!=0) { - fprintf(stderr,"Yikes! call to random_r failed\n"); - exit(1); - } - if (random_r(&b, rdata)!=0) { - fprintf(stderr,"Yikes! call to random_r failed\n"); - exit(1); - } - c = ((long)a)<<32; - *rval = c|b; - return(*rval); -} -#endif /* !KERNEL && !SIMULATE && __osf__ */ - /* these convert between text and integer. Apparently the regular C macros * for doing this are not available in the kernel */ diff --git a/sys/dev/raidframe/rf_utils.h b/sys/dev/raidframe/rf_utils.h index 427cecbe129..d43a63e81db 100644 --- a/sys/dev/raidframe/rf_utils.h +++ b/sys/dev/raidframe/rf_utils.h @@ -1,4 +1,4 @@ -/* $NetBSD: rf_utils.h,v 1.1 1998/11/13 04:20:35 oster Exp $ */ +/* $NetBSD: rf_utils.h,v 1.2 1999/01/26 02:34:03 oster Exp $ */ /* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. @@ -32,29 +32,6 @@ * ***************************************/ -/* : - * Log: rf_utils.h,v - * Revision 1.7 1996/06/07 21:33:04 jimz - * begin using consistent types for sector numbers, - * stripe numbers, row+col numbers, recon unit numbers - * - * Revision 1.6 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.5 1996/05/23 21:46:35 jimz - * checkpoint in code cleanup (release prep) - * lots of types, function names have been fixed - * - * Revision 1.4 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.3 1995/12/06 15:17:53 root - * added copyright info - * - */ #ifndef _RF__RF_UTILS_H_ #define _RF__RF_UTILS_H_ |
