summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum
Commit message (Collapse)AuthorAgeFilesLines
* Mark all SYSCTL_NODEs static that have no corresponding SYSCTL_DECLs.ed2011-11-071-1/+2
| | | | | | The SYSCTL_NODE macro defines a list that stores all child-elements of that node. If there's no SYSCTL_DECL macro anywhere else, there's no reason why it shouldn't be static.
* Include sys/sbuf.h directly.ae2011-07-114-0/+6
| | | | Reviewed by: pjd
* Prevent non-aligned reading from provider while tasting. Rejectae2011-05-252-0/+10
| | | | | | | providers with unsupported sectorsize. Reported by: Joerg Wunsch MFC after: 1 week
* - Check flag with the bitwise operator, not the logical operator.lulf2010-10-012-4/+4
| | | | | Submitted by: arundel MFC after: 1 week
* - Don't return EAGAIN from gv_unload(). It was used to work around thejh2010-05-104-5/+20
| | | | | | | | | | | deadlock fixed in r207671. - Wait for worker process to exit at class unload. The worker process was not guaranteed to exit before the linker unloaded the module. - Use 0 as the worker process exit status instead of ENXIO and style the NOTREACHED comment. Reviewed by: lulf X-MFC after: r207671
* - Remove obsolete flags.lulf2010-05-081-6/+0
| | | | MFC after: 1 week
* - Set missing flag when initiating a plex rebuild with the rebuildparitylulf2010-03-081-0/+15
| | | | | | command. - Check if plex is already syncing or rebuilding before initiating a parity rebuild or check.
* Remove some pointless variable assignments.trasz2010-01-252-4/+1
| | | | Found with: clang
* - Improve error message consistency and wording.lulf2009-10-056-21/+21
|
* - Fix the issue with read access count modification on RAID-5 plexes properly.lulf2009-07-181-4/+6
| | | | | | | | | If the access counts were not increased and decreased in equal numbers by gvinum consumers, the read access count would be inconsistent with the write access count. Instead, modify the read access count with the write access count directly to prevent any inconsistencies. Approved by: re (kib)
* Place hostnames and similar information fully under the prison system.jamie2009-05-292-5/+2
| | | | | | | | | | | | | | | | | The system hostname is now stored in prison0, and the global variable "hostname" has been removed, as has the hostname_mtx mutex. Jails may have their own host information, or they may inherit it from the parent/system. The proper way to read the hostname is via getcredhostname(), which will copy either the hostname associated with the passed cred, or the system hostname if you pass NULL. The system hostname can still be accessed directly (and without locking) at prison0.pr_host, but that should be avoided where possible. The "similar information" referred to is domainname, hostid, and hostuuid, which have also become prison parameters and had their associated global variables removed. Approved by: bz (mentor)
* - Split up the BIO queue into a queue for new and one for completed requests.lulf2009-05-065-86/+98
| | | | | | | | | | | | | | | | | | | | This is necessary for two reasons: 1) In order to avoid collisions with the use of a BIOs flags set by a consumer or a provider 2) Because GV_BIO_DONE was used to mark a BIO as done, not enough flags was available, so the consumer flags of a BIO had to be misused in order to support enough flags. The new queue makes it possible to recycle the GV_BIO_DONE flag into GV_BIO_GROW. As a consequence, gvinum will now work with any other GEOM class under it or on top of it. - Use bio_pflags for storing internal flags on downgoing BIOs, as the requests appear to come from a consumer of a gvinum volume. Use bio_cflags only for cloned BIOs. - Move gv_post_bio to be used internally for maintenance requests. - Remove some cases where flags where set without need. PR: kern/133604
* - Fix a case where a RAID5 volume would think that it is supposed to grow a newlulf2009-05-061-2/+1
| | | | subdisk after a parity rebuild.
* - Check if any plexes are doing internal maintenance before removing them.lulf2009-05-061-0/+7
|
* - Add forgotten KASSERT.lulf2009-05-061-0/+1
|
* - Fix a bug where the bio_data field of the wrong BIO is freed if an errorlulf2009-05-061-1/+1
| | | | occurs when doing a RAID5 request.
* - GV_BIO_RETRY is not used, and it is actually impossible with more than 8lulf2009-05-061-1/+0
| | | | values for bio_cflags/bio_pflags.
* - Split the queue mutex into one for the event queue and one for the BIO queue,lulf2009-05-065-39/+60
| | | | | | | as they do not really relate and to prepare for an additional queue to be covered by the BIO queue mutex. - Implement wrappers for fetching the next element from the event queue as well as for putting a new element into the BIO queue.
* - Make the gvinum softc invisible to userland, as it is not needed.lulf2009-05-041-5/+1
|
* - Remove assertion of topology lock remaining from 7.x gvinum. It is not needed,lulf2009-04-182-4/+2
| | | | | | as the renaming only changes internal gvinum names and will not alter the geom topology. - The topology lock was not held when calling g_wither_geom after renaming.
* - Move out allocation part of different gvinum objects into its own routine andlulf2009-04-102-28/+76
| | | | make use of it in the gvinum userland code.
* - Add files that should have been added in r190507.lulf2009-03-282-0/+831
|
* Import the gvinum work that have been done during and after Summer of Code 2007.lulf2009-03-2817-3371/+3402
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The work have been under testing and fixing since then, and it is mature enough to be put into HEAD for further testing. A lot have changed in this time, and here are the most important: - Gvinum now uses one single workerthread instead of one thread for each volume and each plex. The reason for this is that the previous scheme was very complex, and was the cause of many of the bugs discovered in gvinum. Instead, gvinum now uses one worker thread with an event queue, quite similar to what used in gmirror. - The rebuild/grow/initialize/parity check routines no longer runs in separate threads, but are run as regular I/O requests with special flags. This made it easier to support mounted growing and parity rebuild. - Support for growing striped and raid5-plexes, meaning that one can extend the volumes for these plex types in addition to the concat type. Also works while the volume is mounted. - Implementation of many of the missing commands from the old vinum: attach/detach, start (was partially implemented), stop (was partially implemented), concat, mirror, stripe, raid5 (shortcuts for creating volumes with one plex of these organizations). - The parity check and rebuild no longer goes between userland/kernel, meaning that the gvinum command will not stay and wait forever for the rebuild to finish. You can instead watch the status with the list command. - Many problems with gvinum have been reported since 5.x, and some has been hard to fix due to the complicated architecture. Hopefully, it should be more stable and better handle edge cases that previously made gvinum crash. - Failed drives no longer disappears entirely, but now leave behind a dummy drive that makes sure the original state is not forgotten in case the system is rebooted between drive failures/swaps. - Update manpage to reflect new commands and extend it with some examples. Sponsored by: Google Summer of Code 2007 Mentored by: le Tested by: Rick C. Petty <rick-freebsd2008 -at- kiwi-computer.com>
* - Fix an issue with access permissions to underlying disks used by a gvinumlulf2008-12-271-0/+10
| | | | | | | | plex. If the plex is a raid5 plex, and is being written to, parity data might have to be read from the underlying disks, requiring them to be opened for reading as well as writing. MFC after: 1 week
* - Fix a potential NULL pointer reference. Note that this cannot happen inlulf2008-11-255-6/+51
| | | | | | | | practice, but it is a good programming practice nontheless and it allows the kernel to not depend on userland correctness. Found with: Coverity Prevent(tm) CID: 655-659, 664-667
* - Import macros used in gmirror for printing gvinum debug messages and makinglulf2008-10-2610-72/+94
| | | | | | the output more standardized. - Add a sysctl to set the verbosity of the debug messages. - While there, fixup typos and wording in the messages.
* - Use the new gv_write_header function to write out the header when removing alulf2008-10-021-1/+1
| | | | drive to make sure that the header is in the correct format.
* - Remove unneeded macro since the config_length field in the header was changedlulf2008-10-021-5/+0
| | | | to 64 bit in the new format.
* - Make gvinum header on-disk structure consistent on all platforms by storinglulf2008-10-013-8/+232
| | | | | | | | | | | the gvinum header in fields of fixed size and in a big endian byte order rather than the size and byte order of the actual platform. Note that the change is backwards compatible with the old gvinum configuration format, but will save the configuration in the new format when the 'saveconfig' command is executed. Submitted by: Rick C. Petty <rick-freebsd -at- kiwi-computer.com>
* Commit step 1 of the vimage project, (network stack)bz2008-08-171-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | virtualization work done by Marko Zec (zec@). This is the first in a series of commits over the course of the next few weeks. Mark all uses of global variables to be virtualized with a V_ prefix. Use macros to map them back to their global names for now, so this is a NOP change only. We hope to have caught at least 85-90% of what is needed so we do not invalidate a lot of outstanding patches again. Obtained from: //depot/projects/vimage-commit2/... Reviewed by: brooks, des, ed, mav, julian, jamie, kris, rwatson, zec, ... (various people I forgot, different versions) md5 (with a bit of help) Sponsored by: NLnet Foundation, The FreeBSD Foundation X-MFC after: never V_Commit_Message_Reviewed_By: more people than the patch
* - When renaming a drive, also set the drive name in the gvinum header.lulf2008-07-191-0/+1
| | | | | | PR: kern/125632 Approved by: pjd (mentor) MFC after: 3 days
* - Fix a logic error when updating plex configuration.lulf2008-07-111-1/+2
| | | | Approved by: pjd (mentor)
* Introduce a new lock, hostname_mtx, and use it to synchronize accessrwatson2008-07-051-0/+2
| | | | | | | | | | | | to global hostname and domainname variables. Where necessary, copy to or from a stack-local buffer before performing copyin() or copyout(). A few uses, such as in cd9660 and daemon_saver, remain under-synchronized and will require further updates. Correct a bug in which a failed copyin() of domainname would leave domainname potentially corrupted. MFC after: 3 weeks
* - Recognize the 'volume' parameter when creating a plex.lulf2008-05-221-1/+2
| | | | | | PR: kern/75632 Approved by: pjd (mentor) MFC after: 1 day
* - Fix a memory leak when re-discovering a gvinum configuration.lulf2008-03-181-0/+2
| | | | | Approved by: pjd (mentor) MFC after: 1 week
* Rename the kthread_xxx (e.g. kthread_create()) callsjulian2007-10-204-18/+18
| | | | | | | | | | | to kproc_xxx as they actually make whole processes. Thos makes way for us to add REAL kthread_create() and friends that actually make theads. it turns out that most of these calls actually end up being moved back to the thread version when it's added. but we need to make this cosmetic change first. I'd LOVE to do this rename in 7.0 so that we can eventually MFC the new kthread_xxx() calls.
* -) Correct sdcount for a plex when removing or adding subdisks.le2007-04-123-3/+93
| | | | | | -) Set correct sizes for plexes and volumes a subdisk has been removed. Submitted by: Ulf Lilleengen <lulf_AT_freebsd.org>
* Avoid infinite loop if the device string given for a drivele2007-04-121-6/+3
| | | | | | only consists of "/". Submitted by: Ulf Lilleengen <lulf_AT_freebsd.org>
* while (0); -> while (0) in multi-line macrosimp2006-08-171-1/+1
|
* Protect from creating striped and RAID5 plexes with unequally sizedle2006-03-305-68/+112
| | | | subdisks.
* Fix whitespace.le2006-03-231-1/+1
|
* Implement the 'resetconfig' command.le2006-03-233-0/+43
| | | | | PR: kern/94835 Submitted by: Ulf Lilleengen <lulf@stud.ntnu.no>
* Catch the case when a subdisk has no provider or no consumerle2006-02-081-9/+12
| | | | attached to it.
* Get rid of the gv_bioq hack in most parts of the I/O path andle2006-01-065-81/+89
| | | | use the standard bioq structures.
* Don't pass error value pointer to g_read_data(9) at all if we don'tsobomax2005-11-301-3/+3
| | | | | | have any use of it. Suggested by: pjd
* Check for g_read_data(9) errors properly:sobomax2005-11-301-1/+1
| | | | | | | | | | o The only indication of error condition is NULL value returned by the function; o value pointed to by error argument is undefined in the case when operation completes successfully. Discussed with: phk
* Since we want a vinum geom created anytime the module loads, movele2005-11-242-136/+27
| | | | | | | | | | | the geom creation to a seperate init function and ignore the tasting. The config is now parsed only in the vinumdrive geom, which hopefully fixes the problem, that the drive class tasted before the vinum class had a chance, for good. Also restore the behaviour that the module can be loaded at boot time and on a running system.
* Whitespace.le2005-11-201-8/+8
|
* Always declare variables at the start of the function.le2005-11-201-47/+110
| | | | | | | | | Don't allocate potentially large variables on the stack. Check strsep() return values when the string comes from userland. Shorten variable names for lucidity's sake. most of the stuff: Pointed out by: njl@
* Fix whitespace issue.le2005-11-201-11/+11
| | | | Pointed out by: joel@
OpenPOWER on IntegriCloud