summaryrefslogtreecommitdiffstats
path: root/sys/dev/vinum/vinumvar.h
Commit message (Collapse)AuthorAgeFilesLines
* Remove unused vinum files.phk2004-11-041-395/+0
|
* When doing round-robin reads from a multi-plex volume, only switch to thele2004-03-191-0/+7
| | | | | | | next plex if the sector to be read isn't nearby the last read sector. Submitted by: Vsevolod Lobko <seva@ip.net.ua> via ru@ Approved by: grog (mentor)
* Fix vinums cdevsw{} to initialize d_version.phk2004-02-231-2/+0
| | | | | | | | The nonstandard formatting made my mega-patch scripts miss it. Retire the static major number while we're here anyway. Reported by: Niels Chr. Bank-Pedersen <ncbp@bank-pedersen.dk>
* Remove some more 'makedev' related macros.le2004-02-161-10/+0
| | | | Approved by: grog (mentor)
* Revert last commit. It built the kernel module just fine, but brokegrog2003-09-291-0/+10
| | | | | | | world in /sbin. Reported by: erwin Pointy hat to: grog
* Remove calls to makedev. They were never needed.grog2003-09-291-11/+1
| | | | | Requested by: phk Explained by: rwatson
* Change the way the plex lock mutexes work. Previously they were partgrog2003-05-231-16/+29
| | | | | | | | | | | of the struct plex, which tore apart the mutex linked lists when the plex table was expanded. Now we maintain a pool of mutexes (currently 32) to be shared by all plexes. This is still a lot better than the splhigh() method used in other architectures. expand_table: Add parameters file and line if we're debugging. Approved by: re (jhb)
* Rewrite minor number decoding. Now we have only three types ofgrog2003-05-011-111/+52
| | | | | | | object: subdisks, plexes and volumes. The encoding for plexes and subdisks no longer reflects the object to which they belong. The super devices are high-order volume numbers. This gives vastly more potential volumes (4 million instead of 256).
* Add missing includes of sys/lock.h.jhb2001-10-111-0/+1
|
* Move objflags from vinumvar.h to vinumobj.h in preparation forgrog2001-05-231-45/+1
| | | | | | | requiring fewer header files for userland programs. Remove the gross debug device/non-debug device hack used to recognize whether the kernel module was in sync with the userland module.
* Add a field 'version' to vinum_conf. This field is a constant whichgrog2001-05-221-191/+30
| | | | | | | | | | | | | gets incremented every time the kernel-userland interface changes. This enables vinum(8) to check for the correct kernel version and to produce a useful message if it doesn't match. Requested by: Too many to count. Move the definitions of struct drive, sd, plex and volume to vinumobj.h. Add a new debug flag, DEBUG_LOCKREQS, which logs only lock requests.
* Send the remains (such as I have located) of "block major numbers" tophk2001-03-261-3/+0
| | | | the bit-bucket.
* Fix vinum for both devfs and non-devfs systems.alfred2001-02-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Take a shot at making vinum devfs aware.alfred2001-02-201-2/+5
| | | | | | | | | | | | | | | | | 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.
* struct rangelock: Remove the field 'plex' from the entry. Range locksgrog2001-01-141-2/+1
| | | | | are accessed only via the plex, so there's never any confusion as to the plex number. This value was, as a result, unused.
* Part of rewrite of RAID-[45] locking code:grog2001-01-101-27/+29
| | | | | | | | Rename INITIAL_LOCKS to PLEX_LOCKS, since it now stays a constant. struct plex: Add a mutex lockmtx. Remove alloclocks.
* Allow revive block sizes up to MAXPHYS.grog2000-05-111-4/+4
| | | | Change struct plex to reflect changes to parity maintenance functions.
* Increase the initial size of a RAID-5 plex lock table to 256 entries,grog2000-05-041-2/+2
| | | | | | | | | which seems to correspond better with what a busy plex needs. This may also help us avoid race conditions when expanding the table which may have been contributing to the random corruption, panics and hangs we've been seeing in RAID-5 plexes, particularly with ata drives. Eagerly-awaited-by: sos
* Set default revive block size to 64 kB.grog2000-03-011-1/+2
| | | | Implicitly-sanctioned-by: jkh
* Replace the preprocessor variable names BDEV_MAJOR and CDEV_MAJOR withgrog2000-02-291-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | VINUM_BDEV_MAJOR and VINUM_CDEV_MAJOR respectively. Set DRIVE_MAXACTIVE and VINUM_MAXACTIVE to 30000, effectively disabling the request limitation code. This code was added as an attempt to escape from a bug which seems to have gone away, and it's very likely I'll remove the code Real Soon Now, but I don't want to do it just yet. struct drive: Remove references to vnode pointers, including debug output. Vinum now talks directly to the device driver. Instead, add a dev_t. enum plexorg: Add an instance for RAID-4. Change checks for striped or RAID-5 plexes to a macro 'isstriped', which now also includes RAID-4. Change checks for RAID-5 plexes to a macro 'isparity', which now also includes RAID-4. Approved-by: jkh
* Explicitly type large scalar parameters to avoid compilation warningsgrog2000-01-051-19/+10
| | | | | | | | | | | on alpha. Submitted-by: Bernd Walter <ticso@cicely.de> struct sd: Add a field for the pid of the reviver when the subdisk is reviving. Replace block device macros with generalized device macros.
* Change #ifdef KERNEL to #ifdef _KERNEL in the public headers. "KERNEL"peter1999-12-291-1/+1
| | | | | | is an application space macro and the applications are supposed to be free to use it as they please (but cannot). This is consistant with the other BSD's who made this change quite some time ago. More commits to come.
* Change default revive block size to 60 kB (was 64 kB), and set agrog1999-10-131-2/+16
| | | | | | | | | | | | maximum of 64 kB. vinum_conf, struct drive: add fields for the current number of active requests and the maximum ever active. struct sd: Add fields for initialize progress. struct mc: set the size of saved file names to MCFILENAMELEN instead of the previous explicit constant.
* struct plex: Add variables checkblock and rebuildblock to keep trackgrog1999-09-281-1/+8
| | | | | | | of parity check and rebuild operations. This enables us to stop the operation and restart at a later time. enum parityop: Trivial enum to decide what parityops() is going to do.
* Initialize the si_bsize fields of the new dev structure. This fixesgrog1999-08-291-0/+1
| | | | | | | | | | | | | | some swapper problems analogous to those experienced with ccd. This fix is a kludge: since we currently don't track the "sector size" in a volume label, we guess a worst case (4 kB, as used by vnode devices). If the concept of sector size is here to stay, I'll make some changes to track the "sector size" of a volume. This will probably be the maximum of the sector sizes of all component drives, but things could get ugly if we start allowing non-standard sector sizes such as 524 bytes. Unkludged-version-submitted-by: phk
* $Id$ -> $FreeBSD$peter1999-08-281-1/+1
|
* Add 'initialized' state for subdisks. After initializing, the subdiskgrog1999-08-151-18/+19
| | | | | | | | | | | goes into initialized state, not 'up'. This makes it easier to ensure consistency in multi-plex volumes. update_plex_state: redo transitions from empty and initialized subdisks to up or reviving, depending on the number of plexes. Reported-by: Bernd Walter <ticso@cicely.de> Remy Nonnenmacher <remy@synx.com>
* Tidy up comments.grog1999-08-141-18/+42
| | | | | | | | Add definitions for VINUM_BLOCK_PLEX and VINUM_CHAR_PLEX. struct plex: add lock-related variables. struct rangelock: add variables.
* Import RAID-5 code.grog1999-08-071-3/+26
| | | | | | | | | | | Add Cybernet copyright. OK'd-by: Chuck Jacobus <chuck@cybernet.com> Define VINUM_BLOCK_SD and VINUM_CHAR_SD macros to create raw subdisk device numbers. Add VF_HOTSPARE flag.
* Modify device numbering method to work with latest -CURRENT. Briefly,grog1999-07-221-6/+6
| | | | | | | | | the device numbers are now minor number only, so that we can still compare them after dev_t has turned into a blob. Broken-by: dev_t changes Reported-by: Vallo Kallaste <vallo@matti.ee> "Niels Chr. Bank-Pedersen" <ncbp@bank-pedersen.dk>
* Change the type of the freelist sectors variable to u_int64_t ingrog1999-07-021-2/+2
| | | | order to ensure that initializers will be of correct type.
* Add some comments about the VINUMMINOR macro, which is not for humangrog1999-06-221-1/+6
| | | | consumption.
* Modify to work with new style dev_t.grog1999-05-151-26/+23
| | | | | With_copious_input_from: peter phk
* Remove some dead variables.grog1999-05-021-3/+1
| | | | Change DEBUG_EXITFREE to DEBUG_WARNINGS.
* struct drive: add fields for debugging lockdrive deadlocks.grog1999-04-101-0/+4
|
* Add debug flag DEBUG_EXITFREE to log problems freeing memory on exit.grog1999-04-051-0/+1
|
* Add flag VF_CREATEDgrog1999-03-301-0/+1
|
* Add definition LongJmp for longjmp if -DVINUMDEBUG.grog1999-03-281-6/+9
| | | | Change some comment texts
* Add flag VF_FORCECONFIG for use by the config_drive and friends.grog1999-03-231-1/+1
|
* Define two superdevices for vinum(8), depending on whether they aregrog1999-03-191-3/+27
| | | | | | | | | | compiled with or without debugging support. This enables us to catch (fatal) mismatches between the kernel and userland. Coalesce flags VINUM_DISKCONFIG and VINUM_READING_CONFIG. They did essentially the same thing. Add VINUM_BIGDRIVE for pretending we have macho hardware.
* Remove opencount from vinum_conf and struct vol, and disk index fromgrog1999-03-131-7/+4
| | | | | | | | struct vol. Add time to struct mc, remove KVA crud. Add debug flags DEBUG_EOFINFO and DEBUG_MEMFREE.
* Correct some diagramsgrog1999-03-021-8/+10
| | | | | | Remove pid field from struct sd, struct plex and struct volume Add flags VF_STOPPING, VF_OPEN and VF_DAEMONOPEN
* Change multiline comments to start with a lone /* and end with a */,grog1999-01-291-30/+52
| | | | | | apparently in accordance with style(9). Complained-about-by: bde
* Include Peter Wemm's renaming and restructuringgrog1999-01-211-47/+59
| | | | | | | | | | | | | | | | | | | | | | | | Change from lkm to kld Add field plexsdno to sd struct Add flag VF_NEWBORN to drive, sd, plex and volume structs, indicating that the object has just been created. Add object types for raw (unattached) plexes and subdisks Remove definitions of VOLNO, PLEXNO and SDNO (now functions Volno, Plexno and Sdno) Move revive parameters from struct plex to struct sd. struct plex: maintain a count of the number of inaccessible subdisks. remove defective and unmapped regions. Debug flags: make an enum (previously #define) Set default revive block size to 64kB (was 32 kB)
* Some relatively minor tweaks to enable vinum to be built into a staticpeter1998-12-281-4/+4
| | | | | | | | | | | | | | | | kernel as a pseudo-device. The changes were: - #ifdef DEBUG -> #ifdef VINUMDEBUG - opt_vinum.h for holding above config variable - Fixing up a few stray problems where DEBUG wasn't optional. - config.c -> vinumconfig.c (there's already a config.o) - Other *.c -> vinum*.c (wasn't strictly necessary, but done in case we end up with something else conflicting later on and we might have to have yet more repository copies of files). - include file paths fixups.. (ie: get them all from the kernel tree instead of partly from the kernel and partly from /usr/include/machine) I've spoken with Greg about this.. I hope this doesn't mess him around too much..
* If I've done this right, revive the vinum code in it's now home after itpeter1998-12-281-0/+516
| | | | was savaged in the blood bath a few hours ago.
* Remove LKM's depricated by modules.sos1998-12-271-516/+0
|
* Change some numeric #defines to enumsgrog1998-11-021-12/+11
|
* config.c:grog1998-10-211-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config_drive: Catch an instance of anonymous drives. Doubtless many remain. interrupt.c: complete_rqe: Call logrq to log iodone events if DEBUG_LASTREQS is set. Call set_sd_state with setstate_noupdate to avoid buffered I/O out of interrupt context. Use define DEBUG_RESID instead of constant. memory.c: Remove dead expandrq() function Malloc: Remove directory component of file names in malloc table. Add function vinum_rqinfo (part of the request tracing stuff). request.c: Add function logrq (part of the request tracing stuff). vinumstrategy: Check whether config needs to be written to disk, do it if so. This is a stopgap until the Vinum daemon (bacchusd? oenologistd?) is written. If DEBUG_LASTREQS is set, call logrq to log user buffer headers. launch_requests: Correct format of debug output to console. If DEBUG_LASTREQS is set, call logrq to log request elements. request.h: Add definitions for request trace. state.c: set_sd_state: Check flags for setstate_noupdate. If set, don't write the config to disk, just set global VF_DIRTYCONFIG flag. This is part of the kludge to avoid writing config from an interrupt context. vinumext.h: Add declaration for vinum_rqinfo, put inside #ifdef DEBUG Remove dead macro expandrq vinumio.h: Increase maximum ioctl reply length to 4 kB if DEBUG is set. Define VINUM_RQINFO ioctl if DEBUG is set. vinumioctl.c: vinumioctl: Change implementation of VINUM_DEBUG ioctl: use a debug flag (DEBUG_REMOTEGDB) to decide whether to go into remote debugging or not. Implement VINUM_RQINFO. vinumkw.h: Define kw_info even when not debugging. vinumvar.h: Define VF_DIRTYCONFIG Add pointers to request info to vinum_info if DEBUG is set. Define setstate_noupdate Define additional debug bits DEBUG_RESID, DEBUG_LASTREQS and DEBUG_REMOTEGDB.
* Import base vinum lkm sourcesgrog1998-09-161-0/+510
OpenPOWER on IntegriCloud