Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Move the block get/put routines into the common code, instead of having | 2014-01-18 | 1 | -1/+13 | ||
| | | | | RAID 6 borrow them from RAID 5. | |||||
* | Rename softraid RAIDP to softraid RAID5. | 2014-01-18 | 1 | -2/+2 | ||
| | | | | Discussed with krw@ | |||||
* | Remove the RAID 4 discipline from softraid. Anyone sensible would use RAID | 2014-01-18 | 1 | -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; | 2014-01-05 | 1 | -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 and | 2013-11-19 | 1 | -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 we | 2013-11-04 | 1 | -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_t | 2013-11-01 | 1 | -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. | 2013-07-19 | 1 | -2/+2 | ||
| | | | | | | Found by Maxime Villard. ok jsing@ | |||||
* | When an I/O error occurs on a softraid chunk, only take it offline if the | 2013-07-01 | 1 | -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 enough | 2013-06-11 | 1 | -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() - the | 2013-05-21 | 1 | -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 does | 2013-05-21 | 1 | -25/+13 | ||
| | | | | not need to invoke a workq-based callback. | |||||
* | Provide a function that handles the scheduling of work units. This | 2013-05-21 | 1 | -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 of | 2013-05-21 | 1 | -11/+7 | ||
| | | | | the caller having to handle the state changes. | |||||
* | Fix missing work unit state initialisations. | 2013-05-21 | 1 | -1/+2 | ||
| | ||||||
* | Use a state to indicate that a work unit should only be constructed and not | 2013-05-21 | 1 | -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 resulted | 2013-04-26 | 1 | -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. | 2013-04-23 | 1 | -3/+3 | ||
| | ||||||
* | Convert RAID1 to the new work unit completion functions and generic | 2013-04-21 | 1 | -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 the | 2013-03-31 | 1 | -2/+2 | ||
| | | | | attachment. | |||||
* | The return value of sd_free_resources() is never checked and all of the | 2013-03-31 | 1 | -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. | 2013-03-31 | 1 | -3/+3 | ||
| | ||||||
* | Provide default resource allocation and free functions. Convert all | 2013-03-31 | 1 | -3/+29 | ||
| | | | | disciplines except for AOE and CRYPTO, which require custom handlers. | |||||
* | Provide wrappers for scsi_io_get() and scsi_io_put(), that also include | 2013-03-30 | 1 | -10/+21 | ||
| | | | | | | the sd_sync check/wakeup. Remove some unnecessary NULL checks whilst here. ok krw@ | |||||
* | Provide a default discipline interrupt handling function and migrate all of | 2013-03-30 | 1 | -2/+22 | ||
| | | | | | | the disciplines that now have the same interrupt code. ok krw@ | |||||
* | Decouple wakeups on work unit completion from the type of I/O being | 2013-03-29 | 1 | -2/+2 | ||
| | | | | | | performed. ok krw@ | |||||
* | sd_wu_pending is only decremented when scsi_done() or scsi_io_put() are | 2013-03-29 | 1 | -11/+11 | ||
| | | | | | | | | | 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@ | |||||
* | Factor out the code that is used to recreate work units - one copy of the | 2013-03-25 | 1 | -1/+23 | ||
| | | | | | | code is sufficient. ok krw@ | |||||
* | Rename sc_dis to sc_targets, since it is an array of targets that also | 2013-03-10 | 1 | -10/+10 | ||
| | | | | | | happen to be softraid disciplines. ok krw@ | |||||
* | Track attached softraid disciplines via a queue. This prevents the need to | 2013-03-05 | 1 | -135/+100 | ||
| | | | | | | | | scan the sparse SCSI targets array and simplifies code. Disciplines are now also shutdown in reverse attach order, making manually stacked softraid volumes somewhat more practical. ok krw@ | |||||
* | The workunit completion needs to run at IPL_BIO, at least for now. | 2013-01-18 | 1 | -6/+11 | ||
| | ||||||
* | Tweak workunit completion. | 2013-01-18 | 1 | -11/+17 | ||
| | ||||||
* | Implement common workunit completion functions and handle the completion | 2013-01-18 | 1 | -1/+57 | ||
| | | | | | | | via a workq callback. Also provide a discipline specific hook that allows it to optionally handle the final part of the workunit completion. ok krw@ | |||||
* | Reset I/O counters when releasing ccbs. | 2013-01-18 | 1 | -1/+6 | ||
| | | | | ok krw@ | |||||
* | Add a function that handles the completion of a ccb. | 2013-01-16 | 1 | -1/+37 | ||
| | | | | ok krw@ | |||||
* | Set resid to zero if the scsi transfer completed without error. | 2013-01-16 | 1 | -1/+4 | ||
| | | | | ok krw@ | |||||
* | Factor out code used to release ccbs from a workunit. | 2013-01-16 | 1 | -9/+18 | ||
| | | | | ok krw@ | |||||
* | Implement a function that gets and correctly initialises a ccb for I/O, | 2013-01-15 | 1 | -2/+65 | ||
| | | | | | | along with a function that enqueues a ccb on a workunit. ok krw@ | |||||
* | Keep a function pointer to the per-discipline I/O interrupt handler in the | 2013-01-15 | 1 | -1/+2 | ||
| | | | | discipline data structure. To be used with an upcoming diff. | |||||
* | Factor out workunit initialisation code. | 2013-01-15 | 1 | -44/+36 | ||
| | | | | ok krw@ | |||||
* | Provide a mechanism for the kernel to directly pass a mask key through to | 2012-10-09 | 1 | -2/+11 | ||
| | | | | a crypto volume when it is assembling it. | |||||
* | Provide a mechanism for the kernel to pass data through to the discipline | 2012-10-08 | 1 | -6/+8 | ||
| | | | | during volume assembly. | |||||
* | Change handling for volumes that are marked no-auto assemble. If we booted | 2012-10-08 | 1 | -19/+23 | ||
| | | | | | from the given volume ignore the no-auto assemble flag, since the root file system is located on it. | |||||
* | bzero the right variable. | 2012-10-08 | 1 | -2/+2 | ||
| | ||||||
* | Prevent softraid from being used with devices that do not have a sector | 2012-01-30 | 1 | -1/+25 | ||
| | | | | | | size of 512 bytes - any other size is not currently supported. ok krw@ | |||||
* | Only pass bio ioctls through to the softraid bio ioctl handler. Rename the | 2012-01-28 | 1 | -8/+10 | ||
| | | | | | | handler to emphasise that it is for bio ioctls only. Discovered the hard way by dhill@ | |||||
* | Convert softraid(4) to new bio(4) status interface. This allows bioctl(8) | 2012-01-22 | 1 | -130/+119 | ||
| | | | | | | 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. | |||||
* | Disable the softraid disk attach hook on detach. | 2012-01-22 | 1 | -1/+3 | ||
| | ||||||
* | Ensure that the sc_lock is held before the status functions are called. | 2012-01-22 | 1 | -1/+7 | ||
| | ||||||
* | Split sr_uuid_print() into two functions - one that formats and one that | 2012-01-21 | 1 | -10/+25 | ||
| | | | | prints. Also rename sr_uuid_get() to sr_uuid_generate(). |