summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid6.c
AgeCommit message (Collapse)Author
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-19Remove unneeded #include <disklabel.h>.Kenneth R Westerback
ok jsing@
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-07-19Stop adding and subtracting data offset. Just keep to chunk relativeKenneth R Westerback
block offsets until actual i/o is constructed and needs the physical offset. Eliminate a number of <<DEV_BSIZE shifts as a bonus. No intentional functional change. Fixed and ok jsing@
2015-05-29Nuke annoying whitespace nits to shrink some future diffs.Kenneth R Westerback
2015-03-14Remove some includes include-what-you-use claims don'tJonathan Gray
have any direct symbols used. Tested for indirect use by compiling amd64/i386/sparc64 kernels. ok tedu@ deraadt@
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2014-07-12add a size argument to free. will be used soon, but for now default to 0.Ted Unangst
after discussions with beck deraadt kettenis.
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@