summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid6.c
AgeCommit message (Collapse)Author
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-21Order the volume state transitions by state value.Joel Sing
2014-01-18Move the block get/put routines into the common code, instead of havingJoel Sing
RAID 6 borrow them from RAID 5.
2013-11-21Cast daddr_t variable to (long long) even for %llx!Kenneth R Westerback
2013-11-21Change a bunch of daddr_t variables that don't (obviously) containKenneth R Westerback
512-byte-block information to int64_t, the underlying type of daddr_t at the moment. No change to .o files. Removal of now unneeded (long long) casts is next.
2013-11-05Fix RAID levels 0, 4, 5, and 6 with partitions larger than 2TB.Reyk Floeter
A 64bit bit operation with the 32bit strip size could overflow and result in ridiculously small volumes when using large partitions (eg. 4x 3TB in RAID 5 resulted in a ~2TB volume). It is fixed by casting the strip size to an unsigned 64bit value. ok tedu@ millert@ deraadt@
2013-11-01Sprinkle (long long) casts where %lld is being used to print daddr_tKenneth R Westerback
variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
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-21Fix missing work unit state initialisations.Joel Sing
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-27Convert RAID 6 to new work unit completion routines.Joel Sing
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-23Convert RAID6 to new ccb handling.Joel Sing
2013-04-23Do not pass SR_CCBF_FREEBUF unless we are passing an already allocatedJoel Sing
buffer that we want freed; set SR_CCBF_FREEBUF when a buffer is allocated by the addio function.
2013-04-23Rename ccb_flag to ccb_flags.Joel Sing
2013-03-31Use consistent error handling when validating the number of chunksJoel Sing
provided.
2013-03-31Provide default resource allocation and free functions. Convert allJoel Sing
disciplines except for AOE and CRYPTO, which require custom handlers.
2013-03-31Pull the initialisation of runtime values out into a separate initJoel Sing
function, rather than having it spread across create/assemble/alloc. Also handle strip size errors appropriately, rather than failing silently. ok krw@
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-29Properly release ccbs when restarting a work unit.Joel Sing
2013-03-29Convert RAID 4/5/6 to new ccb completion code.Joel Sing
2013-03-29Decouple wakeups on work unit completion from the type of I/O beingJoel Sing
performed. ok krw@
2013-03-29sd_wu_pending is only decremented when scsi_done() or scsi_io_put() areJoel Sing
called. As a result, factor out the the sd_sync check/wakeup code and move it to after the scsi_done() call in sr_scsi_done(). Perform the same sd_sync check/wakeup after scsi_io_put() calls (including the addition of some that were previously missed). ok krw@
2013-03-27Rewrite the work unit handling code in the RAID 1/4/5/6 interrupt handlers.Joel Sing
This simplifies the code and will allow for easier conversion to the workq based work unit completion routines. It also ensures that work units are always removed from the pending queue and that colliders are started, even in the event of an I/O failure. 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-02sr_alloc_resources() and sr_free_resources() can never be called withoutJoel Sing
a valid struct sr_discipline. Remove redundant NULL pointer checks.
2013-01-16Consistently call sr_scsi_done instead of scsi_done.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-16Set resid to zero if the scsi transfer completed without error.Joel Sing
ok krw@
2013-01-16Factor out code used to release ccbs from a workunit.Joel Sing
ok krw@
2013-01-15Always initialise the discipline name, not just when we are doing a create.Joel Sing
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.
2012-12-31Spell `calculation' correctly.Miod Vallat
2012-10-08Provide a mechanism for the kernel to pass data through to the disciplineJoel Sing
during volume assembly.
2011-12-25Initialise discipline function pointers with defaults and only overrideJoel Sing
those that are needed by a specific discipline.
2011-04-21Speedup XORP/XORQ operations in RAID6, do 32-bits at a timeJordan Hargrave
2011-04-08Remove unused code/arrayJordan Hargrave
2011-04-08Fix raidp/raid6 to work with new iopool code, needed to swap wu'sJordan Hargrave
Update to use dma_malloc for I/O blocks ok marco@
2011-04-06fix some spaces while looking for bigmem shizMarco Peereboom
2011-04-05Iopoolification. Testing by marco@.Kenneth R Westerback
ok dlg@ marco@
2010-08-07No "\n" needed at the end of panic() strings.Kenneth R Westerback
Bogus chunks pointed out by matthew@ and miod@. No cookies for marco@ and jasper@. ok deraadt@ miod@ matthew@ jasper@ macro@
2010-07-02Determine the data offset using a variable specified within the softraidJoel Sing
metadata. This allows us to implement seamless transitions from the previous metadata version to the current version, avoiding the need to recreate the softraid volume. Joint work with marco@ during c2k10. ok marco@
2010-07-01make sure that buf's on the stack set the b_bq to NULL.Thordur I. Bjornsson
one memset -> bzero. ok marco@, jsing@
2010-03-26Add storage for the boot block and boot loader to the softraid metadata.Joel Sing
Also add a new optional metadata type for boot data. This is the first step (of many) towards being able to boot from softraid volumes. WARNING: This version of the softraid metadata is not compatible with previous versions. As a result, any softraid volumes created with older kernels will not assemble. Data on existing softraid volumes should be backed up before upgrading. The volume should then be recreated and the data restored. ok marco@
2010-02-09XY Failure reads no longer require temp buffer or WUF_FAILJordan Hargrave
2010-02-04Added optimization for XY reads, requires only one temp bufferJordan Hargrave
2010-02-04Optimized failure handing for Read with X/P failuresJordan Hargrave
Does not require additional temporary buffer
2010-01-20Fix collider offsets to correct LBA.Jordan Hargrave
Thanks to Niklas ok @marco