aboutsummaryrefslogtreecommitdiff
path: root/sbin/gvinum/gvinum.c
Commit message (Collapse)AuthorAgeFilesLines
* GEOM: Introduce gctl_add_param() API.Alexander Motin2022-03-071-4/+11
| | | | | | | | | Make gctl_add_param() API public, allowing more precise control over parameter flags. Previously it was impossible to properly declare write-only ASCII parameters, used for result reporting, they were declared as read-write binary instead, that was not nice. MFC after: 1 month
* gvinum: build with WARNS=6Eitan Adler2018-06-161-7/+8
| | | | | | | | | This also removes an unused and uninitialized variable. Tested with amd64, arm64, i386, mips Notes: svn path=/head/; revision=335267
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-1/+3
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* - Sprinkle const and static as appropriate.Marius Strobl2014-05-071-98/+90
| | | | | | | | | | | | - Fix whitespace bugs. - Remove pointless returns in void functions. - Nuke pointless switch cases mirroring the default. MFC after: 3 days Sponsored by: Bally Wulff Games & Entertainment GmbH Notes: svn path=/head/; revision=265535
* - Allow foot shooting with the resetconfig command via the -f option.Marius Strobl2014-05-061-19/+34
| | | | | | | | | | | | - Fix typos preventing -f to actually work with the create command. - Initialize flags to zero rather than using stack garbage when handling the grow command. MFC after: 3 days Sponsored by: Bally Wulff Games & Entertainment GmbH Notes: svn path=/head/; revision=265454
* Allow GEOM_VINUM to be statically compiled into the kernel.Marius Strobl2014-05-021-6/+9
| | | | | | | | Submitted by: gleb MFC after: 3 days Notes: svn path=/head/; revision=265248
* Prevent an unlikely, but real double free issue in gvinum(8).Xin LI2013-10-151-7/+10
| | | | | | | Coverity ID: 1018965 Notes: svn path=/head/; revision=256561
* Fix warning when compiling with gcc46:Eitan Adler2012-01-101-5/+2
| | | | | | | | | | | error: variable 'op' set but not used error: variable 'cmd' set but not used Approved by: dim MFC after: 3 days Notes: svn path=/head/; revision=229915
* - fix duplicate "a a" in some commentsEitan Adler2011-11-131-1/+1
| | | | | | | | | Submitted by: eadler Approved by: simon MFC after: 3 days Notes: svn path=/head/; revision=227489
* * Add the readline(3) API to libedit. The libedit versions ofDavid E. O'Brien2011-04-051-0/+1
| | | | | | | | | | | | | | | | | | | {readline,history}.h are in /usr/include/edit so as to not conflict with the GNU libreadline versions. To use the libedit readline(3) one should add "-I/usr/include/edit" to their Makefile (spelled "-I${DESTDIR}/${INCLUDEDIR}/edit" within the FreeBSD source tree). * Enable its use in the BSD licensed utilities that support readline(3). * To make it easier to sync libedit development with NetBSD, histedit.h is moved into libedit's directory as history shows shown we keep merging it into that location. Obtained from: NetBSD Sponsored by: Juniper Networks Notes: svn path=/head/; revision=220370
* Fix some more warnings found by clang.Rebecca Cran2010-11-221-1/+1
| | | | Notes: svn path=/head/; revision=215704
* Initialize variables before usage.Ulrich Spörlein2010-06-111-0/+1
| | | | | | | | Found by: clang static analyzer Found by: Coverity Prevent[tm] (CID 7736, 7760) Notes: svn path=/head/; revision=209051
* - Make function of finding an available drive name a macro.Ulf Lilleengen2010-03-031-14/+12
| | | | | | | | | | | - Move check of /dev/ prefix and copy into a function to save code duplication. This also fixes a bug where the /dev/ prefix could not be used when creating volumes on the command line. Tested by: Niclas Zeising <niclas.zeising - at - gmail.com> Notes: svn path=/head/; revision=204665
* - Better wording in comment.Ulf Lilleengen2009-04-101-1/+1
| | | | | | | Suggested by: Christoph Mallon <christoph.mallon - at - gmx.de> Notes: svn path=/head/; revision=190891
* - Implement the grow command to make it easier for users to extend plexesUlf Lilleengen2009-04-101-0/+86
| | | | | | | | | without having to understand all gvinum internals. - Document the grow command in the manpage and update examples to use the command where possible. Notes: svn path=/head/; revision=190884
* - Move logic for finding a unique drive name into its own routine for futureUlf Lilleengen2009-04-101-5/+12
| | | | | | | code reuse. Notes: svn path=/head/; revision=190882
* - Move out allocation part of different gvinum objects into its own routine andUlf Lilleengen2009-04-101-2/+1
| | | | | | | make use of it in the gvinum userland code. Notes: svn path=/head/; revision=190881
* Import the gvinum work that have been done during and after Summer of Code 2007.Ulf Lilleengen2009-03-281-67/+460
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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> Notes: svn path=/head/; revision=190507
* Implement the 'resetconfig' command.Lukas Ertl2006-03-231-0/+41
| | | | | | | | PR: kern/94835 Submitted by: Ulf Lilleengen <lulf@stud.ntnu.no> Notes: svn path=/head/; revision=157052
* Fix whitespace issues.Lukas Ertl2005-11-201-8/+8
| | | | | | | Pointed out by: joel@ Notes: svn path=/head/; revision=152631
* Finally bring in what was produced during Google SoC 2005:Lukas Ertl2005-11-191-50/+135
| | | | | | | | | | | | | | | | Add functions to rename objects and to move a subdisk from one drive to another. Add manual page (finally). Bring up-to-date the online help. Obtained from: Chris Jones <chris.jones@ualberta.ca> Sponsored by: Google Summer of Code 2005 MFC in: 1 week Notes: svn path=/head/; revision=152616
* Clean up.Lukas Ertl2005-09-121-198/+106
| | | | | | | | | | Remove unused functions. Reduce indentation level by reverting the logic of the enclosing conditional statement. Notes: svn path=/head/; revision=150044
* Implement 'setstate' to allow setting the state of drives and subdisksLukas Ertl2004-11-261-0/+58
| | | | | | | for debugging and emergency purposes. Notes: svn path=/head/; revision=138112
* Implement checkparity/rebuildparity.Lukas Ertl2004-11-261-0/+88
| | | | Notes: svn path=/head/; revision=138110
* Allow 'create <filename>'.Lukas Ertl2004-08-041-26/+35
| | | | Notes: svn path=/head/; revision=133097
* Add gvinum, the geom_vinum userland tool.Lukas Ertl2004-06-121-0/+758
Notes: svn path=/head/; revision=130391