Home | History | Annotate | Download | only in raidframe
History log of /src/sys/dev/raidframe/rf_desc.h
RevisionDateAuthorComments
 1.22  23-Jul-2021  oster All IO is async in the RAIDframe kernel driver, so desc->async_flag
isn't needed. Cleanup the flag from rf_DoAccess() and its caller as
well.
 1.21  10-Oct-2019  christos branches: 1.21.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.20  04-Mar-2007  christos branches: 1.20.130;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.19  11-Dec-2005  christos branches: 1.19.26;
merge ktrace-lwp.
 1.18  27-Feb-2005  perry branches: 1.18.4;
nuke trailing whitespace
 1.17  13-Feb-2005  oster Convert a few "void *"'s to "struct buf *"'s. No functional changes.
 1.16  12-Dec-2004  oster branches: 1.16.2; 1.16.4;
The switch() in rf_ContinueReconstructFailedDisk() is never actually
used in non-simulation code, and thus is just wasting space (and
making the code more confusing to read!). Turf the switch, left-shift
the indentation of code, and nuke 'state' field of struct RF_RaidReconDesc_s.

No real functional changes.
 1.15  16-Nov-2004  oster On an idea from Thor (tls@), do not fail a component if doing so would
render the RAID set completely dead. Instead, we retry the IO a
maximum of RF_RETRY_THRESHOLD times (currently '5'), and then just
return an IO error if the IO fails. This should reduce the damage
caused by having multiple disks appear to fail when the culprit is
really something else (power, controllers, etc.)
 1.14  02-Jun-2004  drochner fix const'ificication, gcc-3.4 will notice it
 1.13  09-Apr-2004  oster These changes complete the effective removal of malloc() from all
write paths within RAIDframe. They also resolve the "panics with
RAID 5 sets with more than 3 components" issue which was present
(briefly) in the commits which were previously supposed to address
the malloc() issue.

With this new code the 5-component RAID 5 set panics are now gone.

It is also now also possible to swap to RAID 5.

The changes made are:

1) Introduce rf_AllocStripeBuffer() and rf_FreeStripeBuffer() to
allocate/free one stripe's worth of space. rf_AllocStripeBuffer() is
used in rf_MapUnaccessedPortionOfStripe() where it is not sufficient to
allocate memory using just rf_AllocBuffer(). rf_FreeStripeBuffer() is
called from rf_FreeRaidAccDesc(), well after the DAG is finished.

2) Add a set of emergency "stripe buffers" to struct RF_Raid_s.
Arrange for their initialization in rf_Configure(). In low-memory
situations these buffers will be returned by rf_AllocStripeBuffer()
and re-populated by rf_FreeStripeBuffer().

3) Move RF_VoidPointerListElem_t *iobufs from the dagHeader into
into struct RF_RaidAccessDesc_s. This is more consistent with the
original code, and will not result in items being freed "too early".

4) Add a RF_RaidAccessDesc_t *desc to RF_DagHeader_s so that we have a
way to find desc->iobufs.

5) Arrange for desc in the DagHeader to be initialized in InitHdrNode().

6) Don't cleanup iobufs in rf_FreeDAG() -- the freeing is now delayed
until rf_FreeRaidAccDesc() (which is how the original code handled the
allocList, and for which there seem to be some subtle, undocumented
assumptions).

7) Rename rf_AllocBuffer2() to be rf_AllocBuffer() and remove the
former rf_AllocBuffer(). Fix all callers of rf_AllocBuffer().
(This was how it was *supposed* to be after the last time these
changes were made, before they were backed out).

8) Remove RF_IOBufHeader and all references to it.

9) Remove desc->cleanupList and all references to it.

Fixes PR#20191
 1.12  13-Mar-2004  oster branches: 1.12.2;
This desc->mutex is only ever initialized -- never used. *toss*
 1.11  13-Mar-2004  oster paramDAG and paramASM are only ever set, but never used. *toss*
 1.10  27-Feb-2004  oster Use a dynamically allocated linked list of dagLists instead of using a
dynamically allocated variable-sized array (dagArray). Convert code
to use the new linked list stuff instead of the array stuff (the ratio
of one dagList per stripe still applies). The big advantage is in
being able to more efficiently allocate the dagLists on-the-fly, and
not have to know the size(s) of the array beforehand.
 1.9  01-Jan-2004  oster Nuke a bunch of unused variables:
- node_queue_cond
- quiescent_cond
- eq_cond
- desc->cond
- desc->head
- diskqueue->numWaiting

Nuke rf_print_unable_to_init_cond().
Nuke rf_TerminateDiskQueues prototype from rf_diskqueue.h.
 1.8  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.7  15-Sep-2002  oster branches: 1.7.6;
