aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/vinum
Commit message (Collapse)AuthorAgeFilesLines
...
* format_config: Replace long format lines.Greg Lehey2001-05-221-18/+28
| | | | | | | | | | | | | | | | | Requested by: bde Add retryerrors keyword. vinum_scandisk: Print a different message if an inadvertent start command did not find any additional drives. The previous message "no drives found" confused and worried many people. MFS: vinum_open: Recognize Mylex devices as storage devices. Notes: svn path=/head/; revision=76958
* complete_rqe:Greg Lehey2001-05-221-7/+41
| | | | | | | | | | | | | | | In case of error, check the VF_RETRYERRORS flag in the subdisk and don't take the subdisk down if it's set, just retry the I/O. Requested by: peter If the buffer has been copied (XFR_COPYBUF), release the copied buffer when the I/O completes. Suggested by: alfred Notes: svn path=/head/; revision=76957
* Remove unnecessary declarations of userland functions.Greg Lehey2001-05-221-13/+25
| | | | | | | | | | | | Desired by: bde This commit is the first of a general cleanup of the header files.. It won't be enough to make bde happy. Move debug definitions from vinumhdr.h. Notes: svn path=/head/; revision=76956
* config_sd: Add code to recognize "retryerrors" keyword.Greg Lehey2001-05-221-29/+48
| | | | | | | | | | | | config_plex: Don't create the device until we're finished. parse_config: check for corrupted configuration, thus avoiding a potential panic. remove_sd_entry: Restore structure. Notes: svn path=/head/; revision=76955
* free_vinum: Change some explicit struct member references to the SD,Greg Lehey2001-05-221-13/+23
| | | | | | | PLEX and VOL. Notes: svn path=/head/; revision=76954
* Add xferinfo flag bit for copied buffers.Greg Lehey2001-05-221-2/+16
| | | | | | | | | | Create a new struct rangelockinfo. In revision 1.21 of vinumlock.c, the plex info was removed from struct rangelock, since it wasn't needed there. It *is* needed for trace information, however, so use struct rangelockinfo for that. Notes: svn path=/head/; revision=76953
* New file containing definitions for separate views of objects forGreg Lehey2001-05-221-0/+275
| | | | | | | userland and kernel. Notes: svn path=/head/; revision=76951
* Send the remains (such as I have located) of "block major numbers" toPoul-Henning Kamp2001-03-262-4/+1
| | | | | | | the bit-bucket. Notes: svn path=/head/; revision=74810
* devfs convertion used VINUMRMINOR incorrectly (passing args inAlfred Perlstein2001-03-221-3/+3
| | | | | | | | | backwards order) Submitted by: Bernd Walter <ticso@mail.cicely.de> Notes: svn path=/head/; revision=74669
* By convention, the moduledata is static unless there is a reason for itPeter Wemm2001-03-131-1/+1
| | | | | | | to not be. Notes: svn path=/head/; revision=74199
* Fix vinum for both devfs and non-devfs systems.Alfred Perlstein2001-02-202-4/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | userland tool: Use the vfs.devfs.generation sysctl to test for devfs presense (thanks phk!) when devfs is active it will not try to create the device nodes in /dev and therefore will not complain about the failure to do so. Revert the change in the #define for VINUM_DIR in the kernel header so that vinum can find its device nodes. Replace perror() with vinum_perror() to print file/line when DEVBUG is defined (not defined by default). kernel: Don't use the #define names for the "superdev" creation since they will be prepended by "/dev/" (based on VINUM_DIR), instead use string constants. Create both debug and non-debug "superdev" nodes in the devfs. Problem noticed and fix tested by: Martin Blapp <mblapp@fuchur.lan.attic.ch> Notes: svn path=/head/; revision=72777
* forced commit to note that the last delta also reordered some code inAlfred Perlstein2001-02-201-1/+1
| | | | | | | | | | | | | | remove_sd_entry() to: Simplify (hopefully) it by moving all error returns closer to the beginning of the function. Return an error when "Error removing subdisk %s: not found in plex %s\n" would have been reported, as I doubt that we are "OK" after printing that error message. Notes: svn path=/head/; revision=72769
* Take a shot at making vinum devfs aware.Alfred Perlstein2001-02-204-19/+57
| | | | | | | | | | | | | | | | | | | | Adding make_dev() and destroy_dev() calls in (hopefully) the right places. This is done by calling make_dev() in each object constructor and caching the dev_t's returned from make_dev() in each struct 'subdisk'(sd), 'plex' and 'volume' such that the 'object'_free() functioncs can call destroy dev. This change makes a subset of the old /dev/vinum appear under devfs. Enough nodes appear such that I'm able to mount my striped volume. There may be more work needed to get vinum configuration working properly. Notes: svn path=/head/; revision=72766
* Change and clean the mutex lock interface.Bosko Milekic2001-02-092-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | mtx_enter(lock, type) becomes: mtx_lock(lock) for sleep locks (MTX_DEF-initialized locks) mtx_lock_spin(lock) for spin locks (MTX_SPIN-initialized) similarily, for releasing a lock, we now have: mtx_unlock(lock) for MTX_DEF and mtx_unlock_spin(lock) for MTX_SPIN. We change the caller interface for the two different types of locks because the semantics are entirely different for each case, and this makes it explicitly clear and, at the same time, it rids us of the extra `type' argument. The enter->lock and exit->unlock change has been made with the idea that we're "locking data" and not "entering locked code" in mind. Further, remove all additional "flags" previously passed to the lock acquire/release routines with the exception of two: MTX_QUIET and MTX_NOSWITCH The functionality of these flags is preserved and they can be passed to the lock/unlock routines by calling the corresponding wrappers: mtx_{lock, unlock}_flags(lock, flag(s)) and mtx_{lock, unlock}_spin_flags(lock, flag(s)) for MTX_DEF and MTX_SPIN locks, respectively. Re-inline some lock acq/rel code; in the sleep lock case, we only inline the _obtain_lock()s in order to ensure that the inlined code fits into a cache line. In the spin lock case, we inline recursion and actually only perform a function call if we need to spin. This change has been made with the idea that we generally tend to avoid spin locks and that also the spin locks that we do have and are heavily used (i.e. sched_lock) do recurse, and therefore in an effort to reduce function call overhead for some architectures (such as alpha), we inline recursion for this case. Create a new malloc type for the witness code and retire from using the M_DEV type. The new type is called M_WITNESS and is only declared if WITNESS is enabled. Begin cleaning up some machdep/mutex.h code - specifically updated the "optimized" inlined code in alpha/mutex.h and wrote MTX_LOCK_SPIN and MTX_UNLOCK_SPIN asm macros for the i386/mutex.h as we presently need those. Finally, caught up to the interface changes in all sys code. Contributors: jake, jhb, jasone (in no particular order) Notes: svn path=/head/; revision=72200
* Allocate lock table and mutex not only for parity plexes, but also forGreg Lehey2001-02-021-3/+3
| | | | | | | | | | striped plexes. This prevents various panics introduced in the last rewrite of the locking code. Suffered by: "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk> Notes: svn path=/head/; revision=71922
* - Proc locking around the vinumdaemon dinking with its flags.John Baldwin2001-01-241-1/+6
| | | | | | | - P_INMEM -> PS_INMEM. Notes: svn path=/head/; revision=71550
* Make intr_nesting_level per-process, rather than per-cpu. SetupJake Burkholder2001-01-212-2/+2
| | | | | | | | | | | interrupt threads to run with it always >= 1, so that malloc can detect M_WAITOK from "interrupt" context. This is also necessary in order to context switch from sched_ithd() directly. Reviewed By: peter Notes: svn path=/head/; revision=71337
* Correct check for partition c. Previously the check was for drive 2,Greg Lehey2001-01-201-1/+1
| | | | | | | | | which did not exactly have the desired result. Submitted by: Akira Watanabe <akira@myaw.ei.meisei-u.ac.jp> Notes: svn path=/head/; revision=71291
* struct rangelock: Remove the field 'plex' from the entry. Range locksGreg Lehey2001-01-142-7/+3
| | | | | | | | are accessed only via the plex, so there's never any confusion as to the plex number. This value was, as a result, unused. Notes: svn path=/head/; revision=71012
* format_config: If a subdisk loses its drive (due to a bug which hasGreg Lehey2001-01-141-12/+25
| | | | | | | | | | | | | | | | | | not yet been caught), don't save the config with a null drive name (which causes the drive to be renamed "plex" on the next start), put in the text "*invalid*" instead. This is damage control, not a fix. Experienced by: peter Break some long format strings so that they fit in style(9)-sized lines. Remove some "outdentation". Notes: svn path=/head/; revision=71011
* config_plex: Check that we have specified a plex organization.Greg Lehey2001-01-141-3/+6
| | | | | | | Tripped over by: "Jeroen C. van Gelderen" <jeroen@vangelderen.org> Notes: svn path=/head/; revision=71010
* Reinstate 1.19.Greg Lehey2001-01-101-2/+3
| | | | | | | Prodded by: iedowse Notes: svn path=/head/; revision=70905
* Part of rewrite of RAID-[45] locking code:Greg Lehey2001-01-101-27/+29
| | | | | | | | | | | Rename INITIAL_LOCKS to PLEX_LOCKS, since it now stays a constant. struct plex: Add a mutex lockmtx. Remove alloclocks. Notes: svn path=/head/; revision=70868
* vinumstart: Don't check for B_DONE on return from bre(), it doesn'tGreg Lehey2001-01-101-12/+4
| | | | | | | | | | | | happen any more. abortrequest: don't bufdone the user bp on error, let vinumstart() do it. Based on analysis by: tegge Notes: svn path=/head/; revision=70867
* bre5: don't bufdone the user bp on error, let vinumstart() do it.Greg Lehey2001-01-101-2/+1
| | | | | | | Based on analysis by: tegge Notes: svn path=/head/; revision=70866
* Remove obsolete functions [un]lockplex and [un]lockvol.Greg Lehey2001-01-101-139/+64
| | | | | | | | | | | | | | | | Rewrite lockrange and unlockrange. The lock table is now a fixed size, so there is no possibility for race conditions when expanding. The current size (256 locked ranges) should be large enough that it makes no sense to expand it. To do expansion right would require quiescing the plex (requiring at least 256 I/O completions), and the performance implications are horrendous. Add a mutex per plex for accessing the lock table. Based on analysis by: tegge Notes: svn path=/head/; revision=70865
* Get definition of Malloc right when not using VINUMDEBUGGreg Lehey2001-01-101-1/+1
| | | | | | | Pointed out by: tegge Notes: svn path=/head/; revision=70864
* open_drive: Refuse to open partition c of a disk device.Greg Lehey2001-01-101-5/+9
| | | | | | | | | | | This should eliminate one case of foot shooting . vinum_scandisk: If a drive in the partition table is downed, free it. This duplicates code for the compatibility partition, which for some reason was omitted here. Notes: svn path=/head/; revision=70863
* config_plex: Initialize mutex for parity plexes.Greg Lehey2001-01-101-1/+10
| | | | | | | | | remove_plex_entry: Destroy mutex for parity plexes. Part of rewrite of RAID-[45] locking code. Notes: svn path=/head/; revision=70862
* Use PCPU_GET, PCPU_PTR and PCPU_SET to access all per-cpu variablesJake Burkholder2001-01-102-2/+2
| | | | | | | other then curproc. Notes: svn path=/head/; revision=70861
* Re-commit revision 1.32, which grog incorrectly backed out in revision 1.33.Dag-Erling Smørgrav2000-12-201-4/+6
| | | | Notes: svn path=/head/; revision=70222
* revive_block: Don't go beyond the end of the stripe when revivingGreg Lehey2000-12-201-24/+8
| | | | | | | | | | | | | | | striped plexes. Submitted by: des Don't lock buffers before calls to sdio, sdio does it by itself. Submitted by: tegge parityops: Use correct casts when returning error information. Notes: svn path=/head/; revision=70217
* build_rq_buffer: Note which buffer headers we lock.Greg Lehey2000-12-201-0/+9
| | | | | | | | | sdio: Unlock the buffer if we fail. Submitted by: tegge Notes: svn path=/head/; revision=70216
* Rearrange #includes to make more sense. This is still not the reformGreg Lehey2000-12-201-8/+10
| | | | | | | that bde is waiting to see, but at least it works. Notes: svn path=/head/; revision=70215
* Rename detached plexes and subdisks correctly (off by one error)Greg Lehey2000-12-201-6/+16
| | | | | | | Submitted by: Terry Glanfield <Terry.Glanfield@program-products.co.uk> Notes: svn path=/head/; revision=70214
* open_drive: Add support for more than 32 devices of a particular kind.Greg Lehey2000-12-201-6/+11
| | | | | | | | | | | | | | | Requested by: Bernd Walter <ticso@cicely8.cicely.de> Cor Bosman <cor@xs4all.net> Kai Storbeck <kai@xs4all.net> Joe Greco <jgreco@ns.sol.net> Add support for Compaq SMART-2 RAID (idad) as storage device for Vinum subdisks. Reported by: Aaron Hill <hillaa@hotmail.com> Notes: svn path=/head/; revision=70213
* give_plex_to_volume: Recalculate volume size after attaching.Greg Lehey2000-12-202-5/+14
| | | | | | | Cosmetics. Notes: svn path=/head/; revision=70211
* Add flag XFR_BUFLOCKED to identify buffers which have been locked.Greg Lehey2000-12-201-1/+2
| | | | | | | | | Part of fix to ensure that we unlock buffers we lock. In principle submitted by: tegge Notes: svn path=/head/; revision=70209
* Don't include system-specific header files for userland program.Greg Lehey2000-11-281-4/+4
| | | | | | | Discovered by default by: alfred Notes: svn path=/head/; revision=69293
* Make sure we don't cross stripe boundaries when reviving striped plexes.Dag-Erling Smørgrav2000-11-171-4/+6
| | | | | | | | | | | | This makes crash recovery work for stripe sizes that are not multiples of DEFAULT_REVIVE_BLOCKSIZE (currently 64 kB). While we're here, fix a few cosmetic nits. Reviewed by: grog Sponsored by: Enitel ASA (http://www.enitel.no/) Notes: svn path=/head/; revision=68867
* Get rid of the last traces of ACTUALLY_LKM_NOT_KERNELPoul-Henning Kamp2000-10-231-2/+0
| | | | Notes: svn path=/head/; revision=67460
* Avoid impending world breakage.Bruce Evans2000-10-131-9/+2
| | | | | | | | | | | | | | | 1. Don't include <sys/conf.h> in userland. It is not used, and including it without including its prerequisite <sys/time.h> should have broken the world. 2. Don't include <sys/mount.h>. It is not used, except in -current it bogusly includes <sys/stat.h> which bogusly includes <sys/time.h> and thus accidentally provides the prerequisite in (1). 3. Cleaned up nearby include messes. Not approved by despite 5 weeks notice: MAINTAINER Notes: svn path=/head/; revision=67072
* open_drive:Greg Lehey2000-08-161-16/+21
| | | | | | | | | | | | | | | | Add support for AMD RAID controllers as "disks". Requested-by: Marius Bendiksen <mbendiks@eunet.no> Remove potential panic when attempting to open non-existent drivers. init_drive: Return error codes correctly. Previously it would occasionally return 0. The error was redetected elsewhere, but this was causing a number of confusing error messages. Notes: svn path=/head/; revision=64691
* start_object: Set the revive length correctly.Greg Lehey2000-06-071-3/+3
| | | | Notes: svn path=/head/; revision=61354
* revive_block:Greg Lehey2000-06-071-35/+36
| | | | | | | | | | | | | | | | Fix several instances of breakage in RAID-5 revive code. Tidy up code. parityops: Don't attempt to do anything if the plex is degraded or worse. parityrebuild: Add comments. Perform transfers in correct length. Notes: svn path=/head/; revision=61352
* parity ops: Correctly recognize the end of the plex. Previously weGreg Lehey2000-06-051-1/+1
| | | | | | | | were running off the end and generating worrying but harmless messages about parity errors that wouldn't go away. Notes: svn path=/head/; revision=61270
* parityrebuild: write the parity block back to the correct subdisk.Greg Lehey2000-06-021-2/+2
| | | | | | | | HEADS UP: This fixes a serious data corruption bug when using the userland command 'rebuildparity'. Notes: svn path=/head/; revision=61168
* Remove an incorrect comment, adjust white space.Greg Lehey2000-06-021-2/+1
| | | | Notes: svn path=/head/; revision=61167
* Add 'dumpconfig' keyword.Greg Lehey2000-06-022-1/+3
| | | | Notes: svn path=/head/; revision=61166
* Remove a redundant statement.Greg Lehey2000-06-021-2/+1
| | | | Notes: svn path=/head/; revision=61165