summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* move arc4random prototype to systm.h. more appropriate for most codetedu2014-11-181-2/+1
| | | | to include that than rdnvar.h. ok deraadt dlg
* muliply to get correct size for free. reported by kspillnertedu2014-10-301-2/+2
|
* add some sizes to free()tedu2014-10-301-17/+11
|
* remove preliminary AOE (ata over ethernet) support. not finished aftertedu2014-10-071-16/+1
| | | | | many years and wide spread demand for support never materialized. time to pack it in.
* remove uneeded proc.h includesjsg2014-09-141-2/+1
| | | | ok mpi@ kspillner@
* Replace all queue *_END macro calls except CIRCLEQ_END with NULL.doug2014-09-131-12/+11
| | | | | | | | CIRCLEQ_* is deprecated and not called in the tree. The other queue types have *_END macros which were added for symmetry with CIRCLEQ_END. They are defined as NULL. There's no reason to keep the other *_END macro calls. ok millert@
* When attempting to rebuild a softraid volume, use the actual data offsetjsing2014-08-011-2/+2
| | | | | | | | | | | from the volume metadata rather than the currently defined data offset. This allows rebuilds to work correctly when the volume metadata has a different data offset to that currently in use (for example, volumes created prior to softraid gaining boot support). Found the hard way by henning@ ok deraadt@
* spacing glitchesderaadt2014-07-201-5/+4
|
* Support hibernating to softraid crypto volumes.mlarkin2014-07-201-1/+163
| | | | much help and ok from deraadt@
* Some reallocarray() use; review Jean-Philippe Ouellet, patrick keshishianderaadt2014-07-131-6/+7
| | | | ok tedu
* add a size argument to free. will be used soon, but for now default to 0.tedu2014-07-121-38/+38
| | | | after discussions with beck deraadt kettenis.
* essentially mechanical conversion of softraid rebuild fromblambert2014-07-121-1/+3
| | | | | | workq to taskq ok jsing@
* Stop using a shutdown hook for softraid(4) and explicitly shutdownmpi2014-07-101-16/+12
| | | | | | | | | | | | | | | | | | | 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@
* Add some debug messages to the rebuild process and fix a bogus comment.jsing2014-01-221-3/+16
|
* Add a debug flag for rebuild.jsing2014-01-221-1/+2
|
* Make rebuild a discipline specific function pointer. For now, this defaultsjsing2014-01-221-5/+14
| | | | | | to the existing rebuild code. ok krw@
* The sr_rebuild function does not actually do the rebuild, it only startsjsing2014-01-221-5/+5
| | | | | | the rebuild thread. Rename it to sr_rebuild_start to make this clearer. ok krw@
* Move sr_dump from the RAID5 code into shared code. Rename it tojsing2014-01-221-1/+21
| | | | sr_dump_block and place it under the debug define in the process.
* Switch metadata saves from the system workq to the system taskq.jsing2014-01-221-3/+4
| | | | ok dlg@
* Actually use the correct TAILQ field.jsing2014-01-211-2/+2
|
* Allow for variable sized work units.jsing2014-01-211-5/+4
| | | | ok krw@
* Use a TAILQ for tracking work units, rather than an array. This will allowjsing2014-01-211-15/+10
| | | | | | for variable size work units. While here, remove some pointless checks. ok krw@
* Stop bzeroing the work unit when it is initialised. Rather, only initialisejsing2014-01-211-5/+9
| | | | | | | | the specific fields that are either not persistent for the life of the workunit and/or not reinitialised in sr_wu_release_ccbs. This is also necessary for upcoming changes. ok krw@
* Convert the softraid work unit workqs to taskqs.jsing2014-01-201-8/+9
| | | | ok dlg@
* Replace dedicated swu_fake variable with a work unit flag.jsing2014-01-201-3/+3
| | | | ok krw@
* Assert that a workunit has ccbs if it is being scheduled. Otherwise wejsing2014-01-191-1/+3
| | | | | | | deadlock since nothing will ever come back to tell us that the workunit is completed. ok krw@
* Move the block get/put routines into the common code, instead of havingjsing2014-01-181-1/+13
| | | | RAID 6 borrow them from RAID 5.
* Rename softraid RAIDP to softraid RAID5.jsing2014-01-181-2/+2
| | | | Discussed with krw@
* Remove the RAID 4 discipline from softraid. Anyone sensible would use RAIDjsing2014-01-181-4/+1
| | | | | | 5 instead of RAID 4, assuming both were functional. Discussed with krw@
* On some architectures you can get away with using an uninitialised mutex;jsing2014-01-051-2/+2
| | | | | | | this is not the case on hppa (practically the only architecture where unlocked has a non-zero value). This one has been hiding since r1.223... Found the hard way by juanfra@
* Print daddr_t's with %lld, size_t's with %zu, int's with %d andkrw2013-11-191-18/+21
| | | | | | | | | u_int32_t's with %u. Translate DL_GETPSIZE() results to 512-byte-block values with DL_SECTOBLK(). ok jsing@
* substantial namespace cleanup. Might go a little bit too far, but wederaadt2013-11-041-1/+2
| | | | | can expose some of the kernel structures with split .h files if need be. Discussed with various, including jsing.
* Sprinkle (long long) casts where %lld is being used to print daddr_tkrw2013-11-011-8/+10
| | | | | | variables. Some random whitespace/knf repairs encountered on the way. ok miod@ on inspection, feedback & more suggestions from millert@
* Don't use uninitialized variable when a simple 0 will do.krw2013-07-191-2/+2
| | | | | | Found by Maxime Villard. ok jsing@
* When an I/O error occurs on a softraid chunk, only take it offline if thejsing2013-07-011-3/+5
| | | | | | | | discipline supports redundancy. In the non-redundant case, there is little to gain my failing the chunk, in fact it just makes any form of data recovery significantly harder. ok krw@ todd@
* final removal of daddr64_t. daddr_t has been 64 bit for a long enoughderaadt2013-06-111-16/+16
| | | | | test period; i think 3 years ago the last bugs fell out. ok otto beck others
* Ensure that sc_lock is held when calling sr_meta_native_bootprobe() - thejsing2013-05-211-2/+6
| | | | | | softraid status functions will complain otherwise. Found the hard way by ajacoutot@
* sr_raid_startwu() is no longer called from interrupt context, hence doesjsing2013-05-211-25/+13
| | | | not need to invoke a workq-based callback.
* Provide a function that handles the scheduling of work units. Thisjsing2013-05-211-42/+58
| | | | | | | simplifies the discipline code, avoids code duplication and moves the scheduling logic into a single location. ok krw@
* Make the sr_raid_startwu() function handle deferred work units, instead ofjsing2013-05-211-11/+7
| | | | the caller having to handle the state changes.
* Fix missing work unit state initialisations.jsing2013-05-211-1/+2
|
* Use a state to indicate that a work unit should only be constructed and notjsing2013-05-211-1/+3
| | | | scheduled, rather than trying to imply this from the rebuild flag.
* Add a SR_WUF_DISCIPLINE flag that identifies work units that have resultedjsing2013-04-261-5/+16
| | | | | from discipline specific I/O. Such work units are not associated with a SCSI xfer and are returned via sr_wu_put() on completion.
* Rename ccb_flag to ccb_flags.jsing2013-04-231-3/+3
|
* Convert RAID1 to the new work unit completion functions and genericjsing2013-04-211-9/+23
| | | | | | | | | 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@
* Use the discipline name instead of the product string when reporting thejsing2013-03-311-2/+2
| | | | attachment.
* The return value of sd_free_resources() is never checked and all of thejsing2013-03-311-5/+3
| | | | | implementations only ever returned zero. Change the return value from int to void instead of pretending it might mean something.
* Fix compilation with debug.jsing2013-03-311-3/+3
|
* Provide default resource allocation and free functions. Convert alljsing2013-03-311-3/+29
| | | | disciplines except for AOE and CRYPTO, which require custom handlers.
* Provide wrappers for scsi_io_get() and scsi_io_put(), that also includejsing2013-03-301-10/+21
| | | | | | the sd_sync check/wakeup. Remove some unnecessary NULL checks whilst here. ok krw@