summaryrefslogtreecommitdiff
path: root/sys/dev/softraidvar.h
AgeCommit message (Collapse)Author
2016-05-31Provide a function for calculting the rebuild percentage, rather thanJoel Sing
having five copies of the same code. ok krw@
2016-04-04Enable creation of softraid volumes using disks with non-512 byteKenneth R Westerback
sectors. Volumes created will present a sector size equal to the largest sector size of the constituent disks. Softraid Metadata version cranks to 6 due to new field. ok jsing@ with tweaks that will follow soon.
2015-07-21A few more daddr_t fixes. Rename 'phys_off' variables to 'offset'Kenneth R Westerback
since they are now relative to chunks. Use 'blkno' as normal variable name for daddr_t items rather than mix of 'blkno, blk, offset. Change field name ssd_data_offset to ssd_data_blkno since it is a block and not byte quantity. No intentional functional change.
2015-07-19Stop passing daddr_t parameters for lengths. Use long since that's the typeKenneth R Westerback
of the destination fields. ok jsing@
2015-01-27remove the second void * argument on tasks.David Gwynne
when workqs were introduced, we provided a second argument so you could pass a thing and some context to work on it in. there were very few things that took advantage of the second argument, so when i introduced pools i suggested removing it. since tasks were meant to replace workqs, it was requested that we keep the second argument to make porting from workqs to tasks easier. now that workqs are gone, i had a look at the use of the second argument again and found only one good use of it (vdsp(4) on sparc64 if you're interested) and a tiny handful of questionable uses. the vast majority of tasks only used a single argument. i have since modified all tasks that used two args to only use one, so now we can remove the second argument. so this is a mechanical change. all tasks only passed NULL as their second argument, so we can just remove it. ok krw@
2014-10-07remove preliminary AOE (ata over ethernet) support. not finished afterTed Unangst
many years and wide spread demand for support never materialized. time to pack it in.
2014-07-20Support hibernating to softraid crypto volumes.Mike Larkin
much help and ok from deraadt@
2014-07-12essentially mechanical conversion of softraid rebuild fromBret Lambert
workq to taskq ok jsing@
2014-07-10Stop using a shutdown hook for softraid(4) and explicitly shutdownMartin Pieuchot
the disciplines right after vfs_shutdown(). This change is required in order to be able to set `cold' to 1 before traversing the device (mainbus) tree for DVACT_POWERDOWN when halting a machine. Yes, this is ugly because sr_shutdown() needs to sleep. But at least it is obvious and hopefully somebody will be ofended and fix it. In order to properly flush the cache of the disks under softraid0, sr_shutdown() now propagates DVACT_POWERDOWN for this particular subtree of devices which are not under mainbus. As a side effect sd(4) shutdown hook should no longer be necessary. Tested by stsp@ and Jean-Philippe Ouellet. ok deraadt@, stsp@, jsing@
2014-01-22Add a debug flag for rebuild.Joel Sing
2014-01-22Make rebuild a discipline specific function pointer. For now, this defaultsJoel Sing
to the existing rebuild code. ok krw@
2014-01-22Move sr_dump from the RAID5 code into shared code. Rename it toJoel Sing
sr_dump_block and place it under the debug define in the process.
2014-01-22Switch metadata saves from the system workq to the system taskq.Joel Sing
ok dlg@
2014-01-21Instead of maintaining a completely separate list of crypto work units,Joel Sing
simply allocate larger work units and include the normal work unit struct in the top of the crypto work unit struct. This greatly simplifies the code and removes possible failure cases. Discussed with dlg@ ok krw@
2014-01-21Allow for variable sized work units.Joel Sing
ok krw@
2014-01-21Use a TAILQ for tracking work units, rather than an array. This will allowJoel Sing
for variable size work units. While here, remove some pointless checks. ok krw@
2014-01-20Convert the softraid work unit workqs to taskqs.Joel Sing
ok dlg@
2014-01-20Store the algorithm and key length in the discipline data structure,Joel Sing
instead of having multiple switch statements in various places. ok mikeb@
2014-01-20Replace dedicated swu_fake variable with a work unit flag.Joel Sing
ok krw@
2014-01-18Move the block get/put routines into the common code, instead of havingJoel Sing
RAID 6 borrow them from RAID 5.
2014-01-18Rename softraid RAIDP to softraid RAID5.Joel Sing
Discussed with krw@
2014-01-18Remove the RAID 4 discipline from softraid. Anyone sensible would use RAIDJoel Sing
5 instead of RAID 4, assuming both were functional. Discussed with krw@
2014-01-18Improve comments re KDF hints.Joel Sing
2013-11-04substantial namespace cleanup. Might go a little bit too far, but weTheo de Raadt
can expose some of the kernel structures with split .h files if need be. Discussed with various, including jsing.
2013-06-11final removal of daddr64_t. daddr_t has been 64 bit for a long enoughTheo de Raadt
test period; i think 3 years ago the last bugs fell out. ok otto beck others
2013-05-21Provide a function that handles the scheduling of work units. ThisJoel Sing
simplifies the discipline code, avoids code duplication and moves the scheduling logic into a single location. ok krw@
2013-05-21Use a state to indicate that a work unit should only be constructed and notJoel Sing
scheduled, rather than trying to imply this from the rebuild flag.
2013-04-26Add a SR_WUF_DISCIPLINE flag that identifies work units that have resultedJoel Sing
from discipline specific I/O. Such work units are not associated with a SCSI xfer and are returned via sr_wu_put() on completion.
2013-04-23Rename ccb_flag to ccb_flags.Joel Sing
2013-04-21Convert RAID1 to the new work unit completion functions and genericJoel Sing
interrupt handler. Disciplines such as RAID1/4/5/6 need a way to intercept I/O when the work unit is complete, but before the SCSI xfer is complete. This is provided via a sd_scsi_wu_done hook, which enables work units to be restarted or otherwise modified before the SCSI xfer completion occurs. ok krw@
2013-03-31The return value of sd_free_resources() is never checked and all of theJoel Sing
implementations only ever returned zero. Change the return value from int to void instead of pretending it might mean something.
2013-03-30Provide wrappers for scsi_io_get() and scsi_io_put(), that also includeJoel Sing
the sd_sync check/wakeup. Remove some unnecessary NULL checks whilst here. ok krw@
2013-03-30Provide a default discipline interrupt handling function and migrate all ofJoel Sing
the disciplines that now have the same interrupt code. ok krw@
2013-03-29Decouple wakeups on work unit completion from the type of I/O beingJoel Sing
performed. ok krw@
2013-03-25Factor out the code that is used to recreate work units - one copy of theJoel Sing
code is sufficient. ok krw@
2013-03-10Rename sc_dis to sc_targets, since it is an array of targets that alsoJoel Sing
happen to be softraid disciplines. ok krw@
2013-03-05Track attached softraid disciplines via a queue. This prevents the need toJoel Sing
scan the sparse SCSI targets array and simplifies code. Disciplines are now also shutdown in reverse attach order, making manually stacked softraid volumes somewhat more practical. ok krw@
2013-01-18Implement common workunit completion functions and handle the completionJoel Sing
via a workq callback. Also provide a discipline specific hook that allows it to optionally handle the final part of the workunit completion. ok krw@
2013-01-16Add a function that handles the completion of a ccb.Joel Sing
ok krw@
2013-01-16Add a new capability flag to identify disciplines where read failures areJoel Sing
not necessarily terminal (i.e. we have redundancy). ok krw@
2013-01-16Factor out code used to release ccbs from a workunit.Joel Sing
ok krw@
2013-01-15Implement a function that gets and correctly initialises a ccb for I/O,Joel Sing
along with a function that enqueues a ccb on a workunit. ok krw@
2013-01-15Keep a function pointer to the per-discipline I/O interrupt handler in theJoel Sing
discipline data structure. To be used with an upcoming diff.
2013-01-15Factor out workunit initialisation code.Joel Sing
ok krw@
2012-10-09Teach amd64 boot(8) how to access a softraid crypto volume. This allows forJoel Sing
full disk encryption since the kernel can now be loaded directly from the crypto volume, instead of needing to be on FFS. This is currently disabled by default, however can be enabled by compiling with boot(8) 'make -DBOOT_CRYPTO'.
2012-10-09Provide a mechanism for the kernel to directly pass a mask key through toJoel Sing
a crypto volume when it is assembling it.
2012-10-08Provide a mechanism for the kernel to pass data through to the disciplineJoel Sing
during volume assembly.
2012-01-28Only pass bio ioctls through to the softraid bio ioctl handler. Rename theJoel Sing
handler to emphasise that it is for bio ioctls only. Discovered the hard way by dhill@
2012-01-20Add bio(4) status interface structs and utility functions to softraid(4).Joel Sing
2012-01-11Make sr_boot_chunk and sr_boot_volume accessible from userland. Add aJoel Sing
number of variables that are needed to detect and assemble volumes. A sr_metadata struct can be allocated and used via the sbc_metadata pointer, which we now do in the kernel boot probe/assembly code.