Home | History | Annotate | Download | only in raidframe
History log of /src/sys/dev/raidframe/rf_diskqueue.h
RevisionDateAuthorComments
 1.30  17-Sep-2023  oster Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:
Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:
Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.
 1.29  27-Jul-2021  oster branches: 1.29.10;
rf_CreateDiskQueueData() no longer uses waitflag, and will always succeed.
Cleanup the error path for the (no longer needed) PR_NOWAIT cases.
 1.28  23-Jul-2021  oster Various disk queue "peek" routines were only ever used in the simulator
version of RAIDFrame. Remove them from here.
 1.27  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.26  19-Jun-2020  jdolecek branches: 1.26.6;
pass down b_flags B_PHYS|B_RAW|B_MEDIA_FLAGS from bio subsystem
to component I/O

fixes the xbd(4) KASSERT() triggered by raidframe, noted in PR kern/55397
by Frank Kardel
 1.25  10-Oct-2019  christos 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.24  05-May-2011  mrg branches: 1.24.56;
convert the diskqueue mutex into a kmutex
 1.23  23-Mar-2009  oster branches: 1.23.4; 1.23.6;
Rework/simplify the disk queuing code. A bunch of this was still
holdovers from the simulator and would never be seen/used in-kernel.
 1.22  04-Mar-2007  christos branches: 1.22.40; 1.22.50; 1.22.52; 1.22.56; 1.22.60;
Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
 1.21  11-Dec-2005  christos branches: 1.21.26;
merge ktrace-lwp.
 1.20  27-Feb-2005  perry branches: 1.20.4;
nuke trailing whitespace
 1.19  12-Feb-2005  oster The 'next' argument to rf_CreateDiskQueueData is always NULL. Since
there is no particular reason to pass an extra NULL argument, turf it,
and initialize p->next to NULL within the function.
 1.18  12-Feb-2005  oster Add a 'waitflag' argument to rf_CreateDiskQueueData() and use it to
determine if we are willing to wait for memory to come from the
diskqueuedata (dqd) and bufpool pools. Cleanup the mess related to
code calling rf_CreateDiskQueueData() with different expectations
(and/or blatent disregard) of what might happen if there were
insufficient pool resources.
 1.17  05-Feb-2005  oster CreateDiskQueueData() doesn't need to use void * for raidPtr.
RF_Raid_t is well known in RF, and there's no reason not to use it here.
 1.16  04-Mar-2004  oster branches: 1.16.8; 1.16.10;
Cleanup one more leftover 'row' variable. Cleanup function prototypes
in rf_diskqueue.h
 1.15  24-Feb-2004  wiz occured -> occurred. From Peter Postma.
 1.14  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.13  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.12  09-Feb-2003  jdolecek branches: 1.12.2;
constify some
 1.11  04-Oct-2002  oster As part of the effort to get RAIDframe playing nicely with LOCKDEBUG,
rework how completed requests are handled. In particular, instead of
doing all sorts of work and locking in interrupt context, completed
requests are now queued. A new kernel thread (rf_RaidIOThread) now
handles calling rf_DiskIOComplete() and (req->CompleteFunc)() for each
completed request. There is still work to be done to make RAIDframe
LOCKDEBUG friendly, but this change is a huge step forward.

Reviewed by (and many thanks to): thorpej
 1.10  15-Sep-2002  oster Nuke unlockingOp -- it was only used for the userland version of the
code.
 1.9  15-Sep-2002  oster Remove a couple of unneeded structure members.
 1.8  15-Sep-2002  oster 'buf2' is unused. Nuke it.
 1.7  02-Aug-2002  oster - AuxFunc is no longer used.
- cleanup function prototypes in rf_diskqueue.h
 1.6  04-Oct-2001  oster branches: 1.6.10;
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  13-Feb-2000  oster branches: 1.5.6; 1.5.8; 1.5.10;
Get recent changes into the tree:
- make component_label variables more consistent (==> clabel)
- re-work incorrect component configuration code
- re-work disk configuration code
- cleanup initial configuration of raidPtr info
- add auto-detection of components and RAID sets (Disabled, for now)
- allow / on RAID sets (Disabled, for now)
- rename "config_disk_queue" to "rf_ConfigureDiskQueue" and properly prototype
in rf_diskqueue.h
- protect some headers with #if _KERNEL (XXX this needs to be fixed properly)
and cleanup header formatting.
- expand the component labels (yes, they should be backward/forward compatible)
- other bits and pieces (some function names are still bogus, and will get
changed soon)
 1.4  08-Jan-2000  oster Make raidPtr a 'RF_Raid_t *' like it's supposed to be.
 1.3  05-Feb-1999  oster branches: 1.3.8;
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.3.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.2  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.10.1  07-Sep-2001  thorpej Commit my "devvp" changes to the thorpej-devvp branch. This
replaces the use of dev_t in most places with a struct vnode *.

