Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/sys/dev/raidframe



Module Name:    src
Committed By:   oster
Date:           Fri Apr  9 23:10:17 UTC 2004

Modified Files:
        src/sys/dev/raidframe: rf_aselect.c rf_dag.h rf_dagdegwr.c rf_dagffwr.c
            rf_dagutils.c rf_dagutils.h rf_desc.h rf_driver.c rf_netbsd.h
            rf_raid.h

Log Message:
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


To generate a diff of this commit:
cvs rdiff -r1.19 -r1.20 src/sys/dev/raidframe/rf_aselect.c \
    src/sys/dev/raidframe/rf_netbsd.h
cvs rdiff -r1.15 -r1.16 src/sys/dev/raidframe/rf_dag.h
cvs rdiff -r1.23 -r1.24 src/sys/dev/raidframe/rf_dagdegwr.c
cvs rdiff -r1.26 -r1.27 src/sys/dev/raidframe/rf_dagffwr.c
cvs rdiff -r1.43 -r1.44 src/sys/dev/raidframe/rf_dagutils.c
cvs rdiff -r1.16 -r1.17 src/sys/dev/raidframe/rf_dagutils.h
cvs rdiff -r1.12 -r1.13 src/sys/dev/raidframe/rf_desc.h
cvs rdiff -r1.98 -r1.99 src/sys/dev/raidframe/rf_driver.c
cvs rdiff -r1.32 -r1.33 src/sys/dev/raidframe/rf_raid.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index