Nuke 'numPending' from the RF_RaidAccessDesc_s structure, and minor cleanup.
 1.6  04-Oct-2001  oster Step 2 of the disentanglement. We now look to <dev/raidframe/*> for
the stuff that used to live in rf_types.h, rf_raidframe.h, rf_layout.h,
rf_netbsd.h, rf_raid.h, rf_decluster,h, and a few other places.
Believe it or not, when this is all done, things will be cleaner.

No functional changes to RAIDframe.
 1.5  09-Jan-2000  oster branches: 1.5.6; 1.5.8; 1.5.10;
Nuke desc->tid.
 1.4  05-Feb-1999  oster branches: 1.4.8;
Phase 2 of the RAIDframe cleanup. The source is now closer to KNF
and is much easier to read. No functionality changes.
 1.3  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.2  15-Jan-1999  explorer Make it so raidframe will only perform synchronous writes, and async
reads. This avoids a problem where many writes will cause the driver
to allocate way too much memory.

This needs to change to a queueing system later, which will provide a
way to limit the memory consumed by the driver.

Without these changes, raidframe would use 24M or more on my machine when
the buffer cache dumped all its dirty blocks. Now it uses around 200k
or so.
 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.8.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.10.1  11-Oct-2001  fvdl Catch up with -current. Fix some bogons in the sparc64 kbd/ms
attach code. cd18xx conversion provided by mrg.
 1.5.8.2  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.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.6.2  17-Sep-2002  nathanw Catch up to -current.
 1.5.6.1  22-Oct-2001  nathanw Catch up to -current.
 1.7.6.7  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.7.6.6  15-Feb-2005  skrll Sync with HEAD.
 1.7.6.5  18-Dec-2004  skrll Sync with HEAD.
 1.7.6.4  29-Nov-2004  skrll Sync with HEAD.
 1.7.6.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.7.6.2  18-Sep-2004  skrll Sync with HEAD.
 1.7.6.1  03-Aug-2004  skrll Sync with HEAD
 1.12.2.2  28-Jun-2004  tron branches: 1.12.2.2.2;
Pull up revision 1.14 (requested by oster in ticket #563):
fix const'ificication, gcc-3.4 will notice it
 1.12.2.1  11-Apr-2004  tron Pull up revision 1.13 (requested by oster in ticket #123):
These changes complete the effective removal of malloc() from all
write paths within RAIDframe. They also resolve the "panics with
RAID 5 sets with more than 3 components" issue which was present
(briefly) in the commits which were previously supposed to address
the malloc() issue.
With this new code the 5-component RAID 5 set panics are now gone.
It is also now also possible to swap to RAID 5.
The changes made are:
1) Introduce rf_AllocStripeBuffer() and rf_FreeStripeBuffer() to
allocate/free one stripe's worth of space. rf_AllocStripeBuffer() is
used in rf_MapUnaccessedPortionOfStripe() where it is not sufficient to
allocate memory using just rf_AllocBuffer(). rf_FreeStripeBuffer() is
called from rf_FreeRaidAccDesc(), well after the DAG is finished.
2) Add a set of emergency "stripe buffers" to struct RF_Raid_s.
Arrange for their initialization in rf_Configure(). In low-memory
situations these buffers will be returned by rf_AllocStripeBuffer()
and re-populated by rf_FreeStripeBuffer().
3) Move RF_VoidPointerListElem_t *iobufs from the dagHeader into
into struct RF_RaidAccessDesc_s. This is more consistent with the
original code, and will not result in items being freed "too early".
4) Add a RF_RaidAccessDesc_t *desc to RF_DagHeader_s so that we have a
way to find desc->iobufs.
5) Arrange for desc in the DagHeader to be initialized in InitHdrNode().
6) Don't cleanup iobufs in rf_FreeDAG() -- the freeing is now delayed
until rf_FreeRaidAccDesc() (which is how the original code handled the
allocList, and for which there seem to be some subtle, undocumented
assumptions).
7) Rename rf_AllocBuffer2() to be rf_AllocBuffer() and remove the
former rf_AllocBuffer(). Fix all callers of rf_AllocBuffer().
(This was how it was *supposed* to be after the last time these
changes were made, before they were backed out).
8) Remove RF_IOBufHeader and all references to it.
9) Remove desc->cleanupList and all references to it.
Fixes PR#20191
 1.12.2.2.2.1  06-Apr-2005  tron Pull up revision 1.15 (requested by oster in ticket #1038):
On an idea from Thor (tls@), do not fail a component if doing so would
render the RAID set completely dead. Instead, we retry the IO a
maximum of RF_RETRY_THRESHOLD times (currently '5'), and then just
return an IO error if the IO fails. This should reduce the damage
caused by having multiple disks appear to fail when the culprit is
really something else (power, controllers, etc.)
 1.16.4.1  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.16.2.1  29-Apr-2005  kent sync with -current
 1.18.4.1  03-Sep-2007  yamt sync with head.
 1.19.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.20.130.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.21.12.1  01-Aug-2021  thorpej Sync with HEAD.

RSS XML Feed