⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rf_testcode.c

📁 RAIDFrame是个非常好的磁盘阵列RAID仿真工具
💻 C
📖 第 1 页 / 共 5 页
字号:
/* * Copyright (c) 1995 Carnegie-Mellon University. * All rights reserved. * * Author: Mark Holland, Rachad Youssef, Jim Zelenka * * Permission to use, copy, modify and distribute this software and * its documentation is hereby granted, provided that both the copyright * notice and this permission notice appear in all copies of the * software, derivative works or modified versions, and any portions * thereof, and that both notices appear in supporting documentation. * * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. * * Carnegie Mellon requests users of this software to return to * *  Software Distribution Coordinator  or  Software.Distribution@CS.CMU.EDU *  School of Computer Science *  Carnegie Mellon University *  Pittsburgh PA 15213-3890 * * any improvements or extensions that they make and grant Carnegie the * rights to redistribute these changes. *//********************************************************************* * * rf_testcode.c -- test code for the user-level version of the driver * *********************************************************************//* * $Locker:  $ * $Log: rf_testcode.c,v $ * Revision 1.127  1996/08/21  19:46:58  jimz * fix constant-fail bug in write array test * * Revision 1.126  1996/08/21  03:47:38  jimz * check Q mapping in layout test * * Revision 1.125  1996/08/20  21:54:26  jimz * improve diagnostics of file write/read test * add ability to fail disks to file write/read test * * Revision 1.124  1996/08/20  20:05:27  jimz * add undocumented 'k' switch to script test to specify * which disk to constant fail * * Revision 1.123  1996/08/20  14:44:59  jimz * fixed handling of async disk failing in simulator * * Revision 1.122  1996/08/19  22:26:03  jimz * add double-degraded async test to RealLoopTest * * Revision 1.121  1996/08/02  13:20:14  jimz * change default dataSectorsPerStripe * * Revision 1.120  1996/07/31  15:33:50  jimz * add chang's double-failure test * * Revision 1.119  1996/07/28  20:32:51  jimz * true/false cleanup * * Revision 1.118  1996/07/27  23:35:53  jimz * Solaris simulator port * * Revision 1.117  1996/07/26  22:00:52  jimz * fix non-RF_DEMO compilation problem * * Revision 1.116  1996/07/22  21:11:22  jimz * added new write array test * * Revision 1.115  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.114  1996/07/18  22:57:14  jimz * port simulator to AIX * * Revision 1.113  1996/07/15  05:40:41  jimz * some recon datastructure cleanup * better handling of multiple failures * added undocumented double-recon test * * Revision 1.112  1996/07/15  02:56:53  jimz * enhanced looptest and recon test debugging * enhanced recon test * * Revision 1.111  1996/07/13  00:00:59  jimz * sanitized generalized reconstruction architecture * cleaned up head sep, rbuf problems * * Revision 1.110  1996/07/11  17:13:16  jimz * added async fail+recon+copyback to looptest * * Revision 1.109  1996/07/10  22:28:29  jimz * allow double-failure in loop test * * Revision 1.108  1996/06/20  17:41:52  jimz * simplify parity verification API * * Revision 1.107  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.106  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.105  1996/06/17  03:22:15  jimz * use macroized thread delay * * Revision 1.104  1996/06/14  23:15:38  jimz * attempt to deal with thread GC problem * * Revision 1.103  1996/06/13  19:08:47  jimz * allow maxTraceRunTimeSec of 0 (unlimited) * * Revision 1.102  1996/06/12  04:41:26  jimz * tweaks to make genplot work with user-level driver * (mainly change stat collection) * * Revision 1.101  1996/06/12  03:31:29  jimz * add infrastructure for genplot (stats extraction) * cleanup simulator script handling * * Revision 1.100  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.99  1996/06/11  10:57:57  jimz * switch to ReconDoneProc mechanism for reconDone flag for simulator * add rf_TestcodeInit * * Revision 1.98  1996/06/10  16:40:01  jimz * break user-level stuff out into lib+apps * * Revision 1.97  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.96  1996/06/07  21:33:04  jimz * begin using consistent types for sector numbers, * stripe numbers, row+col numbers, recon unit numbers * * Revision 1.95  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.94  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.93  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.92  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.91  1996/05/30  23:22:16  jimz * bugfixes of serialization, timing problems * more cleanup * * Revision 1.90  1996/05/30  12:59:18  jimz * make etimer happier, more portable * * Revision 1.89  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.88  1996/05/27  18:56:37  jimz * more code cleanup * better typing * compiles in all 3 environments * * Revision 1.87  1996/05/24  22:17:04  jimz * continue code + namespace cleanup * typed a bunch of flags * * Revision 1.86  1996/05/24  04:28:55  jimz * release cleanup ckpt * * Revision 1.85  1996/05/24  01:59:45  jimz * another checkpoint in code cleanup for release * time to sync kernel tree * * Revision 1.84  1996/05/23  21:46:35  jimz * checkpoint in code cleanup (release prep) * lots of types, function names have been fixed * * Revision 1.83  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.82  1996/05/21  18:52:40  jimz * apparantly, something about RANDOM() doesn't like being invoked in a complex * line of code, so declare vars, and always just assign RANDOM() to them * and use the local var in the computation * * Revision 1.81  1996/05/21  07:46:36  jimz * add rf_test_running for debug purposes * * Revision 1.80  1996/05/20  19:31:26  jimz * straighten out use of printf_mutex * add UnbootRaidframe call * * Revision 1.79  1996/05/20  16:14:12  jimz * switch to rf_{mutex,cond}_{init,destroy} * * Revision 1.78  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.77  1996/05/15  23:35:14  jimz * #ifdef cache stuff appropriately * * Revision 1.76  1996/05/09  17:17:10  jimz * commented potential leak in the looptest (sentinel claims * pthreads is leaking core) * * Revision 1.75  1996/05/06  22:56:58  wvcii * fixed memory leak in recon test (added call to ShutdownStripeLocks) * * Revision 1.74  1996/05/06  21:42:39  jimz * assign unique threadid to initial thread * * Revision 1.73  1996/05/06  19:10:36  jimz * get rid of extra argument to MakeLockTable() * plug core leaks * * Revision 1.72  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.71  1995/12/06  15:14:51  root * added copyright info * * Revision 1.70  1995/11/19  16:28:02  wvcii * moved disableParityVerify definition to rf_driver.c * * Revision 1.69  1995/11/17  19:47:53  amiri * added if (demoMode) around update_mode in faildisk * * Revision 1.68  1995/11/17  15:09:17  wvcii * added debug var disableParityVerify * used in RealLoopTest to disable parity verification * * Revision 1.67  1995/10/21  17:24:36  amiri * changed the point at which the mode is updated to degraded * mode, namely after the user hits return to fail the disk (not before) * * Revision 1.66  1995/10/18  19:29:56  amiri * added support for simulator reconstruction demo. * In ScripTest, added calls to meter_update_thread * * Revision 1.65  1995/10/10  23:22:13  amiri * added fflushes(stdin/stdout) before requesting * input in demo mode. * * Revision 1.64  1995/10/09  23:36:16  amiri * added support for more meters in recon. demo * * Revision 1.63  1995/10/06  17:31:16  arw * fixed numbytes computation which depended on a numsect that was * computed later.  (i put the bug in originall) * * Revision 1.62  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.61  1995/10/04  18:30:39  wvcii * disabled prompt for dmeter position when demoMode == FALSE * * Revision 1.60  1995/10/04  07:58:17  jimz * nuke bogus printfs (mistakenly checked them in earlier) * * Revision 1.59  1995/10/04  07:24:57  jimz * code for bigstacks * * Revision 1.58  1995/10/04  03:49:59  wvcii * single access test does not verify parity for raid level 1 * * Revision 1.57  1995/10/03  19:57:38  amiri * demo meter code tune-up. * * Revision 1.56  1995/10/02  13:08:36  wvcii * fixed misspellings in output, cleaned up output format * * Revision 1.55  1995/09/30  20:32:40  amiri * *** empty log message *** * * Revision 1.54  1995/09/28  16:01:09  amiri * added updates to user stats in script test. * * Revision 1.53  1995/09/27  17:25:52  arw * added INIT_RANDOM(1) for random access read/write test * * Revision 1.52  1995/09/14  15:21:54  amiri * Khalil: * Fixed Simulation bug that was generating very high * response times for more than a couple of threads. * * Revision 1.51  1995/09/06  19:29:31  wvcii * fixed divide by zero bugs in response time calculation (ScriptTest) * * Revision 1.50  95/08/24  19:25:36  rachad * Fixes to LSS GC in the simulater *  * Revision 1.49  1995/07/26  02:37:28  rachad * *** empty log message *** * * Revision 1.48  1995/07/25  20:15:37  rachad * *** empty log message *** * * Revision 1.47  1995/07/21  15:27:02  rachad * *** empty log message *** * * Revision 1.46  1995/07/20  16:10:24  rachad * *** empty log message *** * * Revision 1.45  1995/07/20  03:36:53  rachad * Added suport for cache warming * * Revision 1.44  1995/07/18  00:00:56  rachad * *** empty log message *** * * Revision 1.43  1995/07/17  23:44:37  rachad * *** empty log message *** * * Revision 1.42  1995/07/14  20:12:37  cfb * *** empty log message *** * * Revision 1.41  1995/07/13  17:53:45  rachad * user simulator process will now be enqued as a call back. * * Revision 1.40  1995/07/10  20:41:13  rachad * *** empty log message *** * * Revision 1.39  1995/07/10  19:06:28  rachad * *** empty log message *** * * Revision 1.38  1995/07/08  21:38:53  rachad * Added support for interactive traces * in the simulator * * Revision 1.37  1995/07/06  13:07:22  robby * added fflush stderr and stdout * * Revision 1.36  1995/06/23  13:49:53  robby * forgot one spot when updating to prototypes in rf_layout.h * * Revision 1.35  1995/06/07  16:27:41  wvcii * LayoutTest only validates parity map when numParityCol > 0 * * Revision 1.34  95/06/07  01:37:23  rachad * Cleanned up simulator user interface *  * Revision 1.33  1995/06/02  01:36:18  rachad * *** empty log message *** * * Revision 1.32  1995/06/02  01:24:20  rachad * Changed script interface, * ConvertActionToAccess will now compute seekLoc in sectors * and size in bytes -> traces with 1/2 k access can be used * * Revision 1.31  1995/05/27  21:47:12  wvcii * disabled loop test parity verification for parity logging configuration * * Revision 1.30  95/05/15  12:25:35  holland * bug fix in test code: no stripe locks were getting acquired in RAID0 mode *  * Revision 1.29  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.28  1995/05/02  22:48:06  holland * added copyback code * * Revision 1.27  1995/05/01  13:28:00  holland * parity range locks, locking disk requests, recon+parityscan in kernel, etc. * * Revision 1.26  1995/04/24  13:25:51  holland

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -