summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid_raid0.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* No need to rescan chunks in each discipline to find appropriatekrw2016-04-121-11/+1
| | | | | | volume sector size. Determine volume sector size in sr_meta_init(). Pointed out, tweaked and ok jsing@
* Enable creation of softraid volumes using disks with non-512 bytekrw2016-04-041-1/+11
| | | | | | | | | 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.
* A few more daddr_t fixes. Rename 'phys_off' variables to 'offset'krw2015-07-211-15/+15
| | | | | | | | | 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.
* Remove unneeded #include <disklabel.h>.krw2015-07-191-2/+1
| | | | ok jsing@
* Stop adding and subtracting data offset. Just keep to chunk relativekrw2015-07-191-3/+2
| | | | | | | | | 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@
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-2/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* Don't cast int64_t variables to (long long) when using %lld.krw2013-11-211-5/+3
|
* Change a bunch of daddr_t variables that don't (obviously) containkrw2013-11-211-4/+6
| | | | | | 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.
* Fix RAID levels 0, 4, 5, and 6 with partitions larger than 2TB.reyk2013-11-051-2/+3
| | | | | | | | | 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@
* Sprinkle (long long) casts where %lld is being used to print daddr_tkrw2013-11-011-4/+6
| | | | | | variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-111-4/+4
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* Provide a function that handles the scheduling of work units. Thisjsing2013-05-211-9/+3
| | | | | | | simplifies the discipline code, avoids code duplication and moves the scheduling logic into a single location. ok krw@
* Use consistent error handling when validating the number of chunksjsing2013-03-311-2/+3
| | | | provided.
* Provide default resource allocation and free functions. Convert alljsing2013-03-311-38/+1
| | | | disciplines except for AOE and CRYPTO, which require custom handlers.
* Pull the initialisation of runtime values out into a separate initjsing2013-03-311-12/+15
| | | | | | | function, rather than having it spread across create/assemble/alloc. Also handle strip size errors appropriately, rather than failing silently. ok krw@
* Provide a default discipline interrupt handling function and migrate all ofjsing2013-03-301-23/+1
| | | | | | the disciplines that now have the same interrupt code. ok krw@
* sr_alloc_resources() and sr_free_resources() can never be called withoutjsing2013-03-021-7/+1
| | | | a valid struct sr_discipline. Remove redundant NULL pointer checks.
* Unbreak softraid compilation with debug enabled.jsing2013-03-021-2/+2
| | | | Prompted by Dmitry Bogdan.
* Convert softraid RAID 0 to new workunit completion functionsjsing2013-01-181-41/+7
|
* Clean up and rework workunit completion for RAID 0. Ensure that we removejsing2013-01-181-33/+23
| | | | | | | the workunit from the pending queue and restart deferred workunits, even in error conditions. ok krw@
* Convert softraid RAID 0 to the new ccb functions.jsing2013-01-171-63/+15
| | | | ok krw@
* Set resid to zero if the scsi transfer completed without error.jsing2013-01-161-2/+1
| | | | ok krw@
* Always initialise the discipline name, not just when we are doing a create.jsing2013-01-151-2/+2
|
* Keep a function pointer to the per-discipline I/O interrupt handler in thejsing2013-01-151-1/+2
| | | | discipline data structure. To be used with an upcoming diff.
* Provide a mechanism for the kernel to pass data through to the disciplinejsing2012-10-081-3/+3
| | | | during volume assembly.
* Convert softraid(4) to new bio(4) status interface. This allows bioctl(8)jsing2012-01-221-3/+4
| | | | | | 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.
* Provide default set chunk state and set volume state functions whichjsing2011-12-261-111/+1
| | | | | cover the no redundancy/no rebuild case. Use these for the AOE, crypto and RAID 0 disciplines.
* Initialise discipline function pointers with defaults and only overridejsing2011-12-251-11/+4
| | | | those that are needed by a specific discipline.
* Iopoolification. Testing by marco@.krw2011-04-051-4/+1
| | | | ok dlg@ marco@
* Determine the data offset using a variable specified within the softraidjsing2010-07-021-2/+3
| | | | | | | | | | 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@
* make sure that buf's on the stack set the b_bq to NULL.thib2010-07-011-1/+2
| | | | | | one memset -> bzero. ok marco@, jsing@
* Add storage for the boot block and boot loader to the softraid metadata.jsing2010-03-261-3/+2
| | | | | | | | | | | | | 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@
* Zap all setting of ITSDONE in drivers that don't look at it. Nobodykrw2010-01-091-3/+1
| | | | | | | else cares so it's just noise. Drivers that actually look at ITSDONE are unchanged. ok marco@ (for his files) dlg@ beck@
* Factor out discipline specific create/assemble code.jsing2009-12-151-4/+43
| | | | "in, in, in!" marco@
* Define discipline capabilities using a set of flags.jsing2009-12-071-1/+2
| | | | "shiny!!" marco@
* Switch softraid to vnodes to prevent bad things from happening when usingmarco2009-08-091-2/+4
| | | | | | d_open/d_close. tested by many, ok jsing, thib, krw
* Abuse bio layer a little less by marking fake buffers with B_PHYS.marco2009-06-021-2/+2
| | | | | | | From beck with lots of squealing and ear bleeds. Issue originally reported by todd. ok beck
* marco needs to learn how to do his range checks better, found by Parfaitderaadt2009-06-021-2/+2
| | | | ok oga guenther
* Move the discipline initialisation code into discipline specific functions,jsing2009-05-111-2/+36
| | | | | | | | 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@
* Part one of partial bringup volumes. Plenty of rope to kill your datamarco2009-04-281-2/+2
| | | | use with caution...
* Add generic sr_scsi_done function that does the spl dancemarco2008-11-251-3/+3
|
* Remove bogus code from the error path in sr_raid0_rw(); ok marco@miod2008-10-041-2/+1
|
* Full rewrite of metadata handling. This fixes power failures and crashesmarco2008-07-191-33/+30
| | | | | | | | | | | | | | | | 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
* Shave off a few more bytes by moving IO collision detection into a genericmarco2008-02-051-19/+3
| | | | | fucntion. Fix bug in the crypto code that could casuse data corruption as a bonus, bad cut & past tedu!
* Create a generic function to validate IO instead of copying and pastingmarco2008-02-051-44/+3
| | | | | | | | same code in all disciplines. This shaves of a few bytes. crypto 3185 -> 2690 raid 0 2843 -> 2378 raid 1 3474 -> 2689
* Fix some debug printsmarco2008-01-261-5/+7
|
* Create chunk and state transition functions for RAID 0.marco2008-01-241-1/+107
| | | | | | 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.
* Bring softraid into the world of 16 byte commands; this allows for > 2TB disksmarco2008-01-241-1/+3
| | | | Fix bioctl size output which was off by *512; diagnosed by otto
* Oops, make fit in 80 cols.marco2008-01-241-3/+4
|