summaryrefslogtreecommitdiffstats
path: root/sys/geom/vinum
Commit message (Collapse)AuthorAgeFilesLines
* - 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@
* Finally bring in what was produced during Google SoC 2005:le2005-11-196-4/+513
| | | | | | | | | Add functions to rename objects and to move a subdisk from one drive to another. Obtained from: Chris Jones <chris.jones@ualberta.ca> Sponsored by: Google Summer of Code 2005 MFC in: 1 week
* Set the G_PF_WITHER flag on the subdisk provider that is about tole2005-09-081-34/+1
| | | | | be destroyed. That way the GEOM system handles all deallocations and we don't have to do it ourselves.
* Prevent that sync operations can be started when they are alreadyle2005-08-281-71/+81
| | | | | in progress, and be a bit more user friendly in terms of error messages returned from the kernel.
* Shuffle around the order in which the components are compiled.le2005-08-261-14/+4
| | | | | | | | | This way, the VINUMDRIVE class is loaded before the VINUM class, but since geom does the tasting for newly arrived classes last-in-first-out, the VINUM class tastes first. This removes the need to call gv_parse_config() in the drive taste path.
* Correct the check if a plex is accessible in case it is not up.le2005-08-221-1/+1
| | | | This makes degraded RAID5 plexes actually work.
* Make it possible to remove stale, left-over subdisks.le2005-08-162-10/+11
|
* Fix a stupid logic bug introduced in geom_vinum_drive.c rev 1.18:le2005-08-153-1/+9
| | | | | | | When a drive is newly created, it's state is initially set to 'down', so it won't allow saving the config to it (thus it will never know of itself being created). Work around this by adding a new flag, that's also checked when saving the config to a drive.
* *) Implement round-robin reads for multiplex volumes.le2005-07-152-25/+36
| | | | | | *) Plug a possible memory leak. [1] [1] obtained from: pjd@.
* When a drive dies, don't call g_wither_geom() directly, but insteadle2005-05-171-46/+71
| | | | | | | post an event to the geom event queue that will take care of it, letting outstanding bios finish, and closing the consumers. Plus some cosmetic clean ups.
* Only allow RAID5 plexes to be parity checked.le2005-04-281-0/+4
| | | | | PR: kern/80427 Submitty by: Stijn Hoop <stijn@win.tue.nl>
* Remove test for zero sectorsize when tasting. This check doesn'tle2005-03-072-6/+0
| | | | | | seem to be necessary anymore, and it prevents tasting a valid drive when booting with geom_vinum already loaded, since SCSI disks set their sectorsize not until first opening them.
* Don't allow to synchronize a plex that is already sychronizing.le2005-03-041-13/+24
| | | | | | Reset the 'syncing' flag in case of errors, too. Some cosmetics.
* Correctly calculate what to do and how to retry a request to a plex whenle2005-02-232-12/+47
| | | | | | | the previous one failed and there are more than one plex in the volume. This could have led to a flood of error messages on the console and probably a deadlock in certain situations.
* In case of drive errors, don't close the associated consumer andle2005-02-171-10/+2
| | | | | | detach it, but instead let the geom wither away. Bump copyright year.
* Only report state changes of subdisks and plexes when there'sle2005-01-211-2/+14
| | | | | | really a state change. Reword the info a bit.
* Don't initialize error with ENXIO as we might end up here whenle2005-01-211-2/+1
| | | | the plex has no more consumers (e.g. orphaning).
* Rename synchronization and initialization threads and prefix themle2005-01-191-2/+2
| | | | with 'gv_' for consistency.
* Although an object may already be known in the configuration, it'sle2005-01-193-5/+32
| | | | | | | worker thread may have been destroyed (e.g. during orphaning). Make sure that objects get back their worker threads when they get a new geom.
* Reset object flags after killing off an object's worker thread.le2005-01-191-0/+6
|
* /* -> /*- for copyright notices, minor format tweaks as necessaryimp2005-01-065-5/+5
|
* Implement 'setstate' to allow setting the state of drives and subdisksle2004-11-263-5/+82
| | | | for debugging and emergency purposes.
* Implement checkparity/rebuildparity.le2004-11-267-13/+316
|
* Move RAID5 offset calculation into a separate function to avoidle2004-11-151-50/+56
| | | | code duplication.
OpenPOWER on IntegriCloud