This will form the basic infrastructure for real cloning device
support (besides being architecurally cleaner -- it'll be good
to get away from using numbers to represent objects).
 1.5.8.3  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.2  06-Sep-2002  jdolecek sync kqueue branch with HEAD
 1.5.8.1  10-Jan-2002  thorpej Sync kqueue branch with -current.
 1.5.6.4  18-Oct-2002  nathanw Catch up to -current.
 1.5.6.3  17-Sep-2002  nathanw Catch up to -current.
 1.5.6.2  13-Aug-2002  nathanw Catch up to -current.
 1.5.6.1  22-Oct-2001  nathanw Catch up to -current.
 1.6.10.1  29-Aug-2002  gehenna catch up with -current.
 1.12.2.6  04-Mar-2005  skrll Sync with HEAD.

Hi Perry!
 1.12.2.5  15-Feb-2005  skrll Sync with HEAD.
 1.12.2.4  06-Feb-2005  skrll Sync with HEAD.
 1.12.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.12.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.12.2.1  03-Aug-2004  skrll Sync with HEAD
 1.16.10.2  19-Mar-2005  yamt sync with head. xen and whitespace. xen part is not finished.
 1.16.10.1  12-Feb-2005  yamt sync with head.
 1.16.8.1  29-Apr-2005  kent sync with -current
 1.20.4.1  03-Sep-2007  yamt sync with head.
 1.21.26.1  12-Mar-2007  rmind Sync with HEAD.
 1.22.60.1  21-Apr-2010  matt sync to netbsd-5
 1.22.56.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.22.52.1  01-May-2009  snj Pull up following revision(s) (requested by oster in ticket #607):
sys/dev/raidframe/rf_dagfuncs.c: revision 1.30
sys/dev/raidframe/rf_diskqueue.c: revision 1.52
sys/dev/raidframe/rf_diskqueue.h: revision 1.23
Rework/simplify the disk queuing code. A bunch of this was still
holdovers from the simulator and would never be seen/used in-kernel.
 1.22.50.1  28-Apr-2009  skrll Sync with HEAD.
 1.22.40.1  04-May-2009  yamt sync with head.
 1.23.6.1  06-Jun-2011  jruoho Sync with HEAD.
 1.23.4.1  31-May-2011  rmind sync with head
 1.24.56.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.26.6.1  01-Aug-2021  thorpej Sync with HEAD.
 1.29.10.1  28-Apr-2024  martin Pull up following revision(s) (requested by oster in ticket #674):

sys/dev/raidframe/rf_raid.h: revision 1.52
sbin/raidctl/raidctl.8: revision 1.80
sys/dev/raidframe/rf_driver.c: revision 1.141
sys/dev/raidframe/rf_disks.c: revision 1.94
sys/dev/raidframe/rf_diskqueue.c: revision 1.64
sys/dev/raidframe/rf_diskqueue.h: revision 1.30
sys/dev/raidframe/rf_disks.h: revision 1.15
sys/dev/raidframe/rf_netbsdkintf.c: revision 1.414
sys/dev/raidframe/rf_reconstruct.c: revision 1.129
sys/dev/raidframe/raidframeio.h: revision 1.12
sbin/raidctl/raidctl.c: revision 1.79

Implement hot removal of spares and components. From manu@.

Implement a long desired feature of automatically incorporating
a used spare into the array after a reconstruct.

Given the configuration:

Components:
/dev/wd0e: failed
/dev/wd1e: optimal
/dev/wd2e: optimal
Spares:
/dev/wd3e: spare

Running 'raidctl -F /dev/wd0e raid0' will now result in the
following configuration after a successful rebuild:

Components:
/dev/wd3e: optimal
/dev/wd1e: optimal
/dev/wd2e: optimal
No spares.

Thanks to manu@ for the development of the initial set of changes
which allowed the changes to automatically incorporate a used spare
to come to fruition. Thanks also to manu@ for useful discussions
about and additional testing of these changes.

RSS XML Feed