summaryrefslogtreecommitdiff
path: root/sys/dev/softraid_raid0.c
AgeCommit message (Collapse)Author
2016-04-12No need to rescan chunks in each discipline to find appropriateKenneth R Westerback
volume sector size. Determine volume sector size in sr_meta_init(). Pointed out, tweaked and ok jsing@
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-19Remove unneeded #include <disklabel.h>.Kenneth R Westerback
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@
2014-11-18move arc4random prototype to systm.h. more appropriate for most codeTed Unangst
to include that than rdnvar.h. ok deraadt dlg
2014-09-14remove uneeded proc.h includesJonathan Gray
ok mpi@ kspillner@
2013-11-21Don't cast int64_t variables to (long long) when using %lld.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-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 a default discipline interrupt handling function and migrate all ofJoel Sing
the disciplines that now have the same interrupt code. 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-03-02Unbreak softraid compilation with debug enabled.Joel Sing
Prompted by Dmitry Bogdan.
2013-01-18Convert softraid RAID 0 to new workunit completion functionsJoel Sing
2013-01-18Clean up and rework workunit completion for RAID 0. Ensure that we removeJoel Sing
the workunit from the pending queue and restart deferred workunits, even in error conditions. ok krw@
2013-01-17Convert softraid RAID 0 to the new ccb functions.Joel Sing
ok krw@
2013-01-16Set resid to zero if the scsi transfer completed without error.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-10-08Provide a mechanism for the kernel to pass data through to the disciplineJoel Sing
during volume assembly.
2012-01-22Convert softraid(4) to new bio(4) status interface. This allows bioctl(8)Joel Sing
to provide useful feedback, rather than reporting an ioctl failure and leaving the user to consult dmesg. For now we continue to print most things to the console, even if the message is a result of an ioctl.
2011-12-26Provide default set chunk state and set volume state functions whichJoel Sing
cover the no redundancy/no rebuild case. Use these for the AOE, crypto and RAID 0 disciplines.
2011-12-25Initialise discipline function pointers with defaults and only overrideJoel Sing
those that are needed by a specific discipline.
2011-04-05Iopoolification. Testing by marco@.Kenneth R Westerback
ok dlg@ marco@
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-01-09Zap all setting of ITSDONE in drivers that don't look at it. NobodyKenneth R Westerback
else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
2009-12-15Factor out discipline specific create/assemble code.Joel Sing
"in, in, in!" marco@
2009-12-07Define discipline capabilities using a set of flags.Joel Sing
"shiny!!" marco@
2009-08-09Switch softraid to vnodes to prevent bad things from happening when usingMarco Peereboom
d_open/d_close. tested by many, ok jsing, thib, krw
2009-06-02Abuse bio layer a little less by marking fake buffers with B_PHYS.Marco Peereboom
From beck with lots of squealing and ear bleeds. Issue originally reported by todd. ok beck
2009-06-02marco needs to learn how to do his range checks better, found by ParfaitTheo de Raadt
ok oga guenther
2009-05-11Move the discipline initialisation code into discipline specific functions,Joel Sing
rather than initialising everything in softraid.c. This makes a discipline more self-contained and reduces the number of function declarations needed in softraidvar.h. ok marco@
2009-04-28Part one of partial bringup volumes. Plenty of rope to kill your dataMarco Peereboom
use with caution...
2008-11-25Add generic sr_scsi_done function that does the spl danceMarco Peereboom
2008-10-04Remove bogus code from the error path in sr_raid0_rw(); ok marco@Miod Vallat
2008-07-19Full rewrite of metadata handling. This fixes power failures and crashesMarco Peereboom
that caused illegal checksums. The new metadata code is more or less ready to deal with other vendor's metadata formats. While here clean up the name space. Fix thib's pool mess by adding removing bad flags in interrupt context. tested on macppc, amd64, i386, sparc64 & hppa sparc64 has issues with crypto however those do not seem to be softraid specific. help from okan@ ckuethe@ Will Backman and others
2008-02-05Shave off a few more bytes by moving IO collision detection into a genericMarco Peereboom
fucntion. Fix bug in the crypto code that could casuse data corruption as a bonus, bad cut & past tedu!
2008-02-05Create a generic function to validate IO instead of copying and pastingMarco Peereboom
same code in all disciplines. This shaves of a few bytes. crypto 3185 -> 2690 raid 0 2843 -> 2378 raid 1 3474 -> 2689
2008-01-26Fix some debug printsMarco Peereboom
2008-01-24Create chunk and state transition functions for RAID 0.Marco Peereboom
Move RAID 1 chunk and state transition functions into proper file. Let Crypto use RAID 1 chunk and state transition functions for now but this needs fixing.
2008-01-24Bring softraid into the world of 16 byte commands; this allows for > 2TB disksMarco Peereboom
Fix bioctl size output which was off by *512; diagnosed by otto
2008-01-24Oops, make fit in 80 cols.Marco Peereboom