History log of /src/sys/dev/raidframe/rf_raid1.c |
Revision | | Date | Author | Comments |
1.39 |
| 23-Jul-2021 |
oster | The number of components used must be at least 2. An odd number of components is not allowed.
PR bin/45162
|
1.38 |
| 23-Jul-2021 |
oster | Extensive mechanical changes to the pools used in RAIDframe.
Alloclist remains not per-RAID, so initialize that pool separately/differently than the rest.
The remainder of pools in RF_Pools_s are now per-RAID pools. Mostly mechanical changes to functions to allocate/destroy per-RAID pools. Needed to make raidPtr available in certain cases to be able to find the per-RAID pools.
Extend rf_pool_init() to now populate a per-RAID wchan value that is unique to each pool for a given RAID device.
TODO: Complete the analysis of the minimum number of items that are required for each pool to allow IO to progress (i.e. so that a request for pool resources can always be satisfied), and dynamically scale minimum pool sizes based on RAID configuration.
|
1.37 |
| 10-Oct-2019 |
christos | branches: 1.37.12; fix the function pointer and callback mess: - callback functions return 0 and their result is not checked; make them void. - there are two types of callbacks and they used to overload their parameters and the callback structure; separate them into "function" and "value" callbacks. - make the wait function signature consistent.
|
1.36 |
| 09-Feb-2019 |
christos | - Change the allocation macros to be more like function calls - Change sizeof(type) -> sizeof(*variable) - Use macros for the long buffer length allocations - Remove "bit polishing" memsets() -- do them only once - Remove unnecessary casts
Thanks to oster@ for finding bugs and testing.
|
1.35 |
| 15-Sep-2013 |
martin | branches: 1.35.30; Mark variables as potentially unused
|
1.34 |
| 02-May-2011 |
mrg | branches: 1.34.4; 1.34.14; 1.34.18; convert rb_mutex to a kmutex/cv.
|
1.33 |
| 01-May-2011 |
mrg | convert mcpair to kmutex.
|
1.32 |
| 15-Apr-2010 |
oster | branches: 1.32.2; Fill in param[3] for succedents for bad disk 'i' rather than '0'. Fortunately, nbad is never > 1, so this bug never showed up anywhere. Bug spotted by Jed Davis. Thanks!
|
1.31 |
| 20-Apr-2008 |
oster | branches: 1.31.2; 1.31.22; 1.31.24; Introduce a function to return the default head separation for RAID 1 sets. This helps ensure that the sliding status window (coming soon!) for reconstructs will always be correct.
|
1.30 |
| 04-Mar-2007 |
christos | branches: 1.30.36; 1.30.38; Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.29 |
| 16-Nov-2006 |
christos | branches: 1.29.4; __unused removal on arguments; approved by core.
|
1.28 |
| 12-Oct-2006 |
christos | - sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
1.27 |
| 11-Dec-2005 |
christos | branches: 1.27.20; 1.27.22; merge ktrace-lwp.
|
1.26 |
| 29-May-2005 |
christos | branches: 1.26.2; - avoid variable shadowing - add a lot of const - remove parameters from functin declarations
|
1.25 |
| 27-Feb-2005 |
perry | branches: 1.25.2; nuke trailing whitespace
|
1.24 |
| 18-Mar-2004 |
oster | branches: 1.24.8; 1.24.10; Re-work the locking mechanisms for reconstruct and PSS structures such that we don't actually hold a simplelock while we are doing a pool_get(), but that we still effectively protecting critical code.
This should fix all of the outstanding LOCKDEBUG warnings related to rebuilding RAID sets.
|
1.23 |
| 05-Mar-2004 |
oster | Introduce RF_DEBUG_DAG and use it to #if-out rf_dagDebug sections. (i386 GENERIC kernel shrinks by 1.6K)
|
1.22 |
| 03-Mar-2004 |
oster | - cleanup unneeded 'row' from RF_CallbackDesc_s. - remove callbackArg2 from RF_CallbackDesc_s -- it is only ever set, never read. - now that this is done, all callbacks should only take a single argument, and we can simplify things further.
|
1.21 |
| 03-Mar-2004 |
oster | - cleanup memory allocation in rf_AllocPSStatus() - change function signature of rf_LookupRUStatus(). The last argument is now a pointer to a new PSS, in case one is needed. Rather than having rf_LookupRUStatus() allocate a new PSS, we pre-allocate one beforehand, where necessary, just in case. - change callers of rf_lookupRUStatus() to deal with the new way of calling rf_lookupRUStatus().
[no improvement or worsening of parity rebuild/initialization performance.]
|
1.20 |
| 02-Mar-2004 |
oster | Fix more cases where mutex locks were being held longer than necessary.
[For the record: The mcpair mutex is being used to protect mcpair->flag. mcpair gets allocated before each call to rf_DispatchDAG(), so there is no other process/thread that could be mucking with it. It is only used to detect the completion of a given parity unit, and rf_DispatchDAG() only uses it to setup the callback argument for rf_MCPairWakeupFunc() which will be called when the IO completes. The code after the call to rf_DispatchDAG() sits and waits for a 'wakeup' on mcpair->cond (rf_MCPairWakeupFunc() does that). If mcpair->flag is 0 when rf_DispatchDAG() completes, then rf_MCPairWakeupFunc() hasn't been called yet (the IO hasn't completed). If it is 1, then the IO is already done, and we continue on our merry way without sleeping. Thus, we don't need to hold any lock on mcpair while calling rf_DispatchDAG().]
|
1.19 |
| 01-Mar-2004 |
oster | Use RF_ACC_TRACE to #if out more chunks of code related only to access tracing. (not turned on yet)
|
1.18 |
| 29-Feb-2004 |
oster | Unlock the mcpair mutex before we call rf_DispatchDAG(), and re-lock it once we are back. Makes things much happier on SMP boxen. Problem noted by SimonB. (Thanks!)
|
1.17 |
| 10-Jan-2004 |
oster | iCleanup the RF_CREATE_PARAM3(). Middle two "arguments" were nothing but 0 in all cases.
|
1.16 |
| 02-Jan-2004 |
oster | Fix the "We panic if we can't create a DAG" problem that's existed ~forever. This requires a number of things:
1) If we can't create a DAG, set desc->numStripes to 0 in rf_SelectAlgorithm. This will ensure that we don't attempt to free any dagArray[] elements in rf_StateCleanup.
2) Modify rf_State_CreateDAG() to not panic in the event of a DAG failure. Instead, set the bp->b_flags and bp->b_error, and set things up to skip to rf_State_Cleanup().
3) Need to mark desc->status as "bad" so that we actually stop looking for a different DAG. (which we won't find... no matter how many times we try).
4) rf_State_LastState() will then do the biodone(), and return EIO for the IO in question.
5) Remove some " || 1 "'s from ProcessNode(). These were for debugging, and we don't need the failure notices spewing over and over again as the failing DAGs are processed.
6) Needed to change
if (asmap->numDataFailed + asmap->numParityFailed > 1)
to
if ((asmap->numDataFailed + asmap->numParityFailed > 1) || (raidPtr->numFailures > 1)){
in rf_raid5.c so that it doesn't try to return rf_CreateNonRedundantWriteDAG as the creation function.
7) Note that we can't apply the above change to the RAID 1 code as with the silly "fake 2-D" RAID 1 sets, it is possible to have 2 failed components in the RAID 1 set, and that would stop them from working. (I really don't know why/how those "fake 2-D" RAID 1 sets even work with all the "single-fault" assumptions present in the rest of the code.)
8) Needed to protect rf_RAID0DagSelect() in a similar way -- it should return NULL as the createFunc.
9) No point printing out "Multiple disks failed..." a zillion times.
|
1.15 |
| 30-Dec-2003 |
oster | Some days you wonder if some of the function declaration consistency was just an accident in the first place. Cleanup function decls and a few comments. [ok.. so I wasn't going to fix this many.. but once you're on a roll....]
|
1.14 |
| 29-Dec-2003 |
oster | [Having received a definite lack of strenuous objection, a small amount of strenuous agreement, and some general agreement, this commit is going ahead because it's now starting to block some other changes I wish to make.]
Remove most of the support for the concept of "rows" from RAIDframe. While the "row" interface has been exported to the world, RAIDframe internals have really only supported a single row, even though they have feigned support of multiple rows.
Nothing changes in configuration land -- config files still need to specify a single row, etc. All auto-config structures remain fully forward/backwards compatible.
The only visible difference to the average user should be a reduction in the size of a GENERIC kernel (i386) by 4.5K. For those of us trolling through RAIDframe kernel code, a lot of the driver configuration code has become a LOT easier to read.
|
1.13 |
| 23-Sep-2002 |
oster | branches: 1.13.6; Another 'unblockNode' goes *poof*. Also nuke an instance of an (effectively) unused layoutPtr. Thanks to Simon B.
|
1.12 |
| 23-Sep-2002 |
oster | bytesPerStripeUnit is set, but never used. Thanks to Simon B. for pointing this out.
|
1.11 |
| 17-Sep-2002 |
oster | Rename RF_DEBUG_RECONBUFFER to RF_DEBUG_RECON in order to facilitate disabling other stuff without having to introduce another #define.
|
1.10 |
| 14-Sep-2002 |
oster | Add two more debugging #defines: RF_DEBUG_RECONBUFFER and RF_DEBUG_VERIFYPARITY. Use them to reduce kernel bloat by a little more.
|
1.9 |
| 13-Jul-2002 |
oster | Most folks won't need the DAG printing and verification routines. Introduce a #define to toggle them on/off. Disable calls to rf_PrintDAGList(). Saves ~6K on GENERIC+DEBUG kernel on i386.
|
1.8 |
| 13-Nov-2001 |
lukem | branches: 1.8.8; add RCSIDs
|
1.7 |
| 18-Jul-2001 |
thorpej | bcmp -> memcmp
|
1.6 |
| 18-Jul-2001 |
thorpej | bzero -> memset
|
1.5 |
| 08-Jan-2000 |
oster | branches: 1.5.6; 1.5.8; - nuke calls to rf_get_threadid() and associated #include - change a bunch of debugging printfs from "[%d] ...", tid (where tid is the "thread id") to "raid%d: ...", raidPtr->raidid - other minor rototillage
|
1.4 |
| 13-Aug-1999 |
oster | branches: 1.4.2; rf_sys.h does not need to be #included in any of these files, and, actually, is no longer needed at all.
|
1.3 |
| 05-Feb-1999 |
oster | Phase 2 of the RAIDframe cleanup. The source is now closer to KNF and is much easier to read. No functionality changes.
|
1.2 |
| 26-Jan-1999 |
oster | 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.
|
1.1 |
| 13-Nov-1998 |
oster | RAIDframe, version 1.1, from the Parallel Data Laboratory at Carnegie Mellon University. Full RAID implementation, including levels 0, 1, 4, 5, 6, parity logging, and a few other goodies. Ported to NetBSD by Greg Oster.
|
1.4.2.1 |
| 20-Nov-2000 |
bouyer | Update thorpej_scsipi to -current as of a month ago A i386 GENERIC kernel compiles without the siop, ahc and bha drivers (will be updated later). i386 IDE/ATAPI and ncr work, as well as sparc/esp_sbus. alpha should work as well (untested yet). siop, ahc and bha will be updated once I've updated the branch to current -current, as well as machine-dependant code.
|
1.5.8.4 |
| 10-Oct-2002 |
jdolecek | sync kqueue with -current; this includes merge of gehenna-devsw branch, merge of i386 MP branch, and part of autoconf rototil work
|
1.5.8.3 |
| 06-Sep-2002 |
jdolecek | sync kqueue branch with HEAD
|
1.5.8.2 |
| 10-Jan-2002 |
thorpej | Sync kqueue branch with -current.
|
1.5.8.1 |
| 03-Aug-2001 |
lukem | update to -current
|
1.5.6.5 |
| 18-Oct-2002 |
nathanw | Catch up to -current.
|
1.5.6.4 |
| 17-Sep-2002 |
nathanw | Catch up to -current.
|
1.5.6.3 |
| 01-Aug-2002 |
nathanw | Catch up to -current.
|
1.5.6.2 |
| 14-Nov-2001 |
nathanw | Catch up to -current.
|
1.5.6.1 |
| 24-Aug-2001 |
nathanw | Catch up with -current.
|
1.8.8.1 |
| 15-Jul-2002 |
gehenna | catch up with -current.
|
1.13.6.5 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.13.6.4 |
| 04-Mar-2005 |
skrll | Sync with HEAD.
Hi Perry!
|
1.13.6.3 |
| 21-Sep-2004 |
skrll | Fix the sync with head I botched.
|
1.13.6.2 |
| 18-Sep-2004 |
skrll | Sync with HEAD.
|
1.13.6.1 |
| 03-Aug-2004 |
skrll | Sync with HEAD
|
1.24.10.1 |
| 19-Mar-2005 |
yamt | sync with head. xen and whitespace. xen part is not finished.
|
1.24.8.1 |
| 29-Apr-2005 |
kent | sync with -current
|
1.25.2.1 |
| 17-Jun-2005 |
tron | Pull up revision 1.26 (requested by oster in ticket #472): - avoid variable shadowing - add a lot of const - remove parameters from function declarations
|
1.26.2.2 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.26.2.1 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.27.22.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.27.22.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.27.20.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.29.4.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.30.38.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.30.36.1 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.31.24.2 |
| 31-May-2011 |
rmind | sync with head
|
1.31.24.1 |
| 30-May-2010 |
rmind | sync with head
|
1.31.22.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.31.2.1 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.32.2.1 |
| 06-Jun-2011 |
jruoho | Sync with HEAD.
|
1.34.18.1 |
| 18-May-2014 |
rmind | sync with head
|
1.34.14.1 |
| 20-Aug-2014 |
tls | Rebase to HEAD as of a few days ago.
|
1.34.4.1 |
| 22-May-2014 |
yamt | sync with head.
for a reference, the tree before this commit was tagged as yamt-pagecache-tag8.
this commit was splitted into small chunks to avoid a limitation of cvs. ("Protocol error: too many arguments")
|
1.35.30.2 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.35.30.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.37.12.1 |
| 01-Aug-2021 |
thorpej | Sync with HEAD.